de.muntjak.tinylookandfeel.util
Class ColoredFont

java.lang.Object
  extended by de.muntjak.tinylookandfeel.util.ColoredFont

public class ColoredFont
extends java.lang.Object

ColoredFont describes a (mutable) font and an optional (text) color. The class is used to specify, for example, the font and text color used by buttons.


Constructor Summary
ColoredFont()
          Construcor for Plain Fonts without a color reference.
ColoredFont(ColoredFont other)
          Copy constructor.
ColoredFont(SBReference ref)
          Construcor for Plain Fonts.
ColoredFont(java.lang.String fontFamily, int style, int size)
          Constructs a new ColoredFont using the passed arguments.
 
Method Summary
 javax.swing.plaf.FontUIResource getFont()
           
 SBReference getSBReference()
           
 boolean isBoldFont()
           
 boolean isPlainFont()
           
 void load(java.io.DataInputStream in)
           
static void loadDummyData(java.io.DataInputStream in)
           
 void save(java.io.DataOutputStream out)
           
 void setBoldFont(boolean b)
           
 void setFont(java.awt.Font font)
           
 void setFont(javax.swing.plaf.FontUIResource font)
           
 void setFont(java.lang.String fontFamily, int style, int size)
           
 void setPlainFont(boolean b)
           
 void setSBReference(SBReference sbReference)
           
 java.lang.String toString()
           
 void update(ColoredFont other)
          Sets up this ColoredFont to be identical to argument.
 void update(ColoredFont other, java.util.Vector referenceColors)
           
 void update(SBReference sbReference)
          Updates a ColoredFont to be a Plain Font,
 void update(java.lang.String fontFamily, int style, int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColoredFont

public ColoredFont(ColoredFont other)
Copy constructor.

Parameters:
other -

ColoredFont

public ColoredFont(java.lang.String fontFamily,
                   int style,
                   int size)
Constructs a new ColoredFont using the passed arguments.

Parameters:
fontFamily -
style -
size -

ColoredFont

public ColoredFont()
Construcor for Plain Fonts without a color reference.


ColoredFont

public ColoredFont(SBReference ref)
Construcor for Plain Fonts.

Parameters:
ref - the color reference of this font
Method Detail

update

public void update(java.lang.String fontFamily,
                   int style,
                   int size)

update

public void update(SBReference sbReference)
Updates a ColoredFont to be a Plain Font,

Parameters:
sbReference -

update

public void update(ColoredFont other)
Sets up this ColoredFont to be identical to argument.

Parameters:
other -

update

public void update(ColoredFont other,
                   java.util.Vector referenceColors)

setPlainFont

public void setPlainFont(boolean b)

setBoldFont

public void setBoldFont(boolean b)

isPlainFont

public boolean isPlainFont()

isBoldFont

public boolean isBoldFont()

setFont

public void setFont(java.lang.String fontFamily,
                    int style,
                    int size)

setFont

public void setFont(java.awt.Font font)

setFont

public void setFont(javax.swing.plaf.FontUIResource font)

getFont

public javax.swing.plaf.FontUIResource getFont()

getSBReference

public SBReference getSBReference()

setSBReference

public void setSBReference(SBReference sbReference)

save

public void save(java.io.DataOutputStream out)
          throws java.io.IOException
Throws:
java.io.IOException

load

public void load(java.io.DataInputStream in)
          throws java.io.IOException
Throws:
java.io.IOException

loadDummyData

public static void loadDummyData(java.io.DataInputStream in)
                          throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object