Package com.iizix.gyro
Class FocusEvent
java.lang.Object
com.iizix.gyro.FocusEvent
The focus event that is fired when focus changes for an engine.
Focus processing is done in the following order:
- Focus is changed in the focus engine without notification, i.e. the call to IFocusEngine.getCurrentFocus()will reflect the new focus component,
 
- If the receiving focus component is non-null: focus veto processing using the focus listeners registered in the IFocusEngineusing theIFocusVetoListenerinterface. If theFocusVetoExceptionis thrown, the original focus is restored in the focus engine without notification.
 
- Focus lost sent to the component losing focus using method IFocusComp.onFocusLost(IFocusComp, IGProp, boolean)in the eventFocusEvent.
 
- Focus lost is notified in a bubbling event PropFocusEventto the component losing focus and its parents. withPropFocusEvent.isFocusLost()true.
 
- Focus lost is notified in a sinking event PropCnrFocusEventto the component losing focus and its descendants withPropCnrFocusEvent.isFocusLost()true.
 
- Focus change sent to the focus listeners registered in the IFocusEngineusingIFocusListener.onFocusChanged(FocusEvent).
 
- Focus gained sent to the component gaining focus using method IFocusComp.onFocusGained(IFocusComp, IGProp, boolean)in the eventFocusEvent.
 
- Focus gained is notified in a bubbling event PropFocusEventto the component gaining focus and its parents. withPropFocusEvent.isFocusGained()true.
 
- Focus gained is notified in a sinking event PropCnrFocusEventto the component gaining focus and its descendants withPropCnrFocusEvent.isFocusGained()true.
 
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- final booleanFlag indicating this event is caused by a remote event, i.e.- final IFocusCompOpposite component that previously had focus, null for none.- final IFocusCompComponent that receives focus, null for none.- final GProp<?>The trigger property, e.g.
- Constructor SummaryConstructorsConstructorDescription- FocusEvent- (IFocusComp source, IFocusComp opposite, IGProp<?> trigger, boolean isRemoteInduced) Constructs a focus event.
- Method Summary
- Field Details- oppositeOpposite component that previously had focus, null for none. In general, this value is only- nullduring application start, but could be- nullfor a while if e.g. a component that had focus is destroyed and no focus can currently be set elsewhere, e.g. because the client session is disconnected.
- sourceComponent that receives focus, null for none. The focus receiver is set to- nullif a component that had focus is destroyed and no other focus receiver is found.
- triggerThe trigger property, e.g. UIButton or UIText. If focus is set in the e.g. VirtualSpace, this trigger property is set to the UI component that triggered the event, or the data connector property when it is originating from a data connector.
- isRemoteInducedpublic final boolean isRemoteInducedFlag indicating this event is caused by a remote event, i.e. due to user interaction on the client side.
 
- Constructor Details- FocusEventpublic FocusEvent- (IFocusComp source, IFocusComp opposite, IGProp<?> trigger, boolean isRemoteInduced) Constructs a focus event.- Parameters:
- source- Component that receives focus, null for none. The focus receiver is set to- nullif a component that had focus is destroyed and no other focus receiver is found.
- opposite- Opposite component that previously had focus, null for none. In general, this value is only- nullduring application start, but could be- nullfor a while if e.g. a component that had focus is destroyed and no focus can currently be set elsewhere, e.g. because the client session is disconnected.
- trigger- The trigger property, e.g. UIButton or UIText.
- isRemoteInduced- Flag indicating this event is caused by a remote event, i.e. due to user interaction on the client side.
 
 
- Method Details- toStringFormats the event as a String.
- requestHistoryEntrypublic void requestHistoryEntry()Requests a history event from the focus engine. This will force the focus engines to add a history event when appropriate.
- isHistoryEntryRequestedpublic boolean isHistoryEntryRequested()Returns the flag for history entry requested.- Returns:
- true if somebody has requested a history entry during the event's lifetime.
 
- paramStringFormats the parameters to a string.- Returns:
- A String as param=value,param2=value2,...