|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.richclient.form.FormGuard
public class FormGuard
Actually enables/disables registered 'guarded' objects based on the state of a
ValidatingFormModel.
One instance of this FormGuard supports multiple guarded objects on one formModel. Each guarded object can
specify upon which state of the formModel it wants to be enabled:
| Field Summary | |
|---|---|
static int |
FORMERROR_GUARDED
Guard-registration mask-pattern indicating enabled() will be set only if the formmodel is both enabled and has no errors. |
static int |
LIKE_COMMITCOMMAND
Guard-registration mask-pattern indicating enabled() will be set just like is the case for the commit command. |
static int |
LIKE_NEWFORMOBJCOMMAND
Guard-registration mask-pattern indicating enabled() will be set just like is the case for the new-form command. |
static int |
LIKE_REVERTCOMMAND
Guard-registration mask-pattern indicating enabled() will be set just like is the case for the revert command. |
static int |
ON_ENABLED
Guard-registration mask-bit indicating enabled() will be set only if the formmodel is enabled. |
static int |
ON_ISDIRTY
Guard-registration mask-bit indicating enabled() will be set only if the formmodel has changes (is dirty). |
static int |
ON_NOERRORS
Guard-registration mask-bit indicating enabled() will be set only if the formmodel has no errors. |
| Constructor Summary | |
|---|---|
FormGuard(ValidatingFormModel formModel)
Creates the FormGuard monitoring the passed formModel. |
|
FormGuard(ValidatingFormModel formModel,
Guarded guarded)
Creates the FormGuard monitoring the passed formModel, and adds the passed guarded-object. |
|
FormGuard(ValidatingFormModel formModel,
Guarded guarded,
int mask)
Creates the FormGuard monitoring the passed formModel, and adds the passed guarded-object using the specified mask. |
|
| Method Summary | |
|---|---|
void |
addGuarded(Guarded newGuarded,
int mask)
Adds a guarded object to be guarded by this FormGuard |
void |
propertyChange(PropertyChangeEvent e)
|
boolean |
removeGuarded(Guarded toRemove)
Removes the guarded object from the management of this FormGuard. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ON_NOERRORS
public static final int ON_ISDIRTY
public static final int ON_ENABLED
public static final int LIKE_NEWFORMOBJCOMMAND
public static final int LIKE_REVERTCOMMAND
public static final int LIKE_COMMITCOMMAND
public static final int FORMERROR_GUARDED
| Constructor Detail |
|---|
public FormGuard(ValidatingFormModel formModel)
formModel - which state-changes should be passed to registered guarded objects.
public FormGuard(ValidatingFormModel formModel,
Guarded guarded)
FORMERROR_GUARDED mask.
formModel - which state-changes should be passed to registered guarded objects.guarded - object that will get en/dis-abled
public FormGuard(ValidatingFormModel formModel,
Guarded guarded,
int mask)
formModel - which state-changes should be passed to registered guarded objects.guarded - object that will get en/dis-abledmask - specifying what formModel state should enable the guarded object.| Method Detail |
|---|
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerPropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public void addGuarded(Guarded newGuarded,
int mask)
newGuarded - object to be guardedmask - indicating which state of the formModel should enable the guarded obhjectpublic boolean removeGuarded(Guarded toRemove)
toRemove - object that no longer should be managed
false if the object toRemove was not present in the list of managed guarded objects.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||