Package jmri.jmrit.logixng.swing
Interface SwingConfiguratorInterface
-
- All Superinterfaces:
java.lang.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
,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
,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
,ForSwing
,HoldSwing
,IfThenElseSwing
,JsonDecodeSwing
,LastResultOfDigitalExpressionSwing
,LogDataSwing
,LogDataSwing
,LogixSwing
,LogLocalVariablesSwing
,ModuleEditorMaleSocketSwing
,NotSwing
,OrSwing
,ProgramOnMainSwing
,PublishSwing
,ReturnSwing
,RunOnceSwing
,SequenceSwing
,SetSpeedZeroSwing
,ShowDialogSwing
,ShutdownComputerSwing
,SimulateTurnoutFeedbackSwing
,StringActionMemorySwing
,StringActionStringIOSwing
,StringExpressionConstantSwing
,StringExpressionMemorySwing
,StringFormulaSwing
,StringManySwing
,SubscribeSwing
,TableForEachSwing
,TimeoutSwing
,TimerSwing
,TimeSinceMidnightSwing
,TriggerOnceSwing
,TriggerRouteSwing
,TrueSwing
,WebBrowserSwing
,WebRequestSwing
,WindowManagementSwing
public interface SwingConfiguratorInterface extends java.lang.Comparable<SwingConfiguratorInterface>
The parent interface for configuring classes with Swing.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
canClose()
Is the SWI ready to be closed?default int
compareTo(SwingConfiguratorInterface swi)
MaleSocket
createNewObject(java.lang.String systemName, java.lang.String userName)
Create a new object with the data entered.This method must also register the object in its manager.void
dispose()
Dispose the panel and remove all the listeners that this class may have registered.void
executeEvaluate(Base object)
Execute or evaluate an item that this object configures.java.lang.String
getAutoSystemName()
Create a new system name.javax.swing.JPanel
getConfigPanel(javax.swing.JPanel buttonPanel)
Get a configuration panel when a new object is to be created and we don't have it yet.javax.swing.JPanel
getConfigPanel(Base object, javax.swing.JPanel buttonPanel)
Get a configuration panel for an object.java.lang.String
getExampleSystemName()
Get an example of a system namejava.lang.String
getExecuteEvaluateMenuText()
Get the menu text for execute/evaluate.javax.swing.JDialog
getJDialog()
Set the dialog of this SWI.BaseManager<? extends NamedBean>
getManager()
Get the manager that handles the beans for the new object.static java.util.List<javax.swing.JComponent>
parseMessage(java.lang.String message, javax.swing.JComponent[] components)
Parses the message and creates a list of components there the given components are separated by JLabel components from the message.default void
setDefaultValues()
Set default values for this dialog.void
setJDialog(javax.swing.JDialog dialog)
Set the dialog of this SWI.java.lang.String
toString()
Returns the name of the class that this class configures.void
updateObject(Base object)
Updates the object with the data in the form.boolean
validate(java.util.List<java.lang.String> errorMessages)
Validate the form.
-
-
-
Method Detail
-
setJDialog
void setJDialog(javax.swing.JDialog dialog)
Set the dialog of this SWI.- Parameters:
dialog
- the dialog
-
getJDialog
javax.swing.JDialog getJDialog()
Set the dialog of this SWI.- Returns:
- the dialog
-
getExecuteEvaluateMenuText
java.lang.String getExecuteEvaluateMenuText()
Get the menu text for execute/evaluate.- Returns:
- the menu text
-
executeEvaluate
void executeEvaluate(@Nonnull Base object)
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
javax.swing.JPanel getConfigPanel(javax.swing.JPanel buttonPanel) throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException
- if this class does not support the class with the name given in parameter 'className'
-
getConfigPanel
javax.swing.JPanel getConfigPanel(@Nonnull Base object, javax.swing.JPanel buttonPanel) throws java.lang.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:
java.lang.IllegalArgumentException
-
validate
boolean validate(@Nonnull java.util.List<java.lang.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
java.lang.String getExampleSystemName()
Get an example of a system name- Returns:
- the system name
-
getAutoSystemName
java.lang.String getAutoSystemName()
Create a new system name.- Returns:
- a new system name
-
createNewObject
@Nonnull MaleSocket createNewObject(@Nonnull java.lang.String systemName, @CheckForNull java.lang.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
NamedBean.BadSystemNameException
-
updateObject
void updateObject(@Nonnull Base object)
Updates the object with the data in the form.- Parameters:
object
- the object to update
-
toString
java.lang.String toString()
Returns the name of the class that this class configures.- Overrides:
toString
in classjava.lang.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 java.util.List<javax.swing.JComponent> parseMessage(java.lang.String message, javax.swing.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 parsedcomponents
- the components- Returns:
- the components separated with JLabel components
-
compareTo
default int compareTo(SwingConfiguratorInterface swi)
- Specified by:
compareTo
in interfacejava.lang.Comparable<SwingConfiguratorInterface>
-
-