Interface IAppSessionFocusProvider


public interface IAppSessionFocusProvider
Interface used to provide advanced focus processing for the application.

A class can implement this interface and programmatically:

  • set the initial VS focus,
  • provide the UI focus to use for changes of focus in the VS.

The class instance lives for the entire application session for all application and client sessions.

Author:
Christopher Mindus
  • Method Details

    • onInitialized

      default void onInitialized(IAppSessionGyro appGyro)
      Called when the application session is initialized.

      Override to handle initializing. The default does nothing.

      Parameters:
      appGyro - The Application Session Gyro instance.
    • onDisposed

      default void onDisposed(IAppSessionGyro appGyro)
      Called when the application session is disposed of.
      Parameters:
      appGyro - The Application Session Gyro instance.

      Override to handle dispose. The default does nothing.

    • getInitialVSFocus

      default IVSComponent getInitialVSFocus(IAppSessionGyro appGyro, IClientSessionGyro clientGyro)
      Returns the initial focus to set in the application. The component returned is not virtualized and is looked up from the application factory. Use the method IAppSessionGyro.getRuntimePropFromReference(String) to look-up a VS component. Once retrieved, cast it to IVSComponent. The focus might be to the VirtualSpace itself.

      Override to set initial focus. The default returns null for default processing.

      Parameters:
      appGyro - The Application Session Gyro instance.
      clientGyro - The Client Session Gyro instance who's UI focus is to be looked up.
      Returns:
      The initial focus to set, or null for default.
    • findFocusFromVS

      default UIComp findFocusFromVS(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, IVirtualSpaceFocusEngine vsFocusEngine, VirtualSpace vsVirtual, IVSComponent vsComp, UIComp currentFocusedUIComp, boolean mustChangePanel)
      Finds the UI focus from VS.

      Programming note: this method is SYNCHRONIZED on the lock object in case multiple calls to focus is done from threads.

      Override to set process UI focus. The default returns null for default processing.

      Parameters:
      appGyro - The Application Session Gyro instance.
      clientGyro - The Client Session Gyro instance who's UI focus is to be looked up.
      vsFocusEngine - The VS focus engine instance.
      vsVirtual - The current Virtualized VirtualSpace.
      vsComp - The currently focused Virtualized VS component.
      currentFocusedUIComp - Currently focused UI component, null for none.
      mustChangePanel - Flag indicating it's best to change panel, false means try not to do so.
      Returns:
      UIComp component to focus, null for default processing. If the returned component is not virtualized, the panel will be virtualized.