|
|||||||||||
| 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
beowulf.gui.JNode.PropertiesWindow
This class is a specialized JFrame and will display all relevant properties
of a JNode when the "show properties" option in a JNode's popup menu is
selected. The indicated properties can also be changed from within this
window. Whether or not a property is 'relevant' is determined by the code
in .setupFields(). If a subclass of JNode wishes to add more fields to this
list, the subclass should also contain an inner class definition of a
subclass of the PropertiesWindow (mirroring the JNode's architecture). The
subclass should override the .setupFields() method in PropertiesWindow (see
that method for details). All of the other work will be taken care of.
Only integers, booleans, Strings, and doubles can currently be shown/edited
in the PropertiesWindow class.
The overridden version of .setupFields() must
| Nested Class Summary |
| 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 | |
protected Method[] |
accessors
Holds a list of accessors for fields that should be visible in the properties window. |
static String |
BOOL_TYPE
A string used to indicate that a field is of type 'boolean'. |
protected static String |
CANCEL_BUTTON_TEXT
Indicates the Cancel button was pressed. |
static String |
DOUBLE_TYPE
A string used to indicate that a field is of type 'double'. |
protected JComponent[] |
fieldEntrys
Holds a list of JComponents used for displaying current values of fields to be modified, and for receiving input to modify those same fields. |
protected String[] |
fieldNames
Holds a list of names of fields that will appear in the properties window. |
protected String[] |
fieldTypes
Holds a list of string indicating the type of each field. |
static String |
INT_TYPE
A string used to indicate that a field is of type 'int'. |
protected Method[] |
modifiers
Holds a list of modifiers for fields that should be visible in the properties window. |
protected boolean |
neverShownBefore
Holds a flag indicating whether or not this window has been shown before. |
protected static String |
OK_BUTTON_TEXT
Indicates the Ok button was pressed. |
static String |
STRING_TYPE
A string used to indicate that a field is of type 'String'. |
| 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 | |
JNode.PropertiesWindow()
Basic constructor used to do the initial setup. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent ae)
|
protected void |
cancelButtonPressed()
If the cancel button is pressed, this method will be called and the window will simply hide itself, and save none of the values. |
protected JComponent |
makeBottomPanel()
Returns the JComponent holding the ok and cancel buttons. |
protected JComponent |
makeCenterPanel()
This method simply creates a panel of input/output components for all requested fields. |
protected void |
okButtonPressed()
If the ok button is pressed, this method will be called and the window will hide itself after attempting to set the values of all of the fields listed in the window. |
protected void |
setupFields()
This method is called from the constructor only and should be overridden by all subclasses of this class. |
void |
show()
|
| 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 |
protected static final String OK_BUTTON_TEXT
protected static final String CANCEL_BUTTON_TEXT
public static final String INT_TYPE
public static final String STRING_TYPE
public static final String BOOL_TYPE
public static final String DOUBLE_TYPE
protected Method[] accessors
protected Method[] modifiers
protected String[] fieldNames
protected String[] fieldTypes
protected JComponent[] fieldEntrys
protected boolean neverShownBefore
| Constructor Detail |
public JNode.PropertiesWindow()
| Method Detail |
protected void setupFields()
protected JComponent makeCenterPanel()
protected JComponent makeBottomPanel()
public void show()
public void actionPerformed(ActionEvent ae)
actionPerformed in interface ActionListenerprotected void cancelButtonPressed()
protected void okButtonPressed()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||