Class SignalMastAddPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, JmriServiceProviderInterface
Direct Known Subclasses:
BiDiBSignalMastAddPane, DccSignalMastAddPane, MatrixSignalMastAddPane, MqttSignalMastAddPane, OlcbSignalMastAddPane, SignalHeadSignalMastAddPane, TurnoutSignalMastAddPane, VirtualSignalMastAddPane

public abstract class SignalMastAddPane extends JPanel implements JmriServiceProviderInterface
Definition of JPanel used to configure a specific SignalMast type. Implementing classes must be registered as service providers of this type to be recognized and usable.

General design documentation is available on the Structure of External System Connections page. The general sequence is:

Since:
4.11.3
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • setAspectNames

      public abstract void setAspectNames(@Nonnull SignalAppearanceMap map, @Nonnull SignalSystem sigSystem)
      Provide a new list of aspects in the signal system. Must be done at startup before the pane is shown. May be done later, to update to a newly selected system.
      Parameters:
      map - the signal appearance map.
      sigSystem - the signal system.
    • canHandleMast

      public abstract boolean canHandleMast(@Nonnull SignalMast mast)
      Can this pane edit a specific mast object, i.e. an object of its type?
      Parameters:
      mast - the SignalMast to possibly display
      Returns:
      true if this pane can handle that mast type; false if can't
    • setMast

      public abstract void setMast(SignalMast mast)
      Load this pane with information from a mast. Do not invoke this if canHandleMast(SignalMast) on that mast returns false.
      Parameters:
      mast - the SignalMast to display or null to reset a previous setting
    • createMast

      public abstract boolean createMast(@Nonnull String sigsysname, @Nonnull String mastname, @Nonnull String username)
      Called to either "create and register" a new, or "update" an existing mast from the given information.
      Parameters:
      sigsysname - the name of the signal system in use
      mastname - the mast type name
      username - user name value
      Returns:
      false if the operation failed, in which case the user should have already been notified
    • getPaneName

      @Nonnull public abstract String getPaneName()
      Returns:
      human-preferred name for type of signal mast, in local language