Class UIActionEvent

    • Constructor Detail

      • UIActionEvent

        public UIActionEvent​(IUIAction source)
        Constructs the event for an action without a trigger source.
        Parameters:
        source - The source.
        Throws:
        java.lang.NullPointerException - If the source is null.
      • UIActionEvent

        public UIActionEvent​(IUIAction source,
                             GProp<?> trigger)
        Constructs the event for an action with a property being the trigger source, e.g. an UIButton.
        Parameters:
        source - The source.
        trigger - The trigger property.
      • UIActionEvent

        public UIActionEvent​(IUIAction source,
                             GProp<?> trigger,
                             UIComp contextComponent)
        Constructs the event for an action with a property being the trigger source, e.g. an UIButton.
        Parameters:
        source - The source.
        trigger - The trigger property.
        contextComponent - The context component causing the event, used for context menus.
    • Method Detail

      • getTrigger

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

        public UIComp getContextComponent()
        The context UI component that caused the event, when the event is generated from a context menu.
        Returns:
        The UI component, null if not originating from a context menu.