|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JComboBox
com.threerings.config.swing.ConfigBox
public class ConfigBox
Allows the user to select a config from a drop-down.
| Nested Class Summary | |
|---|---|
protected class |
ConfigBox.ConfigItem
An item in the configuration list. |
| Nested classes/interfaces inherited from class javax.swing.JComboBox |
|---|
JComboBox.AccessibleJComboBox, JComboBox.KeySelectionManager |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected ConfigGroup<ManagedConfig>[] |
_groups
The configuration groups. |
protected MessageBundle |
_msgs
The message bundle to use for translation. |
protected boolean |
_nullable
Whether or not the null value is selectable. |
| Fields inherited from class javax.swing.JComboBox |
|---|
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ConfigBox(MessageBundle msgs,
ConfigGroup[] groups,
boolean nullable)
Creates a new config box. |
|
ConfigBox(MessageBundle msgs,
ConfigGroup[] groups,
boolean nullable,
String config)
Creates a new config box. |
|
| Method Summary | |
|---|---|
void |
addNotify()
|
void |
configAdded(ConfigEvent<ManagedConfig> event)
Called when a configuration has been added to the group. |
void |
configRemoved(ConfigEvent<ManagedConfig> event)
Called when a configuration has been removed from the group. |
String |
getSelectedConfig()
Returns the path of the selected config. |
void |
removeNotify()
|
void |
setSelectedConfig(String config)
Sets the path of the selected config. |
protected void |
updateModel()
Updates the combo box model and current selection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected MessageBundle _msgs
protected ConfigGroup<ManagedConfig>[] _groups
protected boolean _nullable
| Constructor Detail |
|---|
public ConfigBox(MessageBundle msgs,
ConfigGroup[] groups,
boolean nullable)
public ConfigBox(MessageBundle msgs,
ConfigGroup[] groups,
boolean nullable,
String config)
| Method Detail |
|---|
public void setSelectedConfig(String config)
public String getSelectedConfig()
public void configAdded(ConfigEvent<ManagedConfig> event)
ConfigGroupListener
configAdded in interface ConfigGroupListener<ManagedConfig>public void configRemoved(ConfigEvent<ManagedConfig> event)
ConfigGroupListener
configRemoved in interface ConfigGroupListener<ManagedConfig>public void addNotify()
addNotify in class JComponentpublic void removeNotify()
removeNotify in class JComponentprotected void updateModel()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||