Class VSBaseEventWithTrigger<VSCOMP extends IVSComponent>

java.lang.Object
com.iizix.api.BaseEvent<VSCOMP>
com.iizix.api.vs.VSBaseEvent<VSCOMP>
com.iizix.api.vs.VSBaseEventWithTrigger<VSCOMP>
All Implemented Interfaces:
IMessageBox
Direct Known Subclasses:
VSActionEvent, VSChangeEvent, VSFieldEvent, VSFocusEvent, VSStateEvent

public class VSBaseEventWithTrigger<VSCOMP extends IVSComponent> extends VSBaseEvent<VSCOMP>
Base event for all VirtualSpace events in the API.
Author:
Christopher Mindus
  • Constructor Details

    • VSBaseEventWithTrigger

      protected VSBaseEventWithTrigger(VSCOMP source, GProp<?> trigger)
      Constructor called from the subclass with trigger information.
      Parameters:
      source - The source VS component.
      Throws:
      NullPointerException - If the source is null.
  • Method Details

    • getTrigger

      public GProp<?> getTrigger()
      Gets the trigger property being the source of the event.
      Returns:
      An instance of e.g. an UIButton, UICheckBox or null if the trigger is not a property.
    • getTriggerUIComp

      public UIComp getTriggerUIComp()
      Gets the UIComp that triggered the event.

      Avoid calling this method repeatedly as it requires look-up.

      Returns:
      The UI component that triggered the VS event, or null if there is no trigger available or the trigger is not inside a UIComp.
    • getTriggerClientSessionGyro

      public IClientSessionGyro getTriggerClientSessionGyro()
      Gets the client session that triggered the VS event. The client session gyro is looked up from the trigger component, and if there is no trigger component or the client session gyro is not found, it is looked up from the current thread using IClientSessionGyro.getSessionInstance().

      Avoid calling this method repeatedly as it requires look-up.

      Returns:
      The client session triggering the event, or null if undefined or not found.
    • paramString

      protected String paramString()
      Gets the parameter string.
      Overrides:
      paramString in class BaseEvent<VSCOMP extends IVSComponent>