|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.Component
com.threerings.opengl.gui.TextComponent
com.threerings.opengl.gui.Label
com.threerings.opengl.gui.Button
com.threerings.opengl.gui.ToggleButton
public class ToggleButton
Like a Button except that it toggles between two states
(selected and normal) when clicked.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.opengl.gui.Label |
|---|
Label.Fit |
| Field Summary | |
|---|---|
static int |
DISSELECTED
Indicates that this button is in the selected state and is disabled. |
static int |
HOVER_SELECTED
Indicates that this button is in the selected state and hovered. |
static int |
SELECTED
Indicates that this button is in the selected state. |
| Fields inherited from class com.threerings.opengl.gui.Button |
|---|
DOWN |
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
DEFAULT, DISABLED, HOVER |
| Fields inherited from interface com.threerings.opengl.gui.UIConstants |
|---|
BOTTOM, CENTER, DEFAULT_SIZE, DEFAULT_SPACING, GLOW, HORIZONTAL, LEFT, NORMAL, OUTLINE, OVERLAPPING, PLAIN, RIGHT, SHADOW, TOP, VERTICAL |
| Constructor Summary | |
|---|---|
ToggleButton(GlContext ctx,
Icon icon,
String action)
Creates a button with the specified icon and action. |
|
ToggleButton(GlContext ctx,
String text)
Creates a button with the specified textual label. |
|
ToggleButton(GlContext ctx,
String text,
String action)
Creates a button with the specified label and action. |
|
| Method Summary | |
|---|---|
int |
getState()
Returns the state of this component, either Component.DEFAULT or Component.DISABLED. |
boolean |
isSelected()
Returns whether or not this button is in the selected state. |
void |
setSelected(boolean selected)
Configures the selected state of this button. |
| Methods inherited from class com.threerings.opengl.gui.Button |
|---|
dispatchEvent, doClick, getAction, getArgument, getFeedbackSound, setAction, setArgument |
| Methods inherited from class com.threerings.opengl.gui.Label |
|---|
getFit, getIcon, getIconTextGap, getLabelRenderer, getText, setFit, setIcon, setIconTextGap, setOrientation, setPreferredWidth, setText, setTextRotation |
| Methods inherited from class com.threerings.opengl.gui.TextComponent |
|---|
getEffectColor, getEffectSize, getHorizontalAlignment, getLineSpacing, getTextEffect, getTextFactory, getVerticalAlignment |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SELECTED
public static final int HOVER_SELECTED
public static final int DISSELECTED
| Constructor Detail |
|---|
public ToggleButton(GlContext ctx,
String text)
public ToggleButton(GlContext ctx,
String text,
String action)
ActionEvent when the button
changes state.
public ToggleButton(GlContext ctx,
Icon icon,
String action)
ActionEvent when the button
changes state.
| Method Detail |
|---|
public boolean isSelected()
public void setSelected(boolean selected)
public int getState()
ComponentComponent.DEFAULT or Component.DISABLED.
getState in class Button
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||