|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.util.DeepObject
com.threerings.opengl.gui.config.ComponentConfig
@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 ComponentConfigContains 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 | |
|---|---|
protected void |
configure(GlContext ctx,
Scope scope,
MessageBundle msgs,
Component comp)
Configures the specified component. |
protected static Class<?> |
getClass(Object object)
Returns the class of the specified object, or null if the reference is null. |
Component |
getComponent(GlContext ctx,
Scope scope,
MessageBundle msgs,
Component comp)
Creates or updates a component for this configuration. |
protected static String |
getMessage(MessageBundle msgs,
String text)
Returns the translation for the supplied text if one exists. |
void |
invalidate()
Invalidates any cached data. |
protected abstract Component |
maybeRecreate(GlContext ctx,
Scope scope,
MessageBundle msgs,
Component comp)
Recreates the component if the supplied component doesn't match the configuration. |
| Methods inherited from class com.threerings.util.DeepObject |
|---|
clone, copy, copy, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@Editable(weight=1.0,
hgroup="f")
public boolean enabled
@Editable(weight=1.0,
hgroup="f")
public boolean visible
@Editable(weight=1.0,
hgroup="f")
public boolean hoverable
@Editable(weight=1.0,
hgroup="t")
public String tooltipText
@Editable(weight=1.0,
hgroup="t")
public boolean tooltipRelativeToMouse
@Editable(min=0.0,
max=1.0,
step=0.01,
weight=1.0,
hgroup="a")
public float alpha
@Editable(weight=1.0,
hgroup="a")
public String tag
@Editable(weight=1.0,
nullable=true)
public ConfigReference<StyleConfig> style
@Editable(weight=1.0,
nullable=true)
public DimensionConfig preferredSize
| Constructor Detail |
|---|
public ComponentConfig()
| Method Detail |
|---|
public Component getComponent(GlContext ctx,
Scope scope,
MessageBundle msgs,
Component comp)
scope - the component's expression scope.comp - an existing component to reuse, if possible.
public void invalidate()
protected abstract Component maybeRecreate(GlContext ctx,
Scope scope,
MessageBundle msgs,
Component comp)
protected void configure(GlContext ctx,
Scope scope,
MessageBundle msgs,
Component comp)
protected static Class<?> getClass(Object object)
null if the reference is null.
protected static String getMessage(MessageBundle msgs,
String text)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||