public class Button extends Label
Modifier and Type | Class and Description |
---|---|
static class |
Button.ButtonAction |
protected class |
Button.ButtonMouseHandler |
protected class |
Button.FocusObserver |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EFFECT_ACTIVATE |
static java.lang.String |
EFFECT_CLICK |
static java.lang.String |
EFFECT_DEACTIVATE |
static java.lang.String |
EFFECT_DISABLE |
static java.lang.String |
EFFECT_ENABLE |
static java.lang.String |
EFFECT_FOCUS |
static java.lang.String |
EFFECT_PRESS |
static java.lang.String |
EFFECT_RELEASE |
static java.lang.String |
EFFECT_UNFOCUS |
static java.lang.String |
ELEMENT_ID |
LAYER_ICON, LAYER_SHADOW_TEXT, LAYER_TEXT
EFFECT_CLOSE, EFFECT_OPEN, LAYER_BACKGROUND, LAYER_BORDER, LAYER_INSETS
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localOverrides, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_CHILD_LIGHTLIST, RF_LIGHTLIST, RF_MATPARAM_OVERRIDE, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldOverrides, worldTransform
Modifier | Constructor and Description |
---|---|
|
Button(java.lang.String s) |
protected |
Button(java.lang.String s,
boolean applyStyles,
ElementId elementId,
java.lang.String style) |
|
Button(java.lang.String s,
ElementId elementId) |
|
Button(java.lang.String s,
ElementId elementId,
java.lang.String style) |
|
Button(java.lang.String s,
java.lang.String style) |
Modifier and Type | Method and Description |
---|---|
void |
addClickCommands(Command<? super Button>... commands) |
void |
addClickCommands(Command<? super Button> command) |
void |
addCommands(Button.ButtonAction a,
Command<? super Button>... commands) |
void |
click()
Can be called by application code to simulate a click on a button.
|
java.util.List<Command<? super Button>> |
getClickCommands() |
com.jme3.math.ColorRGBA |
getColor() |
java.util.List<Command<? super Button>> |
getCommands(Button.ButtonAction a) |
com.jme3.math.ColorRGBA |
getFocusColor() |
com.jme3.math.ColorRGBA |
getFocusShadowColor() |
com.jme3.math.ColorRGBA |
getHighlightColor() |
com.jme3.math.ColorRGBA |
getHighlightShadowColor() |
com.jme3.math.ColorRGBA |
getShadowColor() |
static void |
initializeDefaultStyles(Attributes attrs) |
boolean |
isEnabled() |
boolean |
isFocused() |
boolean |
isFocusHighlightOn() |
boolean |
isHighlightOn() |
boolean |
isPressed() |
void |
removeClickCommands(Command<? super Button>... commands) |
protected void |
resetColors() |
protected void |
runClick() |
void |
setButtonCommands(java.util.Map<Button.ButtonAction,java.util.List<Command<? super Button>>> map) |
void |
setColor(com.jme3.math.ColorRGBA color) |
void |
setEnabled(boolean b) |
void |
setFocusColor(com.jme3.math.ColorRGBA color) |
void |
setFocusShadowColor(com.jme3.math.ColorRGBA color) |
void |
setHighlightColor(com.jme3.math.ColorRGBA color) |
void |
setHighlightShadowColor(com.jme3.math.ColorRGBA color) |
protected void |
setPressed(boolean f) |
void |
setShadowColor(com.jme3.math.ColorRGBA color) |
protected void |
showFocus(boolean f) |
protected void |
showHighlight(boolean f) |
java.lang.String |
toString() |
getFont, getFontSize, getIcon, getMaxWidth, getShadowOffset, getText, getTextHAlignment, getTextVAlignment, setFont, setFontSize, setIcon, setMaxWidth, setShadowOffset, setText, setTextHAlignment, setTextVAlignment
addEffect, addMouseListener, getAlpha, getBackground, getBorder, getEffectControl, getEffects, getElementId, getInsets, getInsetsComponent, getPreferredSize, getSize, getStyle, hasEffect, removeEffect, removeMouseListener, runEffect, setAlpha, setAlpha, setBackground, setBorder, setChildAlpha, setEffects, setInsets, setInsetsComponent, setPreferredSize, setSize
attachChild, attachChildAt, breadthFirstTraversal, clone, cloneFields, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, oldDeepClone, read, setLightListRefresh, setLodLevel, setMaterial, setMatParamOverrideRefresh, setModelBound, setParent, setTransformRefresh, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, updateWorldBound, write
addControl, addLight, addMatParamOverride, breadthFirstTraversal, center, checkCulling, clearMatParamOverrides, clone, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalMatParamOverrides, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldMatParamOverrides, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, jmeClone, localToWorld, lookAt, matches, move, move, oldClone, removeControl, removeControl, removeFromParent, removeLight, removeMatParamOverride, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setRequiresUpdates, setShadowMode, setUserData, updateMatParamOverrides, updateWorldLightList, updateWorldTransforms, worldToLocal
public static final java.lang.String ELEMENT_ID
public static final java.lang.String EFFECT_PRESS
public static final java.lang.String EFFECT_RELEASE
public static final java.lang.String EFFECT_CLICK
public static final java.lang.String EFFECT_ACTIVATE
public static final java.lang.String EFFECT_DEACTIVATE
public static final java.lang.String EFFECT_FOCUS
public static final java.lang.String EFFECT_UNFOCUS
public static final java.lang.String EFFECT_ENABLE
public static final java.lang.String EFFECT_DISABLE
public Button(java.lang.String s)
public Button(java.lang.String s, java.lang.String style)
public Button(java.lang.String s, ElementId elementId)
public Button(java.lang.String s, ElementId elementId, java.lang.String style)
protected Button(java.lang.String s, boolean applyStyles, ElementId elementId, java.lang.String style)
public static void initializeDefaultStyles(Attributes attrs)
public void addCommands(Button.ButtonAction a, Command<? super Button>... commands)
public java.util.List<Command<? super Button>> getCommands(Button.ButtonAction a)
@StyleAttribute(value="buttonCommands") public void setButtonCommands(java.util.Map<Button.ButtonAction,java.util.List<Command<? super Button>>> map)
@StyleAttribute(value="color") public void setColor(com.jme3.math.ColorRGBA color)
@StyleAttribute(value="shadowColor", lookupDefault=false) public void setShadowColor(com.jme3.math.ColorRGBA color)
setShadowColor
in class Label
public com.jme3.math.ColorRGBA getShadowColor()
getShadowColor
in class Label
@StyleAttribute(value="highlightColor", lookupDefault=false) public void setHighlightColor(com.jme3.math.ColorRGBA color)
public com.jme3.math.ColorRGBA getHighlightColor()
@StyleAttribute(value="highlightShadowColor", lookupDefault=false) public void setHighlightShadowColor(com.jme3.math.ColorRGBA color)
public com.jme3.math.ColorRGBA getHighlightShadowColor()
@StyleAttribute(value="focusColor", lookupDefault=false) public void setFocusColor(com.jme3.math.ColorRGBA color)
public com.jme3.math.ColorRGBA getFocusColor()
@StyleAttribute(value="focusShadowColor", lookupDefault=false) public void setFocusShadowColor(com.jme3.math.ColorRGBA color)
public com.jme3.math.ColorRGBA getFocusShadowColor()
public void click()
public void setEnabled(boolean b)
public boolean isEnabled()
public boolean isPressed()
public boolean isHighlightOn()
public boolean isFocusHighlightOn()
public boolean isFocused()
protected void showHighlight(boolean f)
protected void showFocus(boolean f)
protected void resetColors()
protected void setPressed(boolean f)
protected void runClick()