stella.jview
Class JElementEdit
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
jview.AbstractDisplayable
stella.jview.JElementDisplay
stella.jview.JElementEdit
- All Implemented Interfaces:
- ActionListener, Cloneable, EventListener, Displayable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying
public class JElementEdit
- extends JElementDisplay
An element editor provides a GUI that allows easy editing of
ElementHelper instances. It extends the JElementDisplay in
a sense that it provides a panel ready to put into an input dialog.
Additionally to the parent class, it shows two buttons to confirm all
inputs and a cancel button that denies all changes, which does not mean
that it can undo changes in the variables confirmed with return in
text-fields or by entering lists, provided by buttons. It merely allows
the user to change some/all text-fields within the component (no return
pressed) and then update all fields together with a click on the okay
button.
|
Field Summary |
private JButton |
abort
The cancel button. |
private static String |
DEFCANCEL
The default string to display on the cancel button. |
private static String |
DEFOK
The default string to display on the okay-button. |
static String |
KEY_CANCEL
The string to display on the cancel button. |
static String |
KEY_OK
The string to display on the confirmation button. |
private Object |
lock
An object to be notified on button events. |
private JButton |
okay
The okay button. |
|
Constructor Summary |
JElementEdit(Map prop)
Constructs a new element editor. |
| Methods inherited from class util.PropertyResources |
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from interface util.PropertySupplying |
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
KEY_OK
public static final String KEY_OK
- The string to display on the confirmation button.
- See Also:
- Constant Field Values
KEY_CANCEL
public static final String KEY_CANCEL
- The string to display on the cancel button.
- See Also:
- Constant Field Values
DEFOK
private static final String DEFOK
- The default string to display on the okay-button.
- See Also:
- Constant Field Values
DEFCANCEL
private static final String DEFCANCEL
- The default string to display on the cancel button.
- See Also:
- Constant Field Values
okay
private JButton okay
- The okay button.
abort
private JButton abort
- The cancel button.
lock
private Object lock
- An object to be notified on button events.
JElementEdit
public JElementEdit(Map prop)
- Constructs a new element editor. Prior to using it, also prior to
displaying it the
UserAdjustable must be assigned
to it.
registerNotification
public void registerNotification(Object notify)
- Assigns a notification object to this editor. This object is notified
if the user presses the okay or cancel button. If called with a
null-argument, notifiaction is turned off.
getRepresentation
public Component getRepresentation()
- Delivers a panel consiting of the panel delivered by the parent
component plus two buttons. Pressing the button updates all fields or
disregards all changes not already confirmed. An object may be
registered that is notified on button presses.
- Specified by:
getRepresentation in interface Displayable- Overrides:
getRepresentation in class JElementDisplay
actionPerformed
public void actionPerformed(ActionEvent ae)
- Catches action events on the okay and cancel button. If okay was pressed
we validate all fields.
- Specified by:
actionPerformed in interface ActionListener- Overrides:
actionPerformed in class JElementDisplay