| java.lang.Object com.javujavu.javux.wings.item.LabelItem
LabelItem | public class LabelItem implements ItemRenderer(Code) | | This class is a self-rendering label implementing ItemRederer ,
that can display multiline text and image icon with specified horizontal
alignment and text position.
Object of this class can be used instead of String labels
in labels, buttons, checkboxes, menus and so on, and as an item
in lists, combo boxes, tables and so on.
This class is thread safe.
|
Constructor Summary | |
public | LabelItem(String text, WingImage icon) | public | LabelItem(String text, WingImage icon, Object userData) | public | LabelItem(String text, WingImage icon, int alignment, int textPosition) | public | LabelItem(String text, WingImage icon, int alignment, int textPosition, Object userData) |
Method Summary | |
public void | drawItem(Graphics g, int x, int y, int width, int height, Object item, WingComponent owner, Style style, Insets margin, int alignment, int textPosition, Object context) | public Dimension | getItemSize(Object item, WingComponent owner, Style style, Object context) | public boolean | imageUpdate(Image img, int infoflags, int x, int y, int width, int height, Object item, WingComponent owner, Style style, Rectangle itemBounds) | public String | toString() |
alignment | public int alignment(Code) | | |
textPosition | public int textPosition(Code) | | |
LabelItem | public LabelItem(String text, WingImage icon)(Code) | | Creates a new label displaying specified text and icon
Parameters: text - text of the label, null is allowed Parameters: icon - icon image of the label, null is allowed |
LabelItem | public LabelItem(String text, WingImage icon, Object userData)(Code) | | Creates a new label displaying specified text and icon
Parameters: text - text of the label, null is allowed Parameters: icon - icon image of the label, null is allowed Parameters: userData - custom user data object |
LabelItem | public LabelItem(String text, WingImage icon, int alignment, int textPosition)(Code) | | Creates a new label displaying specified text and icon
Parameters: text - text of the label, null is allowed Parameters: icon - icon image of the label, null is allowed Parameters: alignment - label alignment WingConst.LEFT, RIGHT or CENTER Parameters: textPosition - text position WingConst.LEFT or RIGHT |
LabelItem | public LabelItem(String text, WingImage icon, int alignment, int textPosition, Object userData)(Code) | | Creates a new label displaying specified text and icon
Parameters: text - text of the label, null is allowed Parameters: icon - icon image of the label, null is allowed Parameters: alignment - label alignment WingConst.LEFT, RIGHT or CENTER Parameters: textPosition - text position WingConst.LEFT or RIGHT Parameters: userData - custom user data object |
drawItem | public void drawItem(Graphics g, int x, int y, int width, int height, Object item, WingComponent owner, Style style, Insets margin, int alignment, int textPosition, Object context)(Code) | | See Also: com.javujavu.javux.wings.item.ItemRenderer.drawItem(java.awt.Graphicsintintintintjava.lang.Objectcom.javujavu.javux.wings.WingComponentcom.javujavu.javux.wings.Stylejava.awt.Insetsintintjava.lang.Object) |
|
|