com.threerings.opengl.gui.config
Class ComponentConfig

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.opengl.gui.config.ComponentConfig
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Direct Known Subclasses:
ComponentConfig.ChatOverlay, ComponentConfig.ColorPicker, ComponentConfig.ComboBox, ComponentConfig.Container, ComponentConfig.HTMLView, ComponentConfig.Label, ComponentConfig.List, ComponentConfig.RenderableView, ComponentConfig.ScrollBar, ComponentConfig.ScrollPane, ComponentConfig.Slider, ComponentConfig.Spacer, ComponentConfig.Spinner, ComponentConfig.TabbedPane, ComponentConfig.TextArea, ComponentConfig.TextComponent, ComponentConfig.UserInterface

@EditorTypes(value={ComponentConfig.Button.class,ComponentConfig.ChatOverlay.class,ComponentConfig.CheckBox.class,ComponentConfig.ColorPicker.class,ComponentConfig.ComboBox.class,ComponentConfig.Container.class,ComponentConfig.HTMLView.class,ComponentConfig.Label.class,ComponentConfig.List.class,ComponentConfig.PasswordField.class,ComponentConfig.RenderableView.class,ComponentConfig.ScrollBar.class,ComponentConfig.ScrollPane.class,ComponentConfig.Slider.class,ComponentConfig.Spacer.class,ComponentConfig.Spinner.class,ComponentConfig.StatusLabel.class,ComponentConfig.TabbedPane.class,ComponentConfig.TextArea.class,ComponentConfig.TextEditor.class,ComponentConfig.TextField.class,ComponentConfig.ToggleButton.class,ComponentConfig.UserInterface.class})
public abstract class ComponentConfig
extends DeepObject
implements Exportable

Contains a component configuration.


Nested Class Summary
static class ComponentConfig.Button
          A button.
static class ComponentConfig.ChatOverlay
          Displays chat as an overlay.
static class ComponentConfig.CheckBox
          A check box.
static class ComponentConfig.ColorPicker
          Allows the selection of a color from a colorization class.
static class ComponentConfig.ComboBox
          A combo box.
static class ComponentConfig.Container
          A container.
static class ComponentConfig.HTMLView
          An HTML view.
static class ComponentConfig.Label
          A label.
static class ComponentConfig.List
          A list.
static class ComponentConfig.Orientation
          Available label orientations.
static class ComponentConfig.PasswordField
          A password field.
static class ComponentConfig.RenderableView
          An embedded 3D view.
static class ComponentConfig.ScrollBar
          A scroll bar.
static class ComponentConfig.ScrollPane
          A scroll pane.
static class ComponentConfig.Slider
          A slider.
static class ComponentConfig.Spacer
          A spacer.
static class ComponentConfig.Spinner
           
static class ComponentConfig.StatusLabel
          A status label.
static class ComponentConfig.TabbedPane
          A tabbed pane.
static class ComponentConfig.TextArea
          A text area.
static class ComponentConfig.TextComponent
          Base class for text components.
static class ComponentConfig.TextEditor
          A multi-line text editor.
static class ComponentConfig.TextField
          A text field.
static class ComponentConfig.ToggleButton
          A toggle button.
static class ComponentConfig.UserInterface
          A config-based user interface component.
static class ComponentConfig.ViewModel
          Represents a model to include in a ComponentConfig.RenderableView.
 
Field Summary
 float alpha
          The component alpha value.
 boolean enabled
          Whether or not the component is enabled.
 boolean hoverable
          Whether or not the component is hoverable.
 DimensionConfig preferredSize
          The preferred size, if non-default.
 ConfigReference<StyleConfig> style
          The component's style, if non-default.
 String tag
          The component's tag.
 boolean tooltipRelativeToMouse
          Whether or not the tooltip is relative to the mouse cursor.
 String tooltipText
          The text for the component's tooltip.
 boolean visible
          Whether or not the component is visible.
 
Constructor Summary
ComponentConfig()
           
 
Method Summary
 Component getComponent(GlContext ctx, Scope scope, com.threerings.util.MessageBundle msgs, Component comp)
          Creates or updates a component for this configuration.
 void invalidate()
          Invalidates any cached data.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

enabled

@Editable(weight=1.0,
          hgroup="f")
public boolean enabled
Whether or not the component is enabled.


visible

@Editable(weight=1.0,
          hgroup="f")
public boolean visible
Whether or not the component is visible.


hoverable

@Editable(weight=1.0,
          hgroup="f")
public boolean hoverable
Whether or not the component is hoverable.


tooltipText

@Editable(weight=1.0,
          hgroup="t")
public String tooltipText
The text for the component's tooltip.


tooltipRelativeToMouse

@Editable(weight=1.0,
          hgroup="t")
public boolean tooltipRelativeToMouse
Whether or not the tooltip is relative to the mouse cursor.


alpha

@Editable(min=0.0,
          max=1.0,
          step=0.01,
          weight=1.0,
          hgroup="a")
public float alpha
The component alpha value.


tag

@Editable(weight=1.0,
          hgroup="a")
public String tag
The component's tag.


style

@Editable(weight=1.0,
          nullable=true)
public ConfigReference<StyleConfig> style
The component's style, if non-default.


preferredSize

@Editable(weight=1.0,
          nullable=true)
public DimensionConfig preferredSize
The preferred size, if non-default.

Constructor Detail

ComponentConfig

public ComponentConfig()
Method Detail

getComponent

public Component getComponent(GlContext ctx,
                              Scope scope,
                              com.threerings.util.MessageBundle msgs,
                              Component comp)
Creates or updates a component for this configuration.

Parameters:
scope - the component's expression scope.
comp - an existing component to reuse, if possible.
Returns:
either a reference to the existing component (if reused) or a new component.

invalidate

public void invalidate()
Invalidates any cached data.



Copyright © 2011. All Rights Reserved.