Interface SwingConfiguratorInterface

All Superinterfaces:
Comparable<SwingConfiguratorInterface>
All Known Implementing Classes:
AbstractAnalogActionSwing, AbstractAnalogExpressionSwing, AbstractBooleanActionSwing, AbstractDebuggerMaleSocketSwing, AbstractDigitalActionSwing, AbstractDigitalExpressionSwing, AbstractMaleSocketSwing, AbstractStringActionSwing, AbstractStringExpressionSwing, AbstractSwingConfigurator, ActionAudioIconSwing, ActionAudioSwing, ActionBlockSwing, ActionClearSlotsSwing, ActionClockRateSwing, ActionClockSwing, ActionCreateBeansFromTableSwing, ActionDispatcherSwing, ActionEntryExitSwing, ActionFindTableRowOrColumnSwing, ActionLayoutTurnoutSwing, ActionLightIntensitySwing, ActionLightSwing, ActionListenOnBeansLocalVariableSwing, ActionListenOnBeansSwing, ActionListenOnBeansTableSwing, ActionLocalVariableSwing, ActionMemorySwing, ActionOBlockSwing, ActionPositionableByClassSwing, ActionPositionableSwing, ActionPowerSwing, ActionReporterSwing, ActionRequestUpdateAllSensorsSwing, ActionRequestUpdateOfSensorSwing, ActionRequestUpdateOfTurnoutSwing, ActionScriptSwing, ActionSensorSwing, ActionSetReporterSwing, ActionShutDownTaskSwing, ActionSignalHeadSwing, ActionSignalMastSwing, ActionSoundSwing, ActionTableSwing, ActionThrottleFunctionSwing, ActionThrottleSwing, ActionTimerSwing, ActionTurnoutLockSwing, ActionTurnoutSwing, ActionUpdateSlotsSwing, ActionWarrantSwing, AnalogActionLightIntensitySwing, AnalogActionMemorySwing, AnalogExpressionAnalogIOSwing, AnalogExpressionConstantSwing, AnalogExpressionLocalVariableSwing, AnalogExpressionMemorySwing, AnalogFormulaSwing, AnalogManySwing, AndSwing, AntecedentSwing, BreakSwing, ConnectionNameSwing, ContinueSwing, DebuggerMaleAnalogActionSocketSwing, DebuggerMaleAnalogExpressionSocketSwing, DebuggerMaleDigitalActionSocketSwing, DebuggerMaleDigitalBooleanActionSocketSwing, DebuggerMaleDigitalExpressionSocketSwing, DebuggerMaleStringActionSocketSwing, DebuggerMaleStringExpressionSocketSwing, DefaultMaleAnalogActionSocketSwing, DefaultMaleAnalogExpressionSocketSwing, DefaultMaleDigitalActionSocketSwing, DefaultMaleDigitalBooleanActionSocketSwing, DefaultMaleDigitalExpressionSocketSwing, DefaultMaleStringActionSocketSwing, DefaultMaleStringExpressionSocketSwing, DefaultModuleSwing, DigitalBooleanLogixActionSwing, DigitalBooleanManySwing, DigitalCallModuleSwing, DigitalCallModuleSwing, DigitalFormulaSwing, DigitalFormulaSwing, DigitalManySwing, DoAnalogActionSwing, DoStringActionSwing, EnableLogixNGSwing, EnableLogixSwing, ErrorSwing, ExecuteActionSwing, ExecuteDelayedSwing, ExecuteProgramSwing, ExitSwing, ExpressionAudioSwing, ExpressionBlockSwing, ExpressionClockSwing, ExpressionConditionalSwing, ExpressionDispatcherSwing, ExpressionEntryExitSwing, ExpressionLightSwing, ExpressionLinuxLinePowerSwing, ExpressionLocalVariableSwing, ExpressionMemorySwing, ExpressionOBlockSwing, ExpressionPowerSwing, ExpressionReferenceSwing, ExpressionReporterSwing, ExpressionScriptSwing, ExpressionSectionSwing, ExpressionSensorEdgeSwing, ExpressionSensorSwing, ExpressionSignalHeadSwing, ExpressionSignalMastSwing, ExpressionSlotUsageSwing, ExpressionTransitSwing, ExpressionTurnoutSwing, ExpressionWarrantSwing, FalseSwing, FileAsFlagSwing, ForEachSwing, ForEachWithDelaySwing, ForSwing, HoldSwing, IfThenElseSwing, JsonDecodeSwing, LastResultOfDigitalExpressionSwing, LogDataSwing, LogDataSwing, LogixSwing, LogLocalVariablesSwing, ModuleEditorMaleSocketSwing, NotSwing, OperationsProStartAutomationSwing, OrSwing, ProgramOnMainSwing, PublishSwing, ReturnSwing, RunOnceSwing, SendMergCbusEventSwing, SequenceSwing, SetSpeedZeroSwing, ShowDialogSwing, ShutdownComputerSwing, SimulateTurnoutFeedbackSwing, StringActionMemorySwing, StringActionStringIOSwing, StringExpressionConstantSwing, StringExpressionMemorySwing, StringExpressionStringIOSwing, StringFormulaSwing, StringManySwing, SubscribeSwing, TableForEachSwing, TimeoutSwing, TimerSwing, TimeSinceMidnightSwing, TriggerOnceSwing, TriggerRouteSwing, TrueSwing, WebBrowserSwing, WebRequestSwing, WindowManagementSwing

The parent interface for configuring classes with Swing.
  • Method Details

    • setJDialog

      void setJDialog(JDialog dialog)
      Set the dialog of this SWI.
      Parameters:
      dialog - the dialog
    • getJDialog

      Set the dialog of this SWI.
      Returns:
      the dialog
    • getExecuteEvaluateMenuText

      Get the menu text for execute/evaluate.
      Returns:
      the menu text
    • executeEvaluate

      Execute or evaluate an item that this object configures.
      Parameters:
      object - the object to execute or evaluate
    • getManager

      Get the manager that handles the beans for the new object. This is used for validation of the system name for the bean that this class creates.
      Returns:
      the manager
    • getConfigPanel

      Get a configuration panel when a new object is to be created and we don't have it yet. This method initializes the panel with an empty configuration.
      Parameters:
      buttonPanel - panel with the buttons
      Returns:
      a panel that configures this object
      Throws:
      IllegalArgumentException - if this class does not support the class with the name given in parameter 'className'
    • getConfigPanel

      Get a configuration panel for an object. This method initializes the panel with the configuration of the object.
      Parameters:
      object - the object for which to return a configuration panel
      buttonPanel - panel with the buttons
      Returns:
      a panel that configures this object
      Throws:
      IllegalArgumentException - when needed
    • validate

      boolean validate(@Nonnull List<String> errorMessages)
      Validate the form.

      The parameter errorMessage is used to give the error message in case of an error. If there are errors, the error messages is added to the list errorMessage.

      Parameters:
      errorMessages - the error messages in case of an error
      Returns:
      true if data in the form is valid, false otherwise
    • getExampleSystemName

      Get an example of a system name
      Returns:
      the system name
    • getAutoSystemName

      Create a new system name.
      Returns:
      a new system name
    • createNewObject

      Create a new object with the data entered.This method must also register the object in its manager.
      Parameters:
      systemName - system name
      userName - user name
      Returns:
      a male socket for the new object
      Throws:
      NamedBean.BadUserNameException - when needed
      NamedBean.BadSystemNameException - when needed
    • updateObject

      void updateObject(@Nonnull Base object)
      Updates the object with the data in the form.
      Parameters:
      object - the object to update
    • toString

      Returns the name of the class that this class configures.
      Overrides:
      toString in class Object
      Returns:
      the name of the class this class configures.
    • setDefaultValues

      default void setDefaultValues()
      Set default values for this dialog. This method is used by tests to be able to run validation without knowing which data that needs to be entered for the validation to pass.
    • canClose

      default boolean canClose()
      Is the SWI ready to be closed?
      Returns:
      true if the SWI is ready to be closed, false otherwise.
    • dispose

      void dispose()
      Dispose the panel and remove all the listeners that this class may have registered.
    • parseMessage

      static List<JComponent> parseMessage(String message, JComponent[] components)
      Parses the message and creates a list of components there the given components are separated by JLabel components from the message.
      Parameters:
      message - the message to be parsed
      components - the components
      Returns:
      the components separated with JLabel components
    • compareTo

      Specified by:
      compareTo in interface Comparable<SwingConfiguratorInterface>