Interface PluggablePanelFactory


public interface PluggablePanelFactory
Produces plugin panels to extend an openTCS user interface.
  • Method Summary

    Modifier and Type Method Description
    PluggablePanel createPanel​(Kernel.State state)
    Returns a newly created panel.
    java.lang.String getPanelDescription()
    Returns a string describing the factory/the panels provided.
    boolean providesPanel​(Kernel.State state)
    Checks whether this factory produces panels that are available in the passed Kernel.State.
  • Method Details

    • providesPanel

      boolean providesPanel​(Kernel.State state)
      Checks whether this factory produces panels that are available in the passed Kernel.State.
      Parameters:
      state - The kernel state.
      Returns:
      true if, and only if, this factory returns panels that are available in the passed kernel state.
    • getPanelDescription

      @Nonnull java.lang.String getPanelDescription()
      Returns a string describing the factory/the panels provided. This should be a short string that can be displayed e.g. as a menu item for selecting a factory/plugin panel to be displayed.
      Returns:
      A string describing the factory/the panels provided.
    • createPanel

      @Nullable PluggablePanel createPanel​(Kernel.State state)
      Returns a newly created panel. If a reference to the kernel provider has not been set, yet, or has been set to null, this method returns null.
      Parameters:
      state - The kernel state for which to create the panel.
      Returns:
      A newly created panel.