|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfr.esrf.tangoatk.widget.util.jdraw.JDObject
fr.esrf.tangoatk.widget.util.jdraw.JDRectangular
fr.esrf.tangoatk.widget.util.jdraw.JDLabel
public class JDLabel
JDraw Label graphic object.
Here is an example of few JDLabel:
| Field Summary | |
|---|---|
static int |
BOTTOM_TO_TOP
Text orientation |
static int |
CENTER_ALIGNMENT
Text is centered |
static int |
DOWN_ALIGNMENT
Down justification for text (V alignement) |
static int |
LEFT_ALIGNMENT
Left justification for text (H alignement) |
static int |
LEFT_TO_RIGHT
Text orientation |
static int |
RIGHT_ALIGNMENT
Right justification for text (H alignement) |
static int |
RIGHT_TO_LEFT
Text orientation |
static int |
TOP_TO_BOTTOM
Text orientation |
static int |
UP_ALIGNMENT
Up justification for text (V alignement) |
| Constructor Summary | |
|---|---|
JDLabel(java.lang.String objectName,
java.lang.String text,
int x,
int y)
Construcxt a label. |
|
| Method Summary | |
|---|---|
JDObject |
copy(int x,
int y)
Returns a copy of this object at the specified location. |
java.awt.Font |
getFont()
Returns the current font of this label. |
int |
getHorizontalAlignment()
Returns the current horizontal text alignement. |
int |
getOrientation()
Gets the current text orientation. |
java.lang.String |
getText()
Returns the current label text. |
void |
paint(JDrawEditor parent,
java.awt.Graphics g)
Paints this object. |
void |
restoreTransform()
Restore original shape previously backuped by saveTransform |
void |
rotate90(double x,
double y)
Rotate the object by 90deg. |
void |
saveTransform()
Backup the shape. |
void |
setFont(java.awt.Font f)
Sets the Font of this label. |
void |
setFont(java.awt.Font f,
boolean resize)
Sets the font of this label and resize it if needed and specified. |
void |
setHorizontalAlignment(int a)
Sets the horizontal alignement of this label. |
void |
setOrientation(int a)
Sets the text orientation. |
void |
setText(java.lang.String s)
Sets the text of this label. |
void |
setText(java.lang.String s,
boolean resize)
Sets the text of this label and resize label if desried. |
int |
setVerticalAlignment()
Returns the current vetical text alignement. |
void |
setVerticalAlignment(int a)
Sets the vertical alignement of this label. |
| Methods inherited from class fr.esrf.tangoatk.widget.util.jdraw.JDRectangular |
|---|
moveSummit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CENTER_ALIGNMENT
public static final int LEFT_ALIGNMENT
public static final int RIGHT_ALIGNMENT
public static final int UP_ALIGNMENT
public static final int DOWN_ALIGNMENT
public static final int LEFT_TO_RIGHT
public static final int BOTTOM_TO_TOP
public static final int RIGHT_TO_LEFT
public static final int TOP_TO_BOTTOM
| Constructor Detail |
|---|
public JDLabel(java.lang.String objectName,
java.lang.String text,
int x,
int y)
objectName - Name of this labeltext - Textx - Up left corner x coordinatey - Up left corner y coordinate| Method Detail |
|---|
public JDObject copy(int x,
int y)
JDObject
copy in class JDObjectx - Horizontal position of the copied object (pixel)y - Vertical Position of the copied object (pixel)
public void paint(JDrawEditor parent,
java.awt.Graphics g)
JDObject
paint in class JDRectangularparent - JdrawEditor parent (Can be null except for JDSwingObject)g - the specified Graphics window
public void rotate90(double x,
double y)
JDObject
rotate90 in class JDRectangularx - Rotation center horizontal posy - Rotation center vertical posJDObject.refresh()public void restoreTransform()
JDObject
restoreTransform in class JDObjectJDObject.saveTransform()public void saveTransform()
JDObject
saveTransform in class JDObjectJDObject.restoreTransform()public void setFont(java.awt.Font f)
f - Font
public void setFont(java.awt.Font f,
boolean resize)
f - Fontresize - true to resize label when text is out of bounds.public java.awt.Font getFont()
public void setHorizontalAlignment(int a)
a - Alignement valueCENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENTpublic int getHorizontalAlignment()
setHorizontalAlignment(int)public void setVerticalAlignment(int a)
a - Alignement valueCENTER_ALIGNMENT,
UP_ALIGNMENT,
DOWN_ALIGNMENTpublic int setVerticalAlignment()
setHorizontalAlignment(int)public void setOrientation(int a)
a - OrientationLEFT_TO_RIGHT,
BOTTOM_TO_TOP,
RIGHT_TO_LEFT,
TOP_TO_BOTTOMpublic int getOrientation()
setOrientation(int)public void setText(java.lang.String s)
s - Text value
public void setText(java.lang.String s,
boolean resize)
s - Text valueresize - true to resize label when text is out of bounds.public java.lang.String getText()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||