| java.awt.Canvas net.xoetrope.awt.XLabel
All known Subclasses: net.xoetrope.awt.XUnknown, net.xoetrope.awt.XTab,
XLabel | public class XLabel extends Canvas implements XTextHolder,XAttributedComponent(Code) | | Draws text. The text may be wrapped over multiple lines. Double buffering is
switched off by default.
Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
version: $Revision: 1.16 $ |
bufferHeight | protected int bufferHeight(Code) | | |
bufferWidth | protected int bufferWidth(Code) | | |
doubleBuffered | protected boolean doubleBuffered(Code) | | |
addNotify | public void addNotify()(Code) | | Repaint the component once it has been created
|
getAlignment | public int getAlignment()(Code) | | |
getPreferredSize | public Dimension getPreferredSize()(Code) | | Gets the preferred size of this component.
a dimension object indicating this component's preferred size See Also: XLabel.getMinimumSize See Also: LayoutManager |
getText | public String getText()(Code) | | Gets the text.
the label text |
paint | public void paint(Graphics g)(Code) | | Render the text
Parameters: g - |
setAlignment | public void setAlignment(int align)(Code) | | Sets the alignment of the text.
Parameters: b - 1 to right align the text, 0 for left alignment and 2 for centered text |
setAttribute | public void setAttribute(String attribName, String attribValue)(Code) | | Set one or more attributes of the component. Attributes include
- align (left|right|center ) or
- alignment (left|right|center )
- buffered (true|false) double buffering
Parameters: attribName - the attribute name Parameters: attribValue - the attribute value |
setDoubleBuffered | public void setDoubleBuffered(boolean buffer)(Code) | | Toggle use of double buffering when painting this component
Parameters: buffer - true to double buffer |
setText | public void setText(String str)(Code) | | Reset the text
Parameters: str - the new text |
setTransparent | public void setTransparent(boolean b)(Code) | | Sets the transparency of the text.
Parameters: b - true to make text transparent |
update | public void update(Graphics g)(Code) | | Update the component
Parameters: g - |
|
|