|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
com.threerings.config.tools.BaseConfigEditor
com.threerings.config.tools.ResourceEditor
public class ResourceEditor
Allows editing single configurations stored as resources.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| 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 ChangeBlock |
_block
Indicates that we should ignore any changes, because we're the one effecting them. |
protected JFileChooser |
_chooser
The file chooser for opening and saving config files. |
protected EditorPanel |
_epanel
The editor panel. |
protected JMenuItem |
_export
The file menu items. |
protected JFileChooser |
_exportChooser
The file chooser for opening and saving export files. |
protected File |
_file
The loaded config file. |
protected JMenuItem |
_revert
The file menu items. |
protected JMenuItem |
_save
The file menu items. |
protected JMenuItem |
_saveAs
The file menu items. |
| Fields inherited from class com.threerings.config.tools.BaseConfigEditor |
|---|
_cfgmgr, _colorpos, _eprefs, _fdialog, _find, _findNext, _msgmgr, _msgs, _pdialog, _prefs, _rsrcmgr |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ResourceEditor(MessageManager msgmgr,
ConfigManager cfgmgr,
ColorPository colorpos)
Creates a new resource editor. |
|
ResourceEditor(MessageManager msgmgr,
ConfigManager cfgmgr,
ColorPository colorpos,
String config)
Creates a new resource editor. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent event)
|
void |
configUpdated(ConfigEvent<ManagedConfig> event)
Called when a configuration has been updated. |
protected void |
exportConfig()
Brings up the export dialog. |
ConfigManager |
getConfigManager()
Returns a reference to the configuration manager. |
protected EditorPanel |
getFindEditorPanel()
Returns the editor panel we'll be finding on. |
protected void |
importConfig()
Brings up the import dialog. |
static void |
main(String[] args)
The program entry point. |
protected void |
newConfig(Class<?> clazz)
Creates a new configuration of the specified class. |
protected void |
open()
Brings up the open dialog. |
protected void |
open(File file)
Attempts to open the specified config file. |
void |
removeNotify()
|
protected void |
save()
Brings up the save dialog. |
protected void |
save(File file)
Attempts to save to the specified file. |
protected void |
setConfig(ManagedConfig config,
File file)
Sets the configuration being edited. |
protected boolean |
showCantUndo()
Shows a confirm dialog. |
void |
stateChanged(ChangeEvent event)
|
| Methods inherited from class com.threerings.config.tools.BaseConfigEditor |
|---|
addFindMenu, addNotify, createAction, createAction, createButton, createButton, createEditor, createMenu, createMenuItem, createMenuItem, getColorPository, getLabel, getLabel, getMessageManager, getResourceManager, showFrame |
| Methods inherited from class java.awt.Frame |
|---|
getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
protected JMenuItem _save
protected JMenuItem _saveAs
protected JMenuItem _revert
protected JMenuItem _export
protected JFileChooser _chooser
protected JFileChooser _exportChooser
protected EditorPanel _epanel
protected File _file
protected ChangeBlock _block
| Constructor Detail |
|---|
public ResourceEditor(MessageManager msgmgr,
ConfigManager cfgmgr,
ColorPository colorpos)
public ResourceEditor(MessageManager msgmgr,
ConfigManager cfgmgr,
ColorPository colorpos,
String config)
| Method Detail |
|---|
public static void main(String[] args)
public void stateChanged(ChangeEvent event)
stateChanged in interface ChangeListenerpublic void configUpdated(ConfigEvent<ManagedConfig> event)
ConfigUpdateListener
configUpdated in interface ConfigUpdateListener<ManagedConfig>public void actionPerformed(ActionEvent event)
actionPerformed in interface ActionListeneractionPerformed in class BaseConfigEditorpublic void removeNotify()
removeNotify in class BaseConfigEditorpublic ConfigManager getConfigManager()
EditorContext
getConfigManager in interface EditorContextgetConfigManager in class BaseConfigEditorprotected void newConfig(Class<?> clazz)
protected void open()
protected void open(File file)
protected void save()
protected void save(File file)
protected void importConfig()
protected void exportConfig()
protected void setConfig(ManagedConfig config,
File file)
protected boolean showCantUndo()
protected EditorPanel getFindEditorPanel()
BaseConfigEditor
getFindEditorPanel in class BaseConfigEditor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||