com.threerings.opengl.gui
Class CheckBox

java.lang.Object
  extended by com.threerings.opengl.gui.Component
      extended by com.threerings.opengl.gui.TextComponent
          extended by com.threerings.opengl.gui.Label
              extended by com.threerings.opengl.gui.Button
                  extended by com.threerings.opengl.gui.ToggleButton
                      extended by com.threerings.opengl.gui.CheckBox
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, UIConstants

public class CheckBox
extends ToggleButton

Displays a label with a check-box button next to it.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.opengl.gui.Label
Label.Fit
 
Field Summary
protected  Icon[] _icons
           
 
Fields inherited from class com.threerings.opengl.gui.ToggleButton
_selected, DISSELECTED, HOVER_SELECTED, SELECTED, STATE_COUNT, STATE_PCLASSES
 
Fields inherited from class com.threerings.opengl.gui.Button
_action, _argument, _feedbackSounds, _pressed, _releasedWhen, DOWN
 
Fields inherited from class com.threerings.opengl.gui.Label
_label
 
Fields inherited from class com.threerings.opengl.gui.TextComponent
_effcols, _effsizes, _haligns, _lineSpacings, _teffects, _textfacts, _valigns
 
Fields inherited from class com.threerings.opengl.gui.Component
_alpha, _backgrounds, _borders, _colors, _ctx, _cursor, _enabled, _height, _hover, _hoverable, _insets, _listeners, _parent, _preferredSize, _properties, _rect, _styleConfigs, _tipmouse, _tiptext, _tooltipStyle, _transferHandler, _valid, _visible, _width, _x, _y, 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
CheckBox(GlContext ctx, String label)
           
 
Method Summary
protected  String getDefaultStyleConfig()
          Returns the name of the default config to be used for all instances of this component.
protected  void stateDidChange()
          Called when the component's state has changed.
protected  void updateFromStyleConfig(int state, StyleConfig.Original config)
          Updates from the resolved style config.
 
Methods inherited from class com.threerings.opengl.gui.ToggleButton
fireAction, getFallbackState, getState, getStateCount, getStatePseudoClass, isSelected, setSelected
 
Methods inherited from class com.threerings.opengl.gui.Button
dispatchEvent, doClick, getAction, getArgument, getFeedbackSound, playFeedbackSound, setAction, setArgument
 
Methods inherited from class com.threerings.opengl.gui.Label
computePreferredSize, getFit, getIcon, getIconTextGap, getLabelRenderer, getText, layout, renderComponent, setFit, setIcon, setIconTextGap, setOrientation, setPreferredWidth, setText, setTextRotation
 
Methods inherited from class com.threerings.opengl.gui.TextComponent
getEffectColor, getEffectSize, getHorizontalAlignment, getLabelRendererConfig, getLineSpacing, getTextEffect, getTextFactory, getTextFactory, getVerticalAlignment
 
Methods inherited from class com.threerings.opengl.gui.Component
acceptsFocus, addListener, boundsToString, changeCursor, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, createTooltipComponent, emitEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFirstDescendantFocus, getFocusTarget, getHeight, getHitComponent, getInsets, getLastDescendantFocus, getNextFocus, getParent, getPreferredSize, getPreviousFocus, getProperty, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getWindow, getX, getY, hasFocus, intersectScissor, invalidate, isAdded, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, renderBackground, renderBorder, requestFocus, scrollRectToVisible, scrollRectToVisible, setAlpha, setBackground, setBounds, setCursor, setEnabled, setHoverable, setLocation, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible, updateCursor, updateFromStyleConfig, validate, wasAdded, wasRemoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_icons

protected Icon[] _icons
Constructor Detail

CheckBox

public CheckBox(GlContext ctx,
                String label)
Method Detail

getDefaultStyleConfig

protected String getDefaultStyleConfig()
Description copied from class: Component
Returns the name of the default config to be used for all instances of this component. Derived classes will likely want to override this method and set up a default config for their type of component.

Overrides:
getDefaultStyleConfig in class Button

updateFromStyleConfig

protected void updateFromStyleConfig(int state,
                                     StyleConfig.Original config)
Description copied from class: Component
Updates from the resolved style config.

Overrides:
updateFromStyleConfig in class Button

stateDidChange

protected void stateDidChange()
Description copied from class: Component
Called when the component's state has changed.

Overrides:
stateDidChange in class Component