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.

Variable Index

 o alignment
The label alignment.
 o CENTER
The center alignment.
 o label
The label text.
 o LEFT
The left alignment.
 o RIGHT
The right alignment.

Constructor Index

 o NoMarginLabel()
Constructs an empty label.
 o NoMarginLabel(String)
Constructs a new label with the specified String of text.
 o NoMarginLabel(String, int)
Constructs a new label with the specified String of text and the specified alignment.

Method Index

 o getAlignment()
Returns the current alignment of this label.
 o getText()
Returns the text of this label.
 o minimumSize()
Returns the minimum size of the NoMarginLabel.
 o paint(Graphics)
Paints the label.
 o preferredSize()
Returns the preferred size of the NoMarginLabel.
 o setAlignment(int)
Sets the alignment for this label to the specified alignment.
 o setText(String)
Sets the text for this label to the specified text.

Variables

 o LEFT
  public final static int LEFT
The left alignment.
 o CENTER
  public final static int CENTER
The center alignment.
 o RIGHT
  public final static int RIGHT
The right alignment.
 o label
  protected String label
The label text.
 o alignment
  protected int alignment
The label alignment.

Constructors

 o NoMarginLabel
  public NoMarginLabel()
Constructs an empty label.
 o NoMarginLabel
  public NoMarginLabel(String label)
Constructs a new label with the specified String of text.
Parameters:
the - String that makes up the label
 o 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

Methods

 o preferredSize
  public Dimension preferredSize()
Returns the preferred size of the NoMarginLabel.
Overrides:
preferredSize in class Component
 o minimumSize
  public Dimension minimumSize()
Returns the minimum size of the NoMarginLabel.
Overrides:
minimumSize in class Component
 o getText
  public String getText()
Returns the text of this label.
See Also:
setText()
 o setText
  public void setText(String label)
Sets the text for this label to the specified text.
See Also:
getText()
 o getAlignment
  public int getAlignment()
Returns the current alignment of this label.
See Also:
setAlignment
 o 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
 o paint
  public void paint(Graphics g)
Paints the label.
Overrides:
paint in class Canvas

All Packages  Class Hierarchy  This Package  Previous  Next  Index