|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectUI.GEVAActionEvent
public class GEVAActionEvent
Store details of an event being passed on to a listener
Field Summary | |
---|---|
static int |
DIRTY
Event is fired when the control's value is modified either by user input or loading. getActionString() will return the new value of the control returning false will cancel the set dirty action |
static int |
LOAD
Event is fired when the control is called on to load. getActionString() will return loaded value (it can be modified and will appear as modified) returning false will load the default value rather than the loaded value |
static int |
SAVE
Event is fired when the control is called on to save. getActionString() will return value about to be saved (it can be modified and will save as modified) returning false will prevent the value from being modified (the original value loaded will be saved) |
static int |
VALID
Event is fired when the control's value is validated. |
Constructor Summary | |
---|---|
GEVAActionEvent(GEVAControl source,
int action,
java.lang.String string,
int command)
Create a new event |
Method Summary | |
---|---|
void |
addInvalidReason(java.lang.String reason)
While validating, add an error that will be displayed to the user |
int |
getAction()
Get the event that was fired LOAD/SAVE/DIRTY/VALID |
int |
getActionCommand()
Get the index associated with the event |
java.lang.String |
getActionString()
Get the text associated with the event |
java.lang.String |
getInvalidReason()
Get all the accumulated invalid reasons added and resets, ie calling a second time will return null. |
GEVAControl |
getSource()
Get the control that fired the event |
boolean |
isDirty()
Set to true automatically when setActionString is called |
void |
setActionString(java.lang.String string)
Set the text associated with the event (this will allow to modify the result of the event) e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LOAD
public static final int SAVE
public static final int DIRTY
public static final int VALID
Constructor Detail |
---|
public GEVAActionEvent(GEVAControl source, int action, java.lang.String string, int command)
source
- The control that fired the eventaction
- The event's action (LOAD/SAVE/DIRTY/VALID)string
- The string text associated with the eventMethod Detail |
---|
public GEVAControl getSource()
public int getAction()
public java.lang.String getActionString()
public int getActionCommand()
public void setActionString(java.lang.String string)
public boolean isDirty()
public void addInvalidReason(java.lang.String reason)
reason
- The error caused when validatingpublic java.lang.String getInvalidReason()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |