Class BaseEvent<PROP_OR_INTERFACE>
- All Implemented Interfaces:
IMessageBox
- Direct Known Subclasses:
UIBaseEvent
,VSBaseEvent
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox
IMessageBox.Icon
Field Summary
Modifier and TypeFieldDescriptionprotected final PROP_OR_INTERFACE
The property that is the source of the event.Fields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
Constructor Summary
ModifierConstructorDescriptionprotected
BaseEvent
(PROP_OR_INTERFACE source) Constructor called from the subclass.Method Summary
Modifier and TypeMethodDescriptionGets the action with the specified path.getAction2
(@FullVSRef String fullVSRef) Gets the action with the specified full VS reference path.getActionNull
(@VSRef String path) Gets the action with the specified path.getActionNull2
(@FullVSRef String fullVSRef) Gets the action with the specified full VS reference path.Gets the Application Session Gyro instance.Gets the field with the specified path.getField2
(@FullVSRef String fullVSRef) Gets the field with the specified full VS reference path.getFieldNull
(@VSRef String path) Gets the field with the specified path.getFieldNull2
(@FullVSRef String fullVSRef) Gets the field with the specified full VS reference path.Gets the group with the specified path.getGroup2
(@FullVSRef String fullVSRef) Gets the group with the specified full VS reference path.getGroupNull
(@VSRef String path) Gets the group with the specified path.getGroupNull2
(@FullVSRef String fullVSRef) Gets the group with the specified full VS reference path.Gets the property that is the source of the event.Gets the table with the specified path.getTable2
(@FullVSRef String fullVSRef) Gets the table with the specified full VS reference path.getTableNull
(@VSRef String path) Gets the table with the specified path.getTableNull2
(@FullVSRef String fullVSRef) Gets the table with the specified full VS reference path.long
getTime()
Gets the event creation time.Gets a virtualized VirtualSpace for the application session.abstract VirtualSpace
Gets the VirtualSpace of the event source component.<COMP extends IVSComponent>
COMPgetVSComponent
(@VSRef String path, Class<COMP> clazz) Gets the VS component with the specified path.<COMP extends IVSComponent>
COMPgetVSComponent2
(@FullVSRef String fullVSRef, Class<COMP> clazz) Gets the VS component with the specified full reference path.<COMP extends IVSComponent>
COMPgetVSComponentNull
(@VSRef String path, Class<COMP> clazz) Gets the VS component with the specified path.<COMP extends IVSComponent>
COMPgetVSComponentNull2
(@FullVSRef String fullVSRef, Class<COMP> clazz) Gets the VS component with the specified full reference path.void
messageBox
(IMessageBoxReply reply, IMessageBox.Icon icon, KString title, KString message, KString... buttons) Displays a message box with the specified title and message for the application session.protected String
Gets the parameter string.toString()
Returns a string representation of this event and its parameters and values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.gyro.IMessageBox
messageBox, messageBox
Field Details
source
The property that is the source of the event.
Constructor Details
BaseEvent
Constructor called from the subclass.- Throws:
NullPointerException
- If the source is null.
Method Details
getTime
public long getTime()Gets the event creation time.- Returns:
- The current value of the running Java Virtual Machine's high-resolution time source, in nanoseconds.
- See Also:
getSource
Gets the property that is the source of the event.toString
Returns a string representation of this event and its parameters and values.paramString
Gets the parameter string.getVirtualSpace
Gets the VirtualSpace of the event source component.- Returns:
- The VirtualSpace associated with the source component of this event.
getAppSessionGyro
Gets the Application Session Gyro instance.- Returns:
- The instance.
getField
Gets the field with the specified path.- Parameters:
path
- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The field, never null.
- Throws:
NotFoundException
- If the field is not found.
getFieldNull
Gets the field with the specified path.It is preferable to use
getField(String)
instead of this method if the field always should be present because it will throw and log errors.- Parameters:
path
- The path to the field in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The field, null if not found.
getField2
Gets the field with the specified full VS reference path.- Parameters:
fullVSRef
- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, never null.
- Throws:
NotFoundException
- If the field is not found.
getFieldNull2
Gets the field with the specified full VS reference path.It is preferable to use
getField2(String)
instead of this method if the field always should be present because it will throw and log errors.- Parameters:
fullVSRef
- The full VS reference to the field in the VirtualSpace, as "module:/vs/path".- Returns:
- The field, null if not found.
getTable
Gets the table with the specified path.- Parameters:
path
- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The table, never null.
- Throws:
NotFoundException
- If the table is not found.
getTableNull
Gets the table with the specified path.It is preferable to use
getTable(String)
instead of this method if the table always should be present because it will throw and log errors.- Parameters:
path
- The path to the table in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The table, null if not found.
getTable2
Gets the table with the specified full VS reference path.- Parameters:
fullVSRef
- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".- Returns:
- The table, never null.
- Throws:
NotFoundException
- If the table is not found.
getTableNull2
Gets the table with the specified full VS reference path.It is preferable to use
getTable2(String)
instead of this method if the table always should be present because it will throw and log errors.- Parameters:
fullVSRef
- The full VS reference to the table in the VirtualSpace, as "module:/vs/path".- Returns:
- The table, null if not found.
getAction
Gets the action with the specified path.- Parameters:
path
- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The action, never null.
- Throws:
NotFoundException
- If the action is not found.
getActionNull
Gets the action with the specified path.It is preferable to use
getAction(String)
instead of this method if the action always should be present because it will throw and log errors.- Parameters:
path
- The path to the action in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The action, null if not found.
getAction2
Gets the action with the specified full VS reference path.- Parameters:
fullVSRef
- The full VS reference to the action in the VirtualSpace, as "module:/vs/path".- Returns:
- The action, never null.
- Throws:
NotFoundException
- If the action is not found.
getActionNull2
Gets the action with the specified full VS reference path.It is preferable to use
getAction2(String)
instead of this method if the action always should be present because it will throw and log errors.- Parameters:
fullVSRef
- The full VS reference to the action in the VirtualSpace, as "module:/vs/path".- Returns:
- The action, null if not found.
getGroup
Gets the group with the specified path.- Parameters:
path
- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The group, never null.
- Throws:
NotFoundException
- If the action is not found.
getGroupNull
Gets the group with the specified path.It is preferable to use
getGroup(String)
instead of this method if the action always should be present because it will throw and log errors.- Parameters:
path
- The path to the group in the VirtualSpace, cannot start with '/' or contain ':'.- Returns:
- The action, null if not found.
getGroup2
Gets the group with the specified full VS reference path.- Parameters:
fullVSRef
- The full VS reference to the group in the VirtualSpace, as "module:/vs/path".- Returns:
- The group, never null.
- Throws:
NotFoundException
- If the group is not found.
getGroupNull2
Gets the group with the specified full VS reference path.It is preferable to use
getGroup2(String)
instead of this method if the group always should be present because it will throw and log errors.- Parameters:
fullVSRef
- The full VS reference to the group in the VirtualSpace, as "module:/vs/path".- Returns:
- The group, null if not found.
getVSComponent
public <COMP extends IVSComponent> COMP getVSComponent(@VSRef String path, Class<COMP> clazz) throws NotFoundException Gets the VS component with the specified path.- Parameters:
path
- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.clazz
- The requested VS component class.- Returns:
- The component, never null or wrong class.
- Throws:
NotFoundException
- If the field is not found or wrong class.
getVSComponentNull
Gets the VS component with the specified path.- Parameters:
path
- The path to the VS component in the VirtualSpace, cannot start with '/' or contain ':'.clazz
- The requested VS component class.- Returns:
- The component, null if not found or wrong class.
getVSComponent2
public <COMP extends IVSComponent> COMP getVSComponent2(@FullVSRef String fullVSRef, Class<COMP> clazz) throws NotFoundException Gets the VS component with the specified full reference path.- Parameters:
fullVSRef
- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".clazz
- The requested VS component class.- Returns:
- The component, never null or wrong class.
- Throws:
NotFoundException
- If the component is not found or wrong class.
getVSComponentNull2
public <COMP extends IVSComponent> COMP getVSComponentNull2(@FullVSRef String fullVSRef, Class<COMP> clazz) Gets the VS component with the specified full reference path.- Parameters:
fullVSRef
- The full reference path to the VS component in the VirtualSpace, as "module:/vs/path".clazz
- The requested VS component class.- Returns:
- The component, null if not found or wrong class.
getVirtualizedVirtualSpace
Gets a virtualized VirtualSpace for the application session. The VirtualSpace to get MUST already have been virtualized prior to this call.- Parameters:
path
- The path of the VirtualSpace name relative the parent of the current VirtualSpace. This path can be e.g. just a plain name for a direct sibling of this VirtualSpace, a folder based path such as "folder/virtualSpaceB" or a full reference path as "module:/vs/[folderPath/]virtualSpace".- Returns:
- The VirtualSpace for the path in question.
- Throws:
NotFoundException
- If the VirtualSpace is not found within the virtualized VirtualSpaces.IllegalStateException
- If the current VirtualSpace is disposed or the application session gyro is not found.IllegalArgumentException
- If path is invalid.
messageBox
public void messageBox(IMessageBoxReply reply, IMessageBox.Icon icon, KString title, KString message, KString... buttons) Displays a message box with the specified title and message for the application session. The message box will be displayed on all client sessions.The callback is done in the application worker thread.
- Specified by:
messageBox
in interfaceIMessageBox
- Parameters:
reply
- The reply callback that is called when the user chooses a button or session is closed,null
for none.icon
- Icon to display, see the{link Icon}
enumeration.title
- The title string, must be non-null.message
- The message to display, must be non-null.buttons
- The strings for the buttons to display, if none, just anOK
button is displayed. This array of buttons defined the index value returned by this method.- Throws:
NullPointerException
- Ificon
ormessage
is null, or if any of the elements inbuttons
array is null.IllegalStateException
- If the application session is disposed of.