|
Preferences Editor | ||||||||||
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
de.jppietsch.gui.MainWindow
de.jppietsch.prefedit.PrefEditWindow
The Preferences Editor window contains a tree view to the preferences nodes on the left and a table with the selected node's entries on the right.
Nested Class Summary |
Nested classes inherited from class de.jppietsch.gui.MainWindow |
MainWindow.ExitAction |
Nested classes inherited from class javax.swing.JFrame |
JFrame.AccessibleJFrame |
Nested classes inherited from class java.awt.Frame |
Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
private RscAction |
copyAction
An action to copy the currently selected preferences node or preference to the clipboard. |
private RscAction |
cutAction
An action to cut the currently selected preferences node or preference and put it into the clipboard. |
private RscAction |
exportAction
An action to export a preferences node to an XML file. |
private RscAction |
importAction
An action to import a preferences node from an XML file. |
private RscAction |
newKeyAction
An action to create a new key and add it to the current node. |
private RscAction |
newNodeAction
An action to create a new node and add it to the current node. |
private RscAction |
pasteAction
An action to paste the contents of the clipboard to currently selected preferences node. |
private boolean |
recentTableFocus
Flag: "table and not tree had the focus most recently" |
private JTable |
table
A table view to the currently selected preference node's keys and values. |
private PreferencesTableModel |
tableModel
A table model for the currently selected preference node. |
private JTree |
tree
A tree view to the preferences. |
private DefaultTreeModel |
treeModel
This window's preferences tree model. |
Fields inherited from class de.jppietsch.gui.MainWindow |
EXIT, FILE, TITLE |
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.Window |
|
Fields inherited from class java.awt.Container |
|
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 | |
PrefEditWindow()
Constructs this window and fills it with the GUI components. |
Method Summary | |
private void |
copy()
Copies the selected preferences node or preference to the clipboard. |
protected JMenu |
createFileMenu(RscBundle aBundle)
Adds some additional actions to the file menu. |
private void |
cut()
Cuts the selected preferences node or preference to the clipboard. |
private void |
exportPreferences()
Exports preferences from the selected preferences node to an XML file. |
private void |
importPreferences()
Imports preferences from an XML file to the selected preferences node. |
private void |
initAction(JMenu aMenu,
RscAction anAction)
Adds the given action to the menu and the toolbar and disables it initially. |
private void |
newKey()
Adds a new key to currently selected node. |
private void |
newNode()
Adds a new subnode to currently selected node. |
private void |
paste()
Pastes the contents of the clipboard to the selected preferences node. |
private void |
select(ListSelectionEvent anEvent)
Called when the table selection changes. |
private void |
select(TreeSelectionEvent anEvent)
Called when the tree selection changes. |
private String |
selectedKey()
Returns the currently selected preference key. |
private PreferencesTreeNode |
selectedNode()
Description of the Method |
private Preferences |
selectedPrefs()
Returns the currently selected preferences node. |
private void |
tableFocusGained()
Called when the table receives the keyboard focus. |
private void |
treeFocusGained()
Called when the tree receives the keyboard focus. |
private void |
updateSelection()
Updates the selection of some actions of which the state depends on tree node or table row selections. |
Methods inherited from class de.jppietsch.gui.MainWindow |
addMenu, addTool, exit, processWindowEvent |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
private final DefaultTreeModel treeModel
private final JTable table
private final JTree tree
private final PreferencesTableModel tableModel
private RscAction importAction
private RscAction exportAction
private RscAction newKeyAction
private RscAction cutAction
private RscAction copyAction
private RscAction pasteAction
private RscAction newNodeAction
private boolean recentTableFocus
Constructor Detail |
public PrefEditWindow() throws BackingStoreException
BackingStoreException
- If something goes wrong.Method Detail |
protected JMenu createFileMenu(RscBundle aBundle)
createFileMenu
in class MainWindow
aBundle
- Description of Parameter
private void select(TreeSelectionEvent anEvent)
anEvent
- contains the new tree selection.private void select(ListSelectionEvent anEvent)
anEvent
- contains the new table selection.private void tableFocusGained()
private void treeFocusGained()
private void updateSelection()
private void importPreferences()
private void exportPreferences()
private void newKey()
private void cut()
private void copy()
private void paste()
private void newNode()
private PreferencesTreeNode selectedNode()
private Preferences selectedPrefs()
private String selectedKey() throws BackingStoreException
BackingStoreException
- If something goes wrong.private void initAction(JMenu aMenu, RscAction anAction)
aMenu
- to which the action is added.anAction
- is added to menu and toolbar and disabled.
|
Preferences Editor | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |