Class jrad.util.NoMarginLabel
All Packages Class Hierarchy This Package Previous Next Index
Class jrad.util.NoMarginLabel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----jrad.util.NoMarginLabel
- public class NoMarginLabel
- extends Canvas
A class that displays a label without the 17 pixel border added by
the Windows 95 AWT 1.0.2.
-
alignment
- The label alignment.
-
CENTER
- The center alignment.
-
label
- The label text.
-
LEFT
- The left alignment.
-
RIGHT
- The right alignment.
-
NoMarginLabel()
- Constructs an empty label.
-
NoMarginLabel(String)
- Constructs a new label with the specified String of text.
-
NoMarginLabel(String, int)
- Constructs a new label with the specified String of text and the
specified alignment.
-
getAlignment()
- Returns the current alignment of this label.
-
getText()
- Returns the text of this label.
-
minimumSize()
- Returns the minimum size of the NoMarginLabel.
-
paint(Graphics)
- Paints the label.
-
preferredSize()
- Returns the preferred size of the NoMarginLabel.
-
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 final static int LEFT
- The left alignment.
CENTER
public final static int CENTER
- The center alignment.
RIGHT
public final static int RIGHT
- The right alignment.
label
protected String label
- The label text.
alignment
protected int alignment
- The label alignment.
NoMarginLabel
public NoMarginLabel()
- Constructs an empty label.
NoMarginLabel
public NoMarginLabel(String label)
- Constructs a new label with the specified String of text.
- Parameters:
- the - String that makes up the label
NoMarginLabel
public NoMarginLabel(String label,
int alignment)
- Constructs a new label with the specified String of text and the
specified alignment.
- Parameters:
- the - String that makes up the label
- alignment - - the alignment value
preferredSize
public Dimension preferredSize()
- Returns the preferred size of the NoMarginLabel.
- Overrides:
- preferredSize in class Component
minimumSize
public Dimension minimumSize()
- Returns the minimum size of the NoMarginLabel.
- Overrides:
- minimumSize in class Component
getText
public String getText()
- Returns the text of this label.
- See Also:
- setText()
setText
public void setText(String label)
- Sets the text for this label to the specified text.
- See Also:
- getText()
getAlignment
public int getAlignment()
- Returns the current alignment of this label.
- See Also:
- setAlignment
setAlignment
public void setAlignment(int alignment) throws IllegalArgumentException
- Sets the alignment for this label to the specified alignment.
- Parameters:
- alignment - - the alignment value
- See Also:
- getAlignment
paint
public void paint(Graphics g)
- Paints the label.
- Overrides:
- paint in class Canvas
All Packages Class Hierarchy This Package Previous Next Index