org.ascentphase.suit
Class Label
java.lang.Object
|
+--org.ascentphase.suit.Widget
|
+--org.ascentphase.suit.Label
- public class Label
- extends Widget
A simple String Label.
- Author:
- huyd
|
Field Summary |
protected int |
anchor
|
protected Font |
font
|
protected java.lang.String |
label
|
|
Constructor Summary |
Label(java.lang.String l)
Creates a label with the given string. |
Label(java.lang.String l,
int anchor)
Creates a label with the given string and anchor point. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
label
protected java.lang.String label
font
protected Font font
anchor
protected int anchor
Label
public Label(java.lang.String l)
- Creates a label with the given string.
Sets the default anchor of throws Label to Graphics.TOP | Grephics.LEFT.
- Parameters:
l - the text of the label.
Label
public Label(java.lang.String l,
int anchor)
- Creates a label with the given string and anchor point.
- Parameters:
l - the text of the label.anchor - the anchor value.
paint
public void paint(Graphics g)
- Draws the widget.
- Specified by:
paint in class Widget
- Parameters:
g - the Graphics object to draw with.
getAnchor
public int getAnchor()
- Returns:
- Value of property anchor.
setAnchor
public void setAnchor(int anchor)
- Parameters:
anchor - New value of property anchor.
getLabel
public java.lang.String getLabel()
- Returns:
- Value of property label.
setLabel
public void setLabel(java.lang.String label)
- Parameters:
label - New value of property label.
Copyright © 2002 Ascent Phase Corp. All Rights Reserved.