Package com.iizix.event
Class PropFocusEvent
java.lang.Object
com.iizix.event.GEvent
com.iizix.event.BubbleEvent
com.iizix.event.PropFocusEvent
- All Implemented Interfaces:
- IPostEventProcessing
The focus event send to the property receiving losing and focus, its listeners and the parents respectively.
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. withisFocusLost()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. withisFocusGained()true.
 
- Focus gained is notified in a sinking event PropCnrFocusEventto the component gaining focus and its descendants withPropCnrFocusEvent.isFocusGained()true.
 
- Author:
- Christopher Mindus
- Nested Class Summary- Nested classes/interfaces inherited from class com.iizix.event.GEvent- GEvent.Operation
- Field Summary- Fields inherited from class com.iizix.event.GEvent- PROP_ADDED, PROP_ATTR_CHANGED, PROP_CNR_ADDED, PROP_CNR_FOCUS, PROP_CNR_MOVED, PROP_CNR_RENAMED, PROP_DESIGNER_ASSET_CHANGED, PROP_DESIGNER_JAVA_CLASS_CHANGED, PROP_DESIGNER_JAVA_METHOD_RENAMED, PROP_DESIGNER_KSTRING, PROP_DESIGNER_VIEWER_UPDATE, PROP_DESIGNER_VS_REFERENCE, PROP_DISPOSED, PROP_FOCUS, PROP_MOVED_FROM, PROP_MOVED_TO, PROP_PROJECT_RENAMED, PROP_QUERY_DESIGNER_PROPS, PROP_REFRESH, PROP_REMOVED, PROP_RENAMED, PROP_REORDERED, PROP_RESOLVE_REFERENCES_DIRECT, PROP_VALUE_CHANGED, REMOTE
- Constructor SummaryConstructorsConstructorDescription- PropFocusEvent- (IFocusComp comp, boolean isGained, IFocusComp focusGainedComponent, IFocusComp focusLostComponent, IGProp<?> trigger, boolean isRemoteInduced) Constructs a new focus event.
- Method SummaryModifier and TypeMethodDescriptionRetrieves the component that receives focus,- nullfor none.Retrieves the opposite component that previously had focus,- nullfor none.- GProp<?>Gets the trigger property.- booleanReturns the state for a property container if this event is received in the- onEventSelfmethod as a helper for it would need to clear the property container cache.- booleanReturns if this is a Focus Gained Event.- booleanReturns if this is a Focus Lost Event.- booleanReturns the flag for history entry requested.- protected StringBuilder- paramString- (StringBuilder buf) Returns the parameter string representing the state of this event.- voidRequests a history event from the focus engine.- Methods inherited from class com.iizix.event.BubbleEvent- getOperations- Methods inherited from class com.iizix.event.GEvent- addPostProcessor, cancel, consume, getAlternateDestination, getEventID, getEventName, getEventName, getEventTarget, getOperation, getPostProcessors, getSender, getSource, isCancelled, isConsumed, isEventProcessed, isPropertyChange, isPropertyChange, isPropertyChange, isPropertyChangeIn, isPropertyChangeInTree, isRefreshEvent, isRemoteInduced, isVerifyEvent, send, send, sendSelf, setInitialProperty, setOperation, setProgressMonitor, toString
- Constructor Details- PropFocusEventpublic PropFocusEvent- (IFocusComp comp, boolean isGained, IFocusComp focusGainedComponent, IFocusComp focusLostComponent, IGProp<?> trigger, boolean isRemoteInduced) Constructs a new focus event.- Parameters:
- comp- The component instance involved in the focus change (losing or gaining focus).
- isGained- Focus gained event.
- focusGainedComponent- The component gaining focus, null for none.
- focusLostComponent- The component losing focus, null for none.
- trigger- The trigger property, null for none.
- isRemoteInduced- Flag indicating this change is induced from a remote party.
 
 
- Method Details- getFocusLostComponentRetrieves the opposite component that previously had focus,- nullfor 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.
- getFocusGainedComponentRetrieves the component that receives focus,- nullfor none. The focus receiver is set to- nullif a component that had focus is destroyed and no other focus receiver is found.
- getTriggerGets the trigger property.- Overrides:
- getTriggerin class- GEvent
- Returns:
- The trigger property, or null for none.
 
- isFocusLostpublic boolean isFocusLost()Returns if this is a Focus Lost Event.- Returns:
- true if it is a focus lost event, false for focus gained.
 
- isFocusGainedpublic boolean isFocusGained()Returns if this is a Focus Gained Event.- Returns:
- true if it is a focus gained event, false for focus lost.
 
- 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.
 
- paramStringReturns the parameter string representing the state of this event. This string is useful for debugging. Super classes adds extra information to the string by preceding it with a comma followed by the extra information.- Overrides:
- paramStringin class- GEvent
- Parameters:
- buf- The StringBuilder to append the string to.
- Returns:
- The StringBuilder, i.e. the bufinput parameter.
 
- isClearCacheEventpublic boolean isClearCacheEvent()Returns the state for a property container if this event is received in the- onEventSelfmethod as a helper for it would need to clear the property container cache.- Overrides:
- isClearCacheEventin class- GEvent
- Returns:
- false, always for this event.