Class UIBaseEvent<UICOMP extends IUIComp>

java.lang.Object
com.iizix.api.BaseEvent<UICOMP>
com.iizix.api.ui.UIBaseEvent<UICOMP>
All Implemented Interfaces:
IMessageBox
Direct Known Subclasses:
UIActionEvent, UIBackEvent, UIConnectEvent, UICreateEvent, UIDestroyEvent, UIFocusEvent, UIMediaEvent, UISelectionEvent, UITextChangeEvent, UIValueChangeEvent

public class UIBaseEvent<UICOMP extends IUIComp> extends BaseEvent<UICOMP>
Base event for all events in the API.
Author:
Christopher Mindus
  • Constructor Details

    • UIBaseEvent

      protected UIBaseEvent(UICOMP source)
      Constructor called from the subclass.
      Throws:
      NullPointerException - If the source is null.
  • Method Details

    • getVirtualSpace

      public VirtualSpace getVirtualSpace()
      Gets the VirtualSpace of the UI event source component.
      Specified by:
      getVirtualSpace in class BaseEvent<UICOMP extends IUIComp>
      Returns:
      The VirtualSpace connected to the panel of this event source component.
    • getAppSessionGyro

      public IAppSessionGyro getAppSessionGyro()
      Gets the Application Session Gyro instance.
      Overrides:
      getAppSessionGyro in class BaseEvent<UICOMP extends IUIComp>
      Returns:
      The instance.
    • getClientSessionGyro

      public IClientSessionGyro getClientSessionGyro()
      Gets the Client Session Gyro instance.
      Returns:
      The instance.
    • getUIPanel

      public UIPanelBase getUIPanel()
      Gets the panel of the UI event source component.
      Returns:
      The panel.
    • getPanelUIComponent

      public <COMP extends UIComp> COMP getPanelUIComponent(@UIRef String uiPath, Class<COMP> uiClass) throws NotFoundException
      Gets a UI component by UI path reference from the panel.

      Note: A UI path is not the same as a property path, it omits the UI container UIComps instance from the path.

      Parameters:
      uiPath - The UI path for the component.
      uiClass - The UI class of the component.
      Returns:
      The component, never null.
      Throws:
      NotFoundException - The not-found exception is thrown if the component is not found instead of returning null.
    • getPanelUIComponentNull

      public <COMP extends UIComp> COMP getPanelUIComponentNull(@UIRef String uiPath, Class<COMP> uiClass)
      Gets a UI component with relative reference from this container.

      Note: A UI path is not the same as a property path, it omits the UI container UIComps instance from the path.

      Parameters:
      uiPath - The UI path for the component.
      uiClass - The UI class of the component.
      Returns:
      The component, or null if not found.
    • getFirstUIComponent

      public <COMP extends UIComp> COMP getFirstUIComponent(String name, Class<COMP> uiClass) throws NotFoundException
      Gets the first UI component of the specified name and UI class. The search for the component is done from the panel root and searches all its children containers recursively.
      Parameters:
      name - The name of the component.
      uiClass - The UI class of the component.
      Returns:
      The component, never null.
      Throws:
      NotFoundException - The not-found exception is thrown if the component is not found instead of returning null.
    • getFirstUIComponentNull

      public <COMP extends UIComp> COMP getFirstUIComponentNull(String name, Class<COMP> uiClass)
      Gets the first UI component of the specified name and UI class. The search for the component is done from the panel root and searches all its children containers recursively.
      Parameters:
      name - The name of the component.
      uiClass - The UI class of the component.
      Returns:
      The component, or null if not found.
    • getContainerFirstUIComponent

      public <COMP extends UIComp> COMP getContainerFirstUIComponent(String name, Class<COMP> uiClass) throws NotFoundException
      Gets the first UI component of the specified name and UI class. The search for the component is done from this UI source. If the UI source is a plain UI component and not a UI container, the search is done from the parent UI container of the UI source. Then all children UI containers and components are searched recursively down the component tree.
      Parameters:
      name - The name of the component.
      uiClass - The UI class of the component.
      Returns:
      The component, never null.
      Throws:
      NotFoundException - The not-found exception is thrown if the component is not found instead of returning null.
    • getContainerFirstUIComponentNull

      public <COMP extends UIComp> COMP getContainerFirstUIComponentNull(String name, Class<COMP> uiClass)
      Gets the first UI component of the specified name and UI class. The search for the component is done from this UI source. If the UI source is a plain UI component and not a UI container, the search is done from the parent UI container of the UI source. Then all children UI containers and components are searched recursively down the component tree.
      Parameters:
      name - The name of the component.
      uiClass - The UI class of the component.
      Returns:
      The component, or null if not found.