|
|||||||||
| 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.JPanel
com.threerings.admin.client.TabbedDSetEditor<E>
public class TabbedDSetEditor<E extends DSet.Entry>
Allows simple editing of DSets within a distributed object and easily groups entries into tabs based on the content of some field.
| Nested Class Summary | |
|---|---|
static interface |
TabbedDSetEditor.AccessorFactory
Defines how DSetEditor data-access plugins should be created. |
static class |
TabbedDSetEditor.EntryGrouper<E extends DSet.Entry>
Used to divide various entires into different groups. |
static class |
TabbedDSetEditor.FieldGrouper<E extends DSet.Entry>
|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| 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 TabbedDSetEditor.AccessorFactory |
_accessorFactory
|
protected String[] |
_editableFields
|
protected HashMap<String,DSetEditor<E>> |
_editors
|
protected Class<?> |
_entryClass
|
protected TabbedDSetEditor.EntryGrouper<E> |
_grouper
|
protected ObjectEditorTable.FieldInterpreter |
_interp
|
protected String |
_setName
|
protected DObject |
_setter
|
protected JTabbedPane |
_tabs
|
| 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 | |
|---|---|
TabbedDSetEditor(DObject setter,
String setName,
Class<?> entryClass,
String[] editableFields,
ObjectEditorTable.FieldInterpreter interp,
String groupField)
Convenience function to make an edittor that groups based on the values of a given field. |
|
TabbedDSetEditor(DObject setter,
String setName,
Class<?> entryClass,
String[] editableFields,
ObjectEditorTable.FieldInterpreter interp,
TabbedDSetEditor.EntryGrouper<E> grouper)
A set of tabs containing DSetEditors grouping entries by the String value stored in a given field of the Entry. |
|
| Method Summary | |
|---|---|
void |
addNotify()
|
void |
attributeChanged(AttributeChangedEvent event)
Called when an attribute changed event has been dispatched on an object. |
protected void |
computeTabs()
|
protected DSetEditor<E> |
createEditor(DObject setter,
String setName,
Class<?> entryClass,
String[] editableFields,
ObjectEditorTable.FieldInterpreter interp,
TabbedDSetEditor.EntryGrouper<E> grouper,
String group)
Creates a DSetEditor for displaying the given group. |
void |
entryAdded(EntryAddedEvent<E> event)
Called when an entry added event has been dispatched on an object. |
void |
entryRemoved(EntryRemovedEvent<E> event)
Called when an entry removed event has been dispatched on an object. |
void |
entryUpdated(EntryUpdatedEvent<E> event)
Called when an entry updated event has been dispatched on an object. |
protected String[] |
getDisplayFields(String group)
Choose which fields to display for the given group. |
void |
removeNotify()
|
void |
setAccessorFactory(TabbedDSetEditor.AccessorFactory accessorFactory)
Assigns the factory that creates data-access plugins for our set our DSetEditors. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final DObject _setter
protected final String _setName
protected final Class<?> _entryClass
protected final String[] _editableFields
protected final ObjectEditorTable.FieldInterpreter _interp
protected final TabbedDSetEditor.EntryGrouper<E extends DSet.Entry> _grouper
protected TabbedDSetEditor.AccessorFactory _accessorFactory
protected JTabbedPane _tabs
protected HashMap<String,DSetEditor<E extends DSet.Entry>> _editors
| Constructor Detail |
|---|
public TabbedDSetEditor(DObject setter,
String setName,
Class<?> entryClass,
String[] editableFields,
ObjectEditorTable.FieldInterpreter interp,
String groupField)
public TabbedDSetEditor(DObject setter,
String setName,
Class<?> entryClass,
String[] editableFields,
ObjectEditorTable.FieldInterpreter interp,
TabbedDSetEditor.EntryGrouper<E> grouper)
| Method Detail |
|---|
public void setAccessorFactory(TabbedDSetEditor.AccessorFactory accessorFactory)
protected void computeTabs()
protected DSetEditor<E> createEditor(DObject setter,
String setName,
Class<?> entryClass,
String[] editableFields,
ObjectEditorTable.FieldInterpreter interp,
TabbedDSetEditor.EntryGrouper<E> grouper,
String group)
protected String[] getDisplayFields(String group)
public void addNotify()
addNotify in class JComponentpublic void removeNotify()
removeNotify in class JComponentpublic void attributeChanged(AttributeChangedEvent event)
AttributeChangeListener
attributeChanged in interface AttributeChangeListenerevent - The event that was dispatched on the object.public void entryAdded(EntryAddedEvent<E> event)
SetListener
entryAdded in interface SetListener<E extends DSet.Entry>event - The event that was dispatched on the object.public void entryRemoved(EntryRemovedEvent<E> event)
SetListener
entryRemoved in interface SetListener<E extends DSet.Entry>event - The event that was dispatched on the object.public void entryUpdated(EntryUpdatedEvent<E> event)
SetListener
entryUpdated in interface SetListener<E extends DSet.Entry>event - The event that was dispatched on the object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||