|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.base.WidgetBase
org.xith3d.ui.hud.base.RectangularWidget
org.xith3d.ui.hud.base.StateButton
org.xith3d.ui.hud.base.LabeledStateButton
public abstract class LabeledStateButton
This class serves as a base for all StateButtons with an Image and a Label.
| Nested Class Summary | |
|---|---|
static class |
LabeledStateButton.Description
This class is used to describe a LabeledStateButton Widget. |
| Nested classes/interfaces inherited from class org.xith3d.ui.hud.base.StateButton |
|---|
StateButton.State |
| Nested classes/interfaces inherited from interface org.xith3d.ui.hud.base.Widget |
|---|
Widget.DescriptionBase |
| Field Summary | |
|---|---|
protected Image |
buttonImage
|
protected Label |
label
|
| Fields inherited from class org.xith3d.ui.hud.base.WidgetBase |
|---|
containerListeners, transformGroup, translation, Z_INDEX_UNIT, Z_INDEX_UNIT_ASSEMBLER |
| Constructor Summary | |
|---|---|
LabeledStateButton(float width,
float height,
int zIndex,
LabeledStateButton.Description desc)
Creates a new LabeledStateButton |
|
LabeledStateButton(float width,
float height,
int zIndex,
LabeledStateButton.Description desc,
java.lang.String text)
Creates a new LabeledStateButton |
|
LabeledStateButton(float width,
float height,
LabeledStateButton.Description desc)
Creates a new LabeledStateButton |
|
LabeledStateButton(float width,
float height,
LabeledStateButton.Description desc,
java.lang.String text)
Creates a new LabeledStateButton |
|
| Method Summary | |
|---|---|
TextAlignment |
getAlignment()
|
java.awt.Font |
getFont()
|
org.openmali.vecmath2.Colorf |
getFontColor()
|
org.openmali.vecmath2.Colorf |
getFontColorDisabled()
|
java.awt.Font |
getFontDisabled()
|
java.lang.String |
getText()
|
float |
getTransparency()
|
protected void |
init()
This method is called when the WidgetContainer is set. |
protected void |
onStateChanged(StateButton.State state)
|
void |
setAlignment(TextAlignment alignment)
Sets the horizontal and vertical alignment of the text |
protected void |
setEnabledImpl(boolean enabled)
|
void |
setFont(java.awt.Font font)
Sets the new Font to be used |
void |
setFontColor(org.openmali.vecmath2.Colorf color)
Sets the new color to be used |
void |
setFontColorDisabled(org.openmali.vecmath2.Colorf color)
|
void |
setFontDisabled(java.awt.Font font)
|
protected boolean |
setSize(float width,
float height,
boolean forced)
|
void |
setText(java.lang.String text)
Sets the new text to be displayed |
| Methods inherited from class org.xith3d.ui.hud.base.StateButton |
|---|
addStateListener, cycleState, getBooleanState, getState, getStateGroup, isEnabled, notifyListeners, onMouseButtonPressed, onMouseEntered, onMouseLeft, removeStateListener, setEnabled, setState, setState, setStateGroup |
| Methods inherited from class org.xith3d.ui.hud.base.RectangularWidget |
|---|
getPickHeight, getPickSGZPosition, getPickWidth, pick |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openmali.types.twodee.Sized2f |
|---|
setHeight, setWidth |
| Field Detail |
|---|
protected Image buttonImage
protected Label label
| Constructor Detail |
|---|
public LabeledStateButton(float width,
float height,
int zIndex,
LabeledStateButton.Description desc,
java.lang.String text)
width - the desired widthheight - the desired heightzIndex - the desired z-indexdesc - the Description object for this Widgettext - the text to be displayed
public LabeledStateButton(float width,
float height,
LabeledStateButton.Description desc,
java.lang.String text)
width - the desired widthheight - the desired heightdesc - the Description object for this Widgettext - the text to be displayed
public LabeledStateButton(float width,
float height,
int zIndex,
LabeledStateButton.Description desc)
width - the desired widthheight - the desired heightzIndex - the desired z-indexdesc - the Description object for this Widget
public LabeledStateButton(float width,
float height,
LabeledStateButton.Description desc)
width - the desired widthheight - the desired heightdesc - the Description object for this Widget| Method Detail |
|---|
public float getTransparency()
getTransparency in interface Widgetpublic void setText(java.lang.String text)
setText in interface TextWidgettext - the new Textpublic java.lang.String getText()
getText in interface TextWidgetpublic void setAlignment(TextAlignment alignment)
setAlignment in interface TextWidgetpublic TextAlignment getAlignment()
getAlignment in interface TextWidgetpublic void setFont(java.awt.Font font)
setFont in interface TextWidgetfont - the new Fontpublic java.awt.Font getFont()
getFont in interface TextWidgetpublic void setFontDisabled(java.awt.Font font)
public java.awt.Font getFontDisabled()
public void setFontColor(org.openmali.vecmath2.Colorf color)
setFontColor in interface TextWidgetcolor - the new colorpublic org.openmali.vecmath2.Colorf getFontColor()
getFontColor in interface TextWidgetpublic void setFontColorDisabled(org.openmali.vecmath2.Colorf color)
public org.openmali.vecmath2.Colorf getFontColorDisabled()
protected void setEnabledImpl(boolean enabled)
setEnabledImpl in class StateButtonprotected void onStateChanged(StateButton.State state)
onStateChanged in class StateButton
protected boolean setSize(float width,
float height,
boolean forced)
setSize in class WidgetBaseprotected void init()
init in class WidgetBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||