edu.gatech.cs2335.lemmings.gui
Class LFancyLabel

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.gui.LComponent
      extended byedu.gatech.cs2335.lemmings.gui.LLeafComponent
          extended byedu.gatech.cs2335.lemmings.gui.LColoredComponent
              extended byedu.gatech.cs2335.lemmings.gui.LLabel
                  extended byedu.gatech.cs2335.lemmings.gui.LFancyLabel

public final class LFancyLabel
extends LLabel

Class LFancyLabel: In addition to the regular label functionality, this guy allows you to specify different fonts for the label.

 Revision History:
     v1.0 (Mar. 13, 2004) - Created the LFancyLabel class
 

Version:
Version 1.0, Mar. 13, 2004
Author:
Vladimir Urazov

Field Summary
static java.awt.Font DEFAULT_FONT
          The default font.
 
Fields inherited from class edu.gatech.cs2335.lemmings.gui.LColoredComponent
DEFAULT_BACKGROUND_COLOR, DEFAULT_FOREGROUND_COLOR
 
Constructor Summary
LFancyLabel()
          Creates a new LFancyLabel instance.
LFancyLabel(java.lang.String text)
          Creates a new LFancyLabel instance.
LFancyLabel(java.lang.String text, java.awt.Font font)
          Creates a new LFancyLabel instance.
 
Method Summary
protected  void copy(LComponent component)
          Deep-copies self into the component passed in.
 java.awt.Font getFont()
          Returns the fint associated with this label.
protected  boolean paint(java.awt.Graphics g)
          Performs all of the necessary drawing for this control only.
 void setFont(java.awt.Font newFont)
          Sets up a new font value.
 
Methods inherited from class edu.gatech.cs2335.lemmings.gui.LLabel
getText, setText, updateDimensions
 
Methods inherited from class edu.gatech.cs2335.lemmings.gui.LColoredComponent
getBackground, getForeground, setBackground, setBackground, setForeground, setForeground
 
Methods inherited from class edu.gatech.cs2335.lemmings.gui.LLeafComponent
makeDirty, move, renderAll
 
Methods inherited from class edu.gatech.cs2335.lemmings.gui.LComponent
bringToTop, cleanUp, getBounds, getParent, initialize, isActive, isComponentDirty, isShown, setBounds, setDirty, setParent, setPosition, setShown, setSize, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FONT

public static final java.awt.Font DEFAULT_FONT
The default font.

Constructor Detail

LFancyLabel

public LFancyLabel()
Creates a new LFancyLabel instance.


LFancyLabel

public LFancyLabel(java.lang.String text)
Creates a new LFancyLabel instance.

Parameters:
text - a String value

LFancyLabel

public LFancyLabel(java.lang.String text,
                   java.awt.Font font)
Creates a new LFancyLabel instance.

Parameters:
text - a String value
font - a Font value
Method Detail

getFont

public java.awt.Font getFont()
Returns the fint associated with this label.

Returns:
a Font value

setFont

public void setFont(java.awt.Font newFont)
Sets up a new font value.

Parameters:
newFont - a Font value

copy

protected void copy(LComponent component)
Deep-copies self into the component passed in.

Overrides:
copy in class LLabel
Parameters:
component - a LComponent value

paint

protected boolean paint(java.awt.Graphics g)
Performs all of the necessary drawing for this control only. The children will be taken care of separately. This method need not concern itself with them.

Overrides:
paint in class LLabel
Parameters:
g - a Graphics value
Returns:
a boolean value