swingwt.awt
Class Font
java.lang.Object
swingwt.awt.Font
- Direct Known Subclasses:
- FontUIResource
- public class Font
- extends java.lang.Object
Constructor Summary |
Font(org.eclipse.swt.graphics.Font swtfont)
|
Font(java.util.Map attributes)
|
Font(java.lang.String name,
int style,
int size)
|
Font(java.lang.String name,
int style,
int size,
boolean f)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
disposeOnFinalize
protected boolean disposeOnFinalize
- Destroy the font when finalize is called. Not required for
the constructor passing the font - only do this when this
instance created the SWT font
PLAIN
public static final int PLAIN
- See Also:
- Constant Field Values
BOLD
public static final int BOLD
- See Also:
- Constant Field Values
ITALIC
public static final int ITALIC
- See Also:
- Constant Field Values
ROMAN_BASELINE
public static final int ROMAN_BASELINE
- See Also:
- Constant Field Values
CENTER_BASELINE
public static final int CENTER_BASELINE
- See Also:
- Constant Field Values
HANGING_BASELINE
public static final int HANGING_BASELINE
- See Also:
- Constant Field Values
TRUETYPE_FONT
public static final int TRUETYPE_FONT
- See Also:
- Constant Field Values
name
protected java.lang.String name
style
protected int style
size
protected int size
Font
public Font(java.lang.String name,
int style,
int size)
Font
public Font(java.lang.String name,
int style,
int size,
boolean f)
Font
public Font(java.util.Map attributes)
Font
public Font(org.eclipse.swt.graphics.Font swtfont)
getFont
public static Font getFont(java.util.Map attributes)
createPeer
protected void createPeer()
- Creates the SWT peer from the Font info we have
populateFromSWTFont
protected void populateFromSWTFont(org.eclipse.swt.graphics.Font swtfont)
- Sets font properties based on a SWT font
setAttributes
public void setAttributes(java.util.Map attributes)
getAttributes
public java.util.Map getAttributes()
getName
public java.lang.String getName()
getStyle
public int getStyle()
getSize
public int getSize()
getSize2D
public float getSize2D()
isBold
public boolean isBold()
isPlain
public boolean isPlain()
isItalic
public boolean isItalic()
deriveFont
public Font deriveFont(int style)
getSWTFont
public org.eclipse.swt.graphics.Font getSWTFont()
dispose
public void dispose()
finalize
protected void finalize()
throws java.lang.Throwable
- Throws:
java.lang.Throwable