com.threerings.opengl.gui
Class Spinner

java.lang.Object
  extended by com.threerings.opengl.gui.Component
      extended by com.threerings.opengl.gui.Container
          extended by com.threerings.opengl.gui.Spinner
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, UIConstants

public class Spinner
extends Container
implements UIConstants

Displays a value with little next and previous buttons.


Field Summary
 
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
Spinner(GlContext ctx)
          Creates a spinner with a default Number spinner model with no minimum or maximum value, stepSize equal to 1, and an initial value of 0.
Spinner(GlContext ctx, SpinnerModel model)
          Creates a spinner with the specified spinner model.
 
Method Summary
 String getAction()
          Get the action of this spinner.
 SpinnerModel getModel()
          Get the current model.
 void setAction(String action)
          Set the action that will be fired when the state of this spinner changes, the argument will be the current value of the model.
 void setEditorStyleConfig(ConfigReference<StyleConfig> ref)
          Configures the style of the editor.
 void setEnabled(boolean enabled)
          Sets this components enabled state.
 void setModel(SpinnerModel newModel)
          Set a new model.
 void setNextStyleConfig(ConfigReference<StyleConfig> ref)
          Configures the style of the next button.
 void setPreviousStyleConfig(ConfigReference<StyleConfig> ref)
          Configures the style of the previous button.
 void setStyleConfig(String name)
          Sets the style configuration.
 
Methods inherited from class com.threerings.opengl.gui.Container
add, add, add, add, getComponent, getComponentCount, getComponentIndex, getHitComponent, getLayoutManager, remove, remove, removeAll, replace, setAlpha, setHoverable, setLayoutManager, validate
 
Methods inherited from class com.threerings.opengl.gui.Component
acceptsFocus, addListener, boundsToString, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, dispatchEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFocusTarget, getHeight, getInsets, getParent, getPreferredSize, getProperty, getState, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getX, getY, hasFocus, invalidate, isAdded, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, requestFocus, scrollRectToVisible, setBackground, setBounds, setCursor, setLocation, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Spinner

public Spinner(GlContext ctx)
Creates a spinner with a default Number spinner model with no minimum or maximum value, stepSize equal to 1, and an initial value of 0.


Spinner

public Spinner(GlContext ctx,
               SpinnerModel model)
Creates a spinner with the specified spinner model.

Method Detail

setModel

public void setModel(SpinnerModel newModel)
Set a new model.


getModel

public SpinnerModel getModel()
Get the current model.


setAction

public void setAction(String action)
Set the action that will be fired when the state of this spinner changes, the argument will be the current value of the model.


getAction

public String getAction()
Get the action of this spinner.


setEnabled

public void setEnabled(boolean enabled)
Description copied from class: Component
Sets this components enabled state. A component that is not enabled should not respond to user interaction and should render itself in such a way as not to afford user interaction.

Overrides:
setEnabled in class Container

setStyleConfig

public void setStyleConfig(String name)
Description copied from class: Component
Sets the style configuration.

Overrides:
setStyleConfig in class Component

setEditorStyleConfig

public void setEditorStyleConfig(ConfigReference<StyleConfig> ref)
Configures the style of the editor.


setNextStyleConfig

public void setNextStyleConfig(ConfigReference<StyleConfig> ref)
Configures the style of the next button.


setPreviousStyleConfig

public void setPreviousStyleConfig(ConfigReference<StyleConfig> ref)
Configures the style of the previous button.



Copyright © 2011. All Rights Reserved.