org.jtgl.core
Class JTGLFont
java.lang.Object
org.jtgl.core.JTGLFont
public abstract class JTGLFont
- extends java.lang.Object
Represents a Font used in text rendering.
- Author:
- Manuel Polo (manuel_polo at yahoo dot es)
Constructor Summary |
protected |
JTGLFont()
Creates a new instance of JTGLFont |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SIZE_SMALL
public static final int SIZE_SMALL
- See Also:
- Constant Field Values
SIZE_MEDIUM
public static final int SIZE_MEDIUM
- See Also:
- Constant Field Values
SIZE_LARGE
public static final int SIZE_LARGE
- See Also:
- Constant Field Values
STYLE_PLAIN
public static final int STYLE_PLAIN
- See Also:
- Constant Field Values
STYLE_BOLD
public static final int STYLE_BOLD
- See Also:
- Constant Field Values
STYLE_ITALIC
public static final int STYLE_ITALIC
- See Also:
- Constant Field Values
STYLE_UNDERLINED
public static final int STYLE_UNDERLINED
- See Also:
- Constant Field Values
JTGLFont
protected JTGLFont()
- Creates a new instance of JTGLFont
init
protected void init(java.lang.String name,
int style,
int size)
getName
public java.lang.String getName()
getStyle
public int getStyle()
getSize
public int getSize()
isPlain
public boolean isPlain()
isBold
public boolean isBold()
isItalic
public boolean isItalic()
isUnderlined
public boolean isUnderlined()
stringWidth
public int stringWidth(java.lang.String str)
getSizes
public int[] getSizes()
getHeight
public abstract int getHeight()
charWidth
public abstract int charWidth(char ch)
stringWidth
public abstract int stringWidth(java.lang.String str,
int offset,
int length)
getAvailableFontNames
public abstract java.lang.String[] getAvailableFontNames()
getNativeFont
public abstract java.lang.Object getNativeFont()
getDefaultFont
public abstract JTGLFont getDefaultFont()
createFont
public JTGLFont createFont(java.lang.String name)
createFont
public JTGLFont createFont(int style)
createFont
public JTGLFont createFont(java.lang.String name,
int style)
createFont
public abstract JTGLFont createFont(java.lang.String name,
int style,
int size)
translateToJTGLStyle
protected int translateToJTGLStyle(int nativeStyle)
translateToNativeStyle
protected int translateToNativeStyle(int style)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object