Package com.iizix.api.vs
Class VSFocusEvent
- java.lang.Object
- com.iizix.api.BaseEvent<VSCOMP>
- com.iizix.api.vs.VSBaseEvent<VSCOMP>
- com.iizix.api.vs.VSBaseEventWithTrigger<IVSComponent>
- com.iizix.api.vs.VSFocusEvent
- All Implemented Interfaces:
IMessageBox
public class VSFocusEvent extends VSBaseEventWithTrigger<IVSComponent>
The VirtualSpace Focus Event is fired when the VirtualSpace focus changes for a component.- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox
IMessageBox.Icon
Field Summary
Fields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
Constructor Summary
Constructors Constructor Description VSFocusEvent(IVSComponent source, IVSComponent opposite, boolean isFocusGained)Constructs the event for a change without a trigger source.VSFocusEvent(IVSComponent source, IVSComponent opposite, boolean isFocusGained, GProp<?> trigger)Constructs the event for a change event with a property being the trigger source, e.g.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IVSComponentgetOpposite()Gets the opposite component for the focus operation, i.e.IVSComponentgetSource()Gets the VirtualSpace item that is the source of the event, i.e.booleanisFocusGained()Returns if this is the focus gained operation.booleanisFocusLost()Returns if this is the focus lost operation.protected java.lang.StringparamString()Gets the parameter string.Methods inherited from class com.iizix.api.vs.VSBaseEventWithTrigger
getTrigger, getTriggerClientSessionGyro, getTriggerUIComp
Methods inherited from class com.iizix.api.vs.VSBaseEvent
getAppSessionGyro, getVirtualSpace
Methods inherited from class com.iizix.api.BaseEvent
getAction, getAction2, getActionNull, getActionNull2, getField, getField2, getFieldNull, getFieldNull2, getGroup, getGroup2, getGroupNull, getGroupNull2, getTable, getTable2, getTableNull, getTableNull2, getTime, getVirtualizedVirtualSpace, getVSComponent, getVSComponent2, getVSComponentNull, getVSComponentNull2, messageBox, toString
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
Constructor Detail
VSFocusEvent
public VSFocusEvent(IVSComponent source, IVSComponent opposite, boolean isFocusGained)
Constructs the event for a change without a trigger source.- Parameters:
source- The source.opposite- The opposite component losing focus, null for none.isFocusGained- Flag indicating focus was gained.- Throws:
java.lang.NullPointerException- If the source is null.
VSFocusEvent
public VSFocusEvent(IVSComponent source, IVSComponent opposite, boolean isFocusGained, GProp<?> trigger)
Constructs the event for a change event with a property being the trigger source, e.g. an UIButton or UICheckBox.- Parameters:
source- The source.opposite- The opposite component losing focus, null for none.isFocusGained- Flag indicating focus was gained.trigger- The trigger property.
Method Detail
getSource
public IVSComponent getSource()
Gets the VirtualSpace item that is the source of the event, i.e. the item that gains or loses focus.- Overrides:
getSourcein classBaseEvent<IVSComponent>- Returns:
- The VSComponent gaining or losing focus. If this event is fired to a listener on the VirtualSpace, this value can be
nullwhen e.g. no one receives focus.
getOpposite
public IVSComponent getOpposite()
Gets the opposite component for the focus operation, i.e. if the operation is FocusGained, the opposite component is the one losing focus, and if the operation is FocusLost, the opposite component is the component gaining focus.- Returns:
- The opposite component, or
nullfor none.
isFocusGained
public boolean isFocusGained()
Returns if this is the focus gained operation.- Returns:
trueif this is focus gained,falsefor focus lost.
isFocusLost
public boolean isFocusLost()
Returns if this is the focus lost operation.- Returns:
trueif this is focus lost,falsefor focus gained.
paramString
protected java.lang.String paramString()
Gets the parameter string.- Overrides:
paramStringin classVSBaseEventWithTrigger<IVSComponent>