swingwt.awt
Class Font

java.lang.Object
  extended byswingwt.awt.Font
Direct Known Subclasses:
FontUIResource

public class Font
extends java.lang.Object


Field Summary
static int BOLD
           
static int CENTER_BASELINE
           
protected  boolean disposeOnFinalize
          Destroy the font when finalize is called.
static int HANGING_BASELINE
           
static int ITALIC
           
protected  java.lang.String name
           
static int PLAIN
           
static int ROMAN_BASELINE
           
protected  int size
           
protected  int style
           
static int TRUETYPE_FONT
           
 
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)
           
 
Method Summary
protected  void createPeer()
          Creates the SWT peer from the Font info we have
 Font deriveFont(int style)
           
 void dispose()
           
protected  void finalize()
           
 java.util.Map getAttributes()
           
static Font getFont(java.util.Map attributes)
           
 java.lang.String getName()
           
 int getSize()
           
 float getSize2D()
           
 int getStyle()
           
 org.eclipse.swt.graphics.Font getSWTFont()
           
 boolean isBold()
           
 boolean isItalic()
           
 boolean isPlain()
           
protected  void populateFromSWTFont(org.eclipse.swt.graphics.Font swtfont)
          Sets font properties based on a SWT font
 void setAttributes(java.util.Map attributes)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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)
Method Detail

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