|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Form
a Form represents a way to edit objects through a specialized GUI that provides all save/cancel and optionally apply functionality.
FormValidator| Field Summary | |
|---|---|
static String |
EDIT_PROPERTY_KEY
form components are to use this key when firing PropertyChangeEvents indicating that the form is altered; this way, the Form can listen to changes of the component that are to mark the Form 'dirty' |
| Method Summary | |
|---|---|
void |
addListener(FormListener listener)
|
boolean |
disposeForm(boolean forceWithoutConfirm)
allows to programmatically close the form. |
JComponent |
getButtonContainer()
provides the container that contains the functional buttons of the Form, so that other additional buttons may be added here |
JComponent |
getFormComponent()
|
Container |
getFormContainer()
provides access to the overall window, dialog, frame, internal frame or other that holds the form with the formComponent and all the functional buttons that belong to the form |
FormListener[] |
getFormListeners()
|
FormValidator<?> |
getFormValidator()
|
boolean |
getWarnOnClose()
determines whether a warning is displayed upon cancel if the form is marked as changed (false by default) |
boolean |
isDirty()
determines whether the form is currently considered to be in a 'changed'-mode. |
Object |
performSaveAction()
programmatically performs the action that would commonly be performed upon pressing 'save' on the form. |
boolean |
removeListener(FormListener listener)
|
void |
setWarnOnClose(boolean flag)
if set to true, a warning is displayed when the form is closed w/o saving if it is marked changed |
| Methods inherited from interface java.beans.PropertyChangeListener |
|---|
propertyChange |
| Field Detail |
|---|
static final String EDIT_PROPERTY_KEY
| Method Detail |
|---|
FormValidator<?> getFormValidator()
JComponent getFormComponent()
void addListener(FormListener listener)
boolean removeListener(FormListener listener)
FormListener[] getFormListeners()
boolean getWarnOnClose()
void setWarnOnClose(boolean flag)
Object performSaveAction()
FormValidator.validateForm(Component)
and then call FormValidator.commitFormAction(Component); also this method
resets the isDirty() status if the commit was successful.
boolean disposeForm(boolean forceWithoutConfirm)
forceWithoutConfirm - if true, the form will be disposed no matter what;
if false, a confirmation dialog may appear if the form
is dirty and warnOnClose is true
boolean isDirty()
JComponent getButtonContainer()
Container getFormContainer()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||