|
||||||||||
| 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
edu.rice.cs.util.swing.SwingFrame
edu.rice.cs.drjava.ui.config.ConfigFrame
public class ConfigFrame
The frame for setting Configuration options on the fly
| Nested Class Summary | |
|---|---|
private class |
ConfigFrame.PanelTreeNode
Private class to handle rendering of tree nodes, each of which corresponds to a ConfigPanel. |
private class |
ConfigFrame.PanelTreeSelectionListener
|
| 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 |
| 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 | |
|---|---|
ConfigFrame(MainFrame frame)
Sets up the frame and displays it. |
|
| Method Summary | ||
|---|---|---|
private ConfigFrame.PanelTreeNode |
_createPanel(String t)
Creates an individual panel, adds it to the JTree and the list of panels, and returns the tree node. |
|
private ConfigFrame.PanelTreeNode |
_createPanel(String t,
ConfigFrame.PanelTreeNode parent)
Creates an individual panel, adds it to the JTree and the list of panels, and returns the tree node. |
|
private void |
_createPanels()
Creates all of the panels contained within the frame. |
|
private void |
_displayPanel(ConfigPanel cf)
Sets the given ConfigPanel as the visible panel. |
|
private File |
_getWorkDir()
Returns the current master working directory, or the user's current directory if none is set. |
|
private void |
_initTree()
Creates the JTree to display preferences categories. |
|
private void |
_setupColorPanel(ConfigPanel panel)
Adds all of the components for the Color panel of the preferences window. |
|
private void |
_setupCompilerPanel(ConfigPanel panel)
Adds all of the components for the Compiler Options Panel of the preferences window |
|
private void |
_setupDebugPanel(ConfigPanel panel)
Add all of the components for the Debugger panel of the preferences window. |
|
private void |
_setupDisplayPanel(ConfigPanel panel)
Add all of the components for the Display Options panel of the preferences window. |
|
private void |
_setupFileTypesPanel(ConfigPanel panel)
Adds all of the components for the file types panel of the preferences window. |
|
private void |
_setupFontPanel(ConfigPanel panel)
Add all of the components for the Font panel of the preferences window. |
|
private void |
_setupInteractionsPanel(ConfigPanel panel)
Add all of the components for the Interactions panel of the preferences window. |
|
private void |
_setupJavadocPanel(ConfigPanel panel)
Add all of the components for the Javadoc panel of the preferences window. |
|
private void |
_setupJUnitPanel(ConfigPanel panel)
Add all of the components for the JUnit panel of the preferences window. |
|
private void |
_setupJVMsPanel(ConfigPanel panel)
Adds all of the components for the JVMs panel of the preferences window. |
|
private void |
_setupKeyBindingsPanel(ConfigPanel panel)
Adds all of the components for the Key Bindings panel of the preferences window. |
|
private void |
_setupMiscPanel(ConfigPanel panel)
Adds all of the components for the Miscellaneous panel of the preferences window. |
|
private void |
_setupNotificationsPanel(ConfigPanel panel)
Adds all of the components for the Prompts panel of the preferences window. |
|
private void |
_setupPositionsPanel(ConfigPanel panel)
Add all of the components for the Positions panel of the preferences window. |
|
private void |
_setupResourceLocPanel(ConfigPanel panel)
Add all of the components for the Resource Locations panel of the preferences window. |
|
|
addOptionComponent(ConfigPanel panel,
OptionComponent<X,C> oc)
|
|
boolean |
apply()
Call the update method to propagate down the tree, parsing input values into their config options. |
|
void |
cancel()
Resets the frame and hides it. |
|
private void |
disableChangeListeners()
|
|
private void |
enableChangeListeners()
|
|
protected BooleanOptionComponent |
newBooleanOptionComponent(BooleanOption o)
|
|
protected BooleanOptionComponent |
newBooleanOptionComponent(BooleanOption o,
boolean left)
|
|
protected ColorOptionComponent |
newColorOptionComponent(ColorOption o)
|
|
protected ColorOptionComponent |
newColorOptionComponent(ColorOption o,
boolean isBackground)
|
|
protected ColorOptionComponent |
newColorOptionComponent(ColorOption o,
boolean isBackground,
boolean isBold)
|
|
protected DirectoryOptionComponent |
newDirectoryOptionComponent(FileOption o,
DirectoryChooser c)
|
|
protected FileOptionComponent |
newFileOptionComponent(FileOption o,
FileSelectorComponent c)
|
|
protected FileOptionComponent |
newFileOptionComponent(FileOption o,
JFileChooser c)
|
|
protected FontOptionComponent |
newFontOptionComponent(FontOption o)
|
|
protected ForcedChoiceOptionComponent |
newForcedChoiceOptionComponent(ForcedChoiceOption o)
|
|
protected IntegerOptionComponent |
newIntegerOptionComponent(IntegerOption o)
|
|
protected StringOptionComponent |
newStringOptionComponent(StringOption o)
|
|
protected VectorFileOptionComponent |
newVectorFileOptionComponent(VectorOption<File> o,
boolean mbe)
|
|
protected VectorStringOptionComponent |
newVectorStringOptionComponent(VectorOption<String> o,
boolean mbe)
|
|
void |
resetToCurrent()
Resets the field of each option in the Preferences window to its actual stored value. |
|
boolean |
saveSettings()
Write the configured option values to disk. |
|
void |
setUp()
Performs deferred initialization. |
|
void |
setVisible(boolean vis)
Validates before changing visibility. |
|
| Methods inherited from class edu.rice.cs.util.swing.SwingFrame |
|---|
duringInit, initDone |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, 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 |
|---|
private static final int FRAME_WIDTH
private static final int FRAME_HEIGHT
private final MainFrame _mainFrame
private final JTree _tree
private final DefaultTreeModel _treeModel
private final ConfigFrame.PanelTreeNode _rootNode
private final JButton _okButton
private final JButton _applyButton
private final JButton _cancelButton
private final JPanel _mainPanel
private final JFileChooser _fileOptionChooser
private final JFileChooser _browserChooser
private final JFileChooser _jarChooser
private final DirectoryChooser _dirChooser
private final ConfigOptionListeners.RequiresInteractionsRestartListener<Boolean> _junitLocationEnabledListener
private final ConfigOptionListeners.RequiresInteractionsRestartListener<File> _junitLocationListener
private final ConfigOptionListeners.RequiresInteractionsRestartListener<String> _concJUnitChecksEnabledListener
private final ConfigOptionListeners.RequiresInteractionsRestartListener<File> _rtConcJUnitLocationListener
private StringOptionComponent javadocCustomParams
protected final String SEPS
private OptionComponent.ChangeListener _changeListener
protected final Runnable1<WindowEvent> CANCEL
| Constructor Detail |
|---|
public ConfigFrame(MainFrame frame)
| Method Detail |
|---|
public void setUp()
private void enableChangeListeners()
private void disableChangeListeners()
private File _getWorkDir()
public boolean apply()
public void resetToCurrent()
public void cancel()
public void setVisible(boolean vis)
setVisible in class Windowvis - true if frame should be shown, false if it should be hidden.
public boolean saveSettings()
throws IOException
IOExceptionprivate void _displayPanel(ConfigPanel cf)
private void _initTree()
private ConfigFrame.PanelTreeNode _createPanel(String t,
ConfigFrame.PanelTreeNode parent)
t - the title of this panelparent - the parent tree node
private ConfigFrame.PanelTreeNode _createPanel(String t)
t - the title of this panel
private void _createPanels()
public <X,C extends JComponent> void addOptionComponent(ConfigPanel panel,
OptionComponent<X,C> oc)
protected FileOptionComponent newFileOptionComponent(FileOption o,
JFileChooser c)
protected FileOptionComponent newFileOptionComponent(FileOption o,
FileSelectorComponent c)
protected StringOptionComponent newStringOptionComponent(StringOption o)
protected BooleanOptionComponent newBooleanOptionComponent(BooleanOption o)
protected BooleanOptionComponent newBooleanOptionComponent(BooleanOption o,
boolean left)
protected VectorFileOptionComponent newVectorFileOptionComponent(VectorOption<File> o,
boolean mbe)
protected VectorStringOptionComponent newVectorStringOptionComponent(VectorOption<String> o,
boolean mbe)
protected ForcedChoiceOptionComponent newForcedChoiceOptionComponent(ForcedChoiceOption o)
protected IntegerOptionComponent newIntegerOptionComponent(IntegerOption o)
protected FontOptionComponent newFontOptionComponent(FontOption o)
protected ColorOptionComponent newColorOptionComponent(ColorOption o,
boolean isBackground,
boolean isBold)
protected ColorOptionComponent newColorOptionComponent(ColorOption o,
boolean isBackground)
protected ColorOptionComponent newColorOptionComponent(ColorOption o)
protected DirectoryOptionComponent newDirectoryOptionComponent(FileOption o,
DirectoryChooser c)
private void _setupResourceLocPanel(ConfigPanel panel)
private void _setupDisplayPanel(ConfigPanel panel)
private void _setupFontPanel(ConfigPanel panel)
private void _setupColorPanel(ConfigPanel panel)
private void _setupPositionsPanel(ConfigPanel panel)
private void _setupKeyBindingsPanel(ConfigPanel panel)
private void _setupDebugPanel(ConfigPanel panel)
private void _setupJavadocPanel(ConfigPanel panel)
private void _setupNotificationsPanel(ConfigPanel panel)
private void _setupMiscPanel(ConfigPanel panel)
private void _setupJVMsPanel(ConfigPanel panel)
private void _setupFileTypesPanel(ConfigPanel panel)
private void _setupCompilerPanel(ConfigPanel panel)
private void _setupInteractionsPanel(ConfigPanel panel)
private void _setupJUnitPanel(ConfigPanel panel)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||