Package com.iizix.event
Class PropCnrFocusEvent
- java.lang.Object
- com.iizix.event.GEvent
- com.iizix.event.SinkEvent
- com.iizix.event.PropCnrFocusEvent
 
 
 
- All Implemented Interfaces:
- IPostEventProcessing
 - public class PropCnrFocusEvent extends SinkEvent 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. withPropFocusEvent.isFocusLost()true.
 
- Focus lost is notified in a sinking event PropCnrFocusEventto the component losing focus and its descendants withisFocusLost()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 withisFocusGained()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 Summary- Constructors - Constructor - Description - PropCnrFocusEvent(IFocusComp comp, boolean isGained, IFocusComp focusGainedComponent, IFocusComp focusLostComponent, IGProp<?> trigger, boolean isRemoteInduced)Constructs a new focus event.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - IFocusComp- getFocusGainedComponent()Retrieves the component that receives focus,- nullfor none.- IFocusComp- getFocusLostComponent()Retrieves the opposite component that previously had focus,- nullfor none.- GProp<?>- getTrigger()Gets the trigger property.- 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.- boolean- isFocusGained()Returns if this is a Focus Gained Event.- boolean- isFocusLost()Returns if this is a Focus Lost Event.- boolean- isHistoryEntryRequested()Returns the flag for history entry requested.- protected java.lang.StringBuilder- paramString(java.lang.StringBuilder buf)Returns the parameter string representing the state of this event.- void- requestHistoryEntry()Requests a history event from the focus engine.- Methods inherited from class com.iizix.event.SinkEvent- 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 Detail- PropCnrFocusEvent- public PropCnrFocusEvent(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 Detail- getFocusLostComponent- public IFocusComp getFocusLostComponent() Retrieves 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.
 - getFocusGainedComponent- public IFocusComp getFocusGainedComponent() Retrieves 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.
 - getTrigger- public GProp<?> getTrigger() Gets the trigger property.- Overrides:
- getTriggerin class- GEvent
- Returns:
- The trigger property, or null for none.
 
 - isFocusLost- public boolean isFocusLost() Returns if this is a Focus Lost Event.- Returns:
- true if it is a focus lost event, false for focus gained.
 
 - isFocusGained- public boolean isFocusGained() Returns if this is a Focus Gained Event.- Returns:
- true if it is a focus gained event, false for focus lost.
 
 - requestHistoryEntry- public void requestHistoryEntry() Requests a history event from the focus engine. This will force the focus engines to add a history event when appropriate.
 - isHistoryEntryRequested- public boolean isHistoryEntryRequested() Returns the flag for history entry requested.- Returns:
- true if somebody has requested a history entry during the event's lifetime.
 
 - paramString- protected java.lang.StringBuilder paramString(java.lang.StringBuilder buf) Returns 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.
 
 - isClearCacheEvent- public 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.