Class QueryDesignerPropEvent

All Implemented Interfaces:
IPostEventProcessing
Direct Known Subclasses:
QueryReferences

public abstract class QueryDesignerPropEvent extends SinkEvent
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
  • 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

      public abstract QueryDesignerPropEvent.Type 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 class GEvent
      Parameters:
      destination - The destination property.
      operation - The Operation.
      operationIndex - The current index in the Operation array provided by this event's getOperations() method.
      Returns:
      destination by default. If null is returned, this event will not be sent.
    • isEventProcessed

      public 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.

      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 class GEvent
      Parameters:
      property - The property processing the event in GEvent.onEvent(event).
      operation - The Operation.
      operationIndex - The current index in the Operation array provided by this event's getOperations() 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.