|
org.netbeans.api.visual 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.LabelWidget
public class LabelWidget
A widget representing a text. The widget is not opaque and is checking clipping for by default. It allows to set 4 types of horizontal and vertical alignments (by default LEFT as horizontal and BASELINE as vertical).
Nested Class Summary | |
---|---|
static class |
LabelWidget.Alignment
The text alignment |
static class |
LabelWidget.Orientation
The text orientation |
static class |
LabelWidget.VerticalAlignment
The text vertical alignment |
Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Widget |
---|
Widget.Dependency |
Constructor Summary | |
---|---|
LabelWidget(Scene scene)
Creates a label widget. |
|
LabelWidget(Scene scene,
String label)
Creates a label widget with a label. |
Method Summary | |
---|---|
protected Rectangle |
calculateClientArea()
Calculates a client area for the label. |
LabelWidget.Alignment |
getAlignment()
Returns a text horizontal alignment. |
String |
getLabel()
Returns a label. |
LabelWidget.Orientation |
getOrientation()
Gets a text orientation. |
LabelWidget.VerticalAlignment |
getVerticalAlignment()
Gets a text vertical alignment. |
boolean |
isPaintAsDisabled()
Returns whether the label is painted as disabled. |
protected void |
paintWidget()
Paints the label widget. |
void |
setAlignment(LabelWidget.Alignment alignment)
Sets a text horizontal alignment. |
void |
setLabel(String label)
Sets a label. |
void |
setOrientation(LabelWidget.Orientation orientation)
Sets a text orientation. |
void |
setPaintAsDisabled(boolean paintAsDisabled)
Sets whether the label is painted as disabled. |
void |
setVerticalAlignment(LabelWidget.VerticalAlignment verticalAlignment)
Sets a text vertical alignment. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LabelWidget(Scene scene)
scene
- the scenepublic LabelWidget(Scene scene, String label)
scene
- the scenelabel
- the labelMethod Detail |
---|
public String getLabel()
public void setLabel(String label)
label
- the labelpublic LabelWidget.Alignment getAlignment()
public void setAlignment(LabelWidget.Alignment alignment)
alignment
- the text horizontal alignmentpublic LabelWidget.VerticalAlignment getVerticalAlignment()
public void setVerticalAlignment(LabelWidget.VerticalAlignment verticalAlignment)
verticalAlignment
- the text vertical alignmentpublic LabelWidget.Orientation getOrientation()
public void setOrientation(LabelWidget.Orientation orientation)
orientation
- the text orientationpublic boolean isPaintAsDisabled()
public void setPaintAsDisabled(boolean paintAsDisabled)
paintAsDisabled
- if true, then the label is painted as disabledprotected Rectangle calculateClientArea()
calculateClientArea
in class Widget
protected void paintWidget()
paintWidget
in class Widget
|
org.netbeans.api.visual 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |