Interface DisplayService

    • Method Detail

      • getActiveDisplay

        Display<?> getActiveDisplay()
        Gets the currently active display (of any Display type).
      • getActiveDisplay

        <D extends Display<?>> D getActiveDisplay​(Class<D> displayClass)
        Gets the most recently active display (of the specified Display type).
      • setActiveDisplay

        void setActiveDisplay​(Display<?> display)
        Set the active display.
        Parameters:
        display -
      • getDisplayPlugins

        List<PluginInfo<Display<?>>> getDisplayPlugins()
        Gets the list of known display plugins.
      • getDisplayPlugin

        <D extends Display<?>> PluginInfo<Display<?>> getDisplayPlugin​(Class<D> pluginClass)
        Gets the display plugin of the given class, or null if none.
      • getDisplayPlugin

        PluginInfo<Display<?>> getDisplayPlugin​(String className)
        Gets the display plugin of the given class name, or null if none.
        Throws:
        ClassCastException - if the plugin found is not a display plugin.
      • getDisplayPluginsOfType

        <DT extends Display<?>> List<PluginInfo<DT>> getDisplayPluginsOfType​(Class<DT> type)
        Gets the list of display plugins of the given type (e.g., ImageDisplay.class).
      • getDisplays

        List<Display<?>> getDisplays()
        Gets a list of all available displays.
      • getDisplaysOfType

        <DT extends Display<?>> List<DT> getDisplaysOfType​(Class<DT> type)
        Gets a list of all available displays of the given type (e.g., ImageDisplay.class).
      • getDisplay

        Display<?> getDisplay​(String name)
        Gets a display by its name.
      • getDisplays

        List<Display<?>> getDisplays​(Object o)
        Gets a list of displays currently visualizing the given object.
      • isUniqueName

        boolean isUniqueName​(String name)
        Checks whether the given name is already taken by an existing display.
        Parameters:
        name - The name to check.
        Returns:
        true if the name is available, false if already taken.
      • createDisplay

        Display<?> createDisplay​(Object o)
        Creates a display for the given object, publishing a DisplayCreatedEvent to notify interested parties. In particular:
        • Visible UIs will respond to this event by showing the display.
        • The ObjectService will add the new display to its index, until a corresponding DisplayDeletedEvent is later published.

        To create a Display without publishing an event, see createDisplayQuietly(java.lang.Object).

        Parameters:
        o - The object for which a display should be created. The object is then added to the display.
        Returns:
        Newly created Display<?> containing the given object. The Display is typed with ? rather than T matching the Object because it is possible for the Display to be a collection of some other sort of object than the one being added. For example, ImageDisplay is a Display<DataView> with the DataView wrapping a Dataset, yet the ImageDisplay supports adding Datasets directly, taking care of wrapping them in a DataView as needed.
      • createDisplay

        Display<?> createDisplay​(String name,
                                 Object o)
        Creates a display for the given object, publishing a DisplayCreatedEvent to notify interested parties. In particular:
        • Visible UIs will respond to this event by showing the display.
        • The ObjectService will add the new display to its index, until a corresponding DisplayDeletedEvent is later published.

        To create a Display without publishing an event, see createDisplayQuietly(java.lang.Object).

        Parameters:
        name - The name to be assigned to the display.
        o - The object for which a display should be created. The object is then added to the display.
        Returns:
        Newly created Display<?> containing the given object. The Display is typed with ? rather than T matching the Object because it is possible for the Display to be a collection of some other sort of object than the one being added. For example, ImageDisplay is a Display<DataView> with the DataView wrapping a Dataset, yet the ImageDisplay supports adding Datasets directly, taking care of wrapping them in a DataView as needed.
      • createDisplayQuietly

        Display<?> createDisplayQuietly​(Object o)
        Creates a display for the given object, without publishing a DisplayCreatedEvent. Hence, the display will not be automatically shown or tracked.
        Parameters:
        o - The object for which a display should be created. The object is then added to the display.
        Returns:
        Newly created Display<?> containing the given object. The Display is typed with ? rather than T matching the Object because it is possible for the Display to be a collection of some other sort of object than the one being added. For example, ImageDisplay is a Display<DataView> with the DataView wrapping a Dataset, yet the ImageDisplay supports adding Datasets directly, taking care of wrapping them in a DataView as needed.