|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcontrol.ui.wombat.Component
jcontrol.ui.wombat.FastLabel
public class FastLabel
A label is a very simple component which displays a single line of
read-only text or an image resource. The text can be changed by the
application, but a user cannot edit it directly.
Labels are passive components, they can neither be selected nor fire
any events.
(c) Copyright 2005 DOMOLOGIC GmbH
Field Summary | |
---|---|
static int |
STYLE_ALIGN_CENTER
Align text to the middle |
static int |
STYLE_ALIGN_LEFT
Align text to the left |
static int |
STYLE_ALIGN_RIGHT
Align text to the right |
static int |
STYLE_DRAW_NORMAL
Inverse mode |
Constructor Summary | |
---|---|
FastLabel(java.lang.String text,
int x,
int y,
int width,
int height,
int style)
Constructs a new label with specified bounds and alignment. |
Method Summary | |
---|---|
java.lang.String |
getLabel()
Returns the caption of this label. |
void |
paint(jcontrol.graphics.XGraphics g)
Paint the label. |
void |
setBackgroundColor(jcontrol.graphics.Color background)
Sets the background color for this component. |
void |
setBounds(int x,
int y,
int width,
int height)
Set the dimensions of this component. |
void |
setFont(jcontrol.io.Resource font)
Sets the font for this component. |
void |
setForegroundColor(jcontrol.graphics.Color foreground)
Sets the foreground color for this component. |
void |
setStyle(int style)
Sets the style of the label. |
void |
setText(java.lang.String text)
Replaces the current text or image on this label by the specified text. |
Methods inherited from class jcontrol.ui.wombat.Component |
---|
getFrame, isEnabled, isVisible, repaint, repaintAll, safeExec, setDirty, setEnabled, setRedraw, setTransparentColor, setVisible, unsafeExec, update |
Methods inherited from class java.lang.Object |
---|
equals, getClass, notifyAll, toString, wait |
Field Detail |
---|
public static final int STYLE_ALIGN_CENTER
public static final int STYLE_ALIGN_LEFT
public static final int STYLE_ALIGN_RIGHT
public static final int STYLE_DRAW_NORMAL
Constructor Detail |
---|
public FastLabel(java.lang.String text, int x, int y, int width, int height, int style)
text
- the text to display on the labelx
- the x-coordinate of the label's top-left cornery
- the y-coordinate of the label's top-left cornerwidth
- the width of the labelheight
- the height of the labelstyle
- the alignment and style of the label. Possible values are one of the styles
STYLE_ALIGN_LEFT
, STYLE_ALIGN_CENTER
or STYLE_ALIGN_RIGHT
and optional STYLE_DRAW_INVERSE
and STYLE_SHOW_BORDER
Method Detail |
---|
public java.lang.String getLabel()
public void paint(jcontrol.graphics.XGraphics g)
paint
in class Component
g
- the application's graphics object.public void setBackgroundColor(jcontrol.graphics.Color background)
Component
setBackgroundColor
in class Component
background
- the background color to setpublic void setBounds(int x, int y, int width, int height)
setBounds
in class Component
x
- The x-coordinate of the upper left cornery
- The y-coordinate of the upper left cornerwidth
- The width of this componentheight
- The height of this componentpublic void setFont(jcontrol.io.Resource font)
Component
setFont
in class Component
font
- the new font.public void setForegroundColor(jcontrol.graphics.Color foreground)
Component
setForegroundColor
in class Component
foreground
- the foreground color to setpublic void setStyle(int style)
style
- the alignment and style of the label. Possible values are one of the styles
STYLE_ALIGN_LEFT
, STYLE_ALIGN_CENTER
or STYLE_ALIGN_RIGHT
and optional STYLE_DRAW_INVERSE
and STYLE_SHOW_BORDER
public void setText(java.lang.String text)
setBounds()
-method or
in the constructor.
text
- the new text
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |