Package jmri.jmrit.logixng.swing
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 Summary
Modifier and TypeMethodDescriptiondefault booleancanClose()Is the SWI ready to be closed?default intcreateNewObject(String systemName, String userName) Create a new object with the data entered.This method must also register the object in its manager.voiddispose()Dispose the panel and remove all the listeners that this class may have registered.voidexecuteEvaluate(Base object) Execute or evaluate an item that this object configures.Create a new system name.getConfigPanel(JPanel buttonPanel) Get a configuration panel when a new object is to be created and we don't have it yet.getConfigPanel(Base object, JPanel buttonPanel) Get a configuration panel for an object.Get an example of a system nameGet the menu text for execute/evaluate.Set the dialog of this SWI.BaseManager<? extends NamedBean>Get the manager that handles the beans for the new object.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.default voidSet default values for this dialog.voidsetJDialog(JDialog dialog) Set the dialog of this SWI.toString()Returns the name of the class that this class configures.voidupdateObject(Base object) Updates the object with the data in the form.booleanValidate the form.
-
Method Details
-
setJDialog
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
BaseManager<? extends NamedBean> 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
JPanel getConfigPanel(@Nonnull Base object, @Nonnull JPanel buttonPanel) throws IllegalArgumentException 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 panelbuttonPanel- panel with the buttons- Returns:
- a panel that configures this object
- Throws:
IllegalArgumentException- when needed
-
validate
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
@Nonnull MaleSocket createNewObject(@Nonnull String systemName, @CheckForNull String userName) throws NamedBean.BadUserNameException, NamedBean.BadSystemNameException Create a new object with the data entered.This method must also register the object in its manager.- Parameters:
systemName- system nameuserName- user name- Returns:
- a male socket for the new object
- Throws:
NamedBean.BadUserNameException- when neededNamedBean.BadSystemNameException- when needed
-
updateObject
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. -
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
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
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 parsedcomponents- the components- Returns:
- the components separated with JLabel components
-
compareTo
- Specified by:
compareToin interfaceComparable<SwingConfiguratorInterface>
-