Interface UiInspector

All Known Implementing Classes:
EntityEditorInspector, EntityTableModelInspector

public interface UiInspector
Provides a description of the application state behind a UI component, as a structure of plain values (maps, lists, scalars), for tooling and automation. Implementations are located using a ServiceLoader, so consumers depend only on this interface and not on any particular application framework.

Must be called on the event dispatch thread, since it reads UI and model state.

  • Method Details

    • state

      Optional<Map<String,Object>> state(Component focusOwner)
      Parameters:
      focusOwner - the component to inspect, typically the current focus owner
      Returns:
      a description of the state behind the given component, or an empty Optional if this inspector does not apply to it
    • instances

      static List<UiInspector> instances()
      Returns:
      the available UiInspector instances, located using a ServiceLoader