Package jmri
Interface ConditionalAction
-
- All Known Implementing Classes:
DefaultConditionalAction
public interface ConditionalAction
The consequent of the antecedent of the conditional proposition. The data for the action to be taken when a Conditional calculates to True.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
description(boolean triggerType)
Get an I18N description of the ConditionAction.void
dispose()
Dispose this ConditionalAction.int
getActionData()
Integer data for action.java.lang.String
getActionDataString()
Get an I18N String to represent the Action Data.java.lang.String
getActionString()
String data for action.NamedBean
getBean()
java.lang.String
getDeviceName()
Name of the device or element that is effected.java.awt.event.ActionListener
getListener()
NamedBeanHandle<?>
getNamedBean()
int
getOption()
Options on when action is taken.java.lang.String
getOptionString(boolean type)
Get the Option String in I18N format.Sound
getSound()
Get the Sound.javax.swing.Timer
getTimer()
Conditional.Action
getType()
The consequent device or element type.java.lang.String
getTypeString()
boolean
isTimerActive()
void
setActionData(int actionData)
void
setActionData(java.lang.String actionData)
Sets action data from I18N name for it.void
setActionString(java.lang.String actionString)
Set the Action String.void
setDeviceName(java.lang.String deviceName)
void
setListener(java.awt.event.ActionListener listener)
void
setOption(int option)
Set the Action Option.void
setTimer(javax.swing.Timer timer)
void
setType(java.lang.String type)
Sets type from user's name for it.void
setType(Conditional.Action type)
void
startTimer()
void
stopTimer()
-
-
-
Method Detail
-
getActionData
int getActionData()
Integer data for action.- Returns:
- the data
-
getActionDataString
@Nonnull java.lang.String getActionDataString()
Get an I18N String to represent the Action Data.- Returns:
- human readable String of the data.
-
getActionString
@Nonnull java.lang.String getActionString()
String data for action.- Returns:
- the action String
-
getDeviceName
java.lang.String getDeviceName()
Name of the device or element that is effected.- Returns:
- the name
-
getOption
int getOption()
Options on when action is taken.- Returns:
- the option
-
getOptionString
@Nonnull java.lang.String getOptionString(boolean type)
Get the Option String in I18N format.- Parameters:
type
- true if option is a change; false if option is a trigger.- Returns:
- String name of the option for this consequent type.
-
getType
@Nonnull Conditional.Action getType()
The consequent device or element type.- Returns:
- the type
-
getTypeString
@Nonnull java.lang.String getTypeString()
- Returns:
- String name of this consequent type
-
setActionData
void setActionData(java.lang.String actionData)
Sets action data from I18N name for it.- Parameters:
actionData
- user name
-
setActionData
void setActionData(int actionData)
-
setActionString
void setActionString(java.lang.String actionString)
Set the Action String. Any String float values ( delayed Sensor ) should use a . decimal separator.- Parameters:
actionString
- the action String.
-
setDeviceName
void setDeviceName(java.lang.String deviceName)
-
setOption
void setOption(int option)
Set the Action Option.- Parameters:
option
- the action option number.
-
setType
void setType(java.lang.String type)
Sets type from user's name for it.- Parameters:
type
- name of the type
-
setType
void setType(Conditional.Action type)
-
description
@Nonnull java.lang.String description(boolean triggerType)
Get an I18N description of the ConditionAction.- Parameters:
triggerType
- true if option is a change; false if option is a trigger.- Returns:
- human readable description.
-
getTimer
@CheckForNull javax.swing.Timer getTimer()
-
setTimer
void setTimer(javax.swing.Timer timer)
-
isTimerActive
boolean isTimerActive()
-
startTimer
void startTimer()
-
stopTimer
void stopTimer()
-
getListener
@CheckForNull java.awt.event.ActionListener getListener()
-
setListener
void setListener(java.awt.event.ActionListener listener)
-
getSound
@CheckForNull Sound getSound()
Get the Sound.- Returns:
- the sound
-
getNamedBean
@CheckForNull NamedBeanHandle<?> getNamedBean()
-
getBean
@CheckForNull NamedBean getBean()
-
dispose
void dispose()
Dispose this ConditionalAction.
-
-