All Packages Class Hierarchy This Package Previous Next Index
Class com.bulletproof.gui.Label
java.lang.Object
|
+----com.bulletproof.gui.Component
|
+----com.bulletproof.gui.Label
- public class Label
- extends Component
A component that displays a single line of read-only text.
-
CENTER
-
The center alignment.
-
LEFT
- The left alignment.
-
RIGHT
- The right alignment.
-
Label(String)
- Constructs a new label with the specified String of text.
-
Label(String, int)
- Constructs a new label with the specified String of
text and the specified alignment.
-
getAlignment()
-
Gets the current alignment of this label.
-
getMinimumSize()
- Gets the minimum size of this component.
-
getText()
-
Gets the text of this label.
-
paint(Graphics)
-
Paints the component.
-
setAlignment(int)
-
Sets the alignment for this label to the specified
alignment.
-
setText(String)
-
Sets the text for this label to the specified text.
LEFT
public static final int LEFT
- The left alignment.
CENTER
public static final int CENTER
- The center alignment.
RIGHT
public static final int RIGHT
- The right alignment.
Label
public Label(String text)
- Constructs a new label with the specified String of text.
- Parameters:
- text - the text that makes up the label
Label
public Label(String text,
int alignment)
- Constructs a new label with the specified String of
text and the specified alignment.
- Parameters:
- text - the String that makes up the label
- alignment - the alignment value
getAlignment
public int getAlignment()
- Gets the current alignment of this label.
- See Also:
- setAlignment
setAlignment
public synchronized void setAlignment(int alignment)
- Sets the alignment for this label to the specified
alignment.
- Parameters:
- alignment - the alignment value
- Throws: IllegalArgumentException
- If an improper alignment was given.
- See Also:
- getAlignment
paint
public void paint(Graphics g)
- Paints the component.
- Overrides:
- paint in class Component
getText
public String getText()
- Gets the text of this label.
- See Also:
- setText
setText
public void setText(String s)
- Sets the text for this label to the specified text.
- Parameters:
- text - the text that makes up the label
- See Also:
- getText
getMinimumSize
public Dimension getMinimumSize()
- Gets the minimum size of this component.
- Overrides:
- getMinimumSize in class Component
All Packages Class Hierarchy This Package Previous Next Index