Package com.iizigo.event
Class QueryDesignerPropEvent
java.lang.Object
com.iizix.event.GEvent
com.iizix.event.SinkEvent
com.iizigo.event.QueryDesignerPropEvent
- All Implemented Interfaces:
IPostEventProcessing
- Direct Known Subclasses:
QueryReferences
Event ID used to query for references in a broadcast event sent to all properties from the Module root container. The Event ID is GEvent.PROP_QUERY_DESIGNER_PROPS.
- 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
ConstructorDescriptionQueryDesignerPropEvent
(GProp<?> source, IPropProgressMonitor monitor, boolean isIPropDesignerOnly) Constructs a new Query Reference event.Method Summary
Modifier and TypeMethodDescriptionprotected EventListener
getAlternateDestination
(GProp<?> destination, GEvent.Operation operation, int operationIndex) Gets the alternate property destination for an event about to be sent.abstract QueryDesignerPropEvent.Type
getType()
Gets the type of message.boolean
isEventProcessed
(GProp<?> property, GEvent.Operation operation, int operationIndex) Checks if this Operation at specified index should be processed or not by the specified property.Methods inherited from class com.iizix.event.SinkEvent
getOperations
Methods inherited from class com.iizix.event.GEvent
addPostProcessor, cancel, consume, getEventID, getEventName, getEventName, getEventTarget, getOperation, getPostProcessors, getSender, getSource, getTrigger, isCancelled, isClearCacheEvent, isConsumed, isPropertyChange, isPropertyChange, isPropertyChange, isPropertyChangeIn, isPropertyChangeInTree, isRefreshEvent, isRemoteInduced, isVerifyEvent, paramString, send, send, sendSelf, setInitialProperty, setOperation, setProgressMonitor, toString
Constructor Details
QueryDesignerPropEvent
public QueryDesignerPropEvent(GProp<?> source, IPropProgressMonitor monitor, boolean isIPropDesignerOnly) Constructs a new Query Reference event.- Parameters:
source
- The property source.monitor
- Progress monitor.isIPropDesignerOnly
- If the event is targeted for property containers implementing IPropDesigner only, and then re-targeted to the DesignerProp implementor.
Method Details
getType
Gets the type of message.getAlternateDestination
protected EventListener getAlternateDestination(GProp<?> destination, GEvent.Operation operation, int operationIndex) Gets the alternate property destination for an event about to be sent. The default is to return the same destination, but subclasses can choose to return another property that would be "more suitable" to receive the event, i.e. the property that would really do the processing. This enables performance enhancements to be done for a particular event.This method also enables an event to skip sending the event to a property by returning
null
in this method.Subclasses can override this method to provide fine-tuned behavior.
- Overrides:
getAlternateDestination
in classGEvent
- Parameters:
destination
- The destination property.operation
- The Operation.operationIndex
- The current index in the Operation array provided by this event'sgetOperations()
method.- Returns:
destination
by default. Ifnull
is returned, this event will not be sent.
isEventProcessed
Checks if this Operation at specified index should be processed or not by the specified property.An event can fine-tune event distribution with this mechanism, thus improving performance.
This method is intended to be called from
GProp.onEvent(event)
. Do not call this method.- Overrides:
isEventProcessed
in classGEvent
- Parameters:
property
- The property processing the event inGEvent.onEvent(event)
.operation
- The Operation.operationIndex
- The current index in the Operation array provided by this event'sgetOperations()
method.- Returns:
- true by default. If false is returned, an event could cause e.g. the CHILDREN operation processing to be skipped for certain properties.