Class PropFocusEvent

    • Constructor Detail

      • PropFocusEvent

        public PropFocusEvent​(IFocusComp comp,
                              boolean isGained,
                              IFocusComp focusGainedComponent,
                              IFocusComp focusLostComponent,
                              IGProp<?> trigger,
                              boolean isRemoteInduced)
        Constructs a new focus event.
        Parameters:
        comp - The component instance involved in the focus change (losing or gaining focus).
        isGained - Focus gained event.
        focusGainedComponent - The component gaining focus, null for none.
        focusLostComponent - The component losing focus, null for none.
        trigger - The trigger property, null for none.
        isRemoteInduced - Flag indicating this change is induced from a remote party.
    • Method Detail

      • getFocusLostComponent

        public IFocusComp getFocusLostComponent()
        Retrieves the opposite component that previously had focus, null for none. In general, this value is only null during application start, but could be null for a while if e.g. a component that had focus is destroyed and no focus can currently be set elsewhere, e.g. because the client session is disconnected.
      • getFocusGainedComponent

        public IFocusComp getFocusGainedComponent()
        Retrieves the component that receives focus, null for none. The focus receiver is set to null if a component that had focus is destroyed and no other focus receiver is found.
      • getTrigger

        public GProp<?> getTrigger()
        Gets the trigger property.
        Overrides:
        getTrigger in class GEvent
        Returns:
        The trigger property, or null for none.
      • isFocusLost

        public boolean isFocusLost()
        Returns if this is a Focus Lost Event.
        Returns:
        true if it is a focus lost event, false for focus gained.
      • isFocusGained

        public boolean isFocusGained()
        Returns if this is a Focus Gained Event.
        Returns:
        true if it is a focus gained event, false for focus lost.
      • requestHistoryEntry

        public void requestHistoryEntry()
        Requests a history event from the focus engine. This will force the focus engines to add a history event when appropriate.
      • isHistoryEntryRequested

        public boolean isHistoryEntryRequested()
        Returns the flag for history entry requested.
        Returns:
        true if somebody has requested a history entry during the event's lifetime.
      • paramString

        protected java.lang.StringBuilder paramString​(java.lang.StringBuilder buf)
        Returns the parameter string representing the state of this event. This string is useful for debugging. Super classes adds extra information to the string by preceding it with a comma followed by the extra information.
        Overrides:
        paramString in class GEvent
        Parameters:
        buf - The StringBuilder to append the string to.
        Returns:
        The StringBuilder, i.e. the buf input parameter.
      • isClearCacheEvent

        public boolean isClearCacheEvent()
        Returns the state for a property container if this event is received in the onEventSelf method as a helper for it would need to clear the property container cache.
        Overrides:
        isClearCacheEvent in class GEvent
        Returns:
        false, always for this event.