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.Stringdescription(boolean triggerType)Get an I18N description of the ConditionAction.voiddispose()Dispose this ConditionalAction.intgetActionData()Integer data for action.java.lang.StringgetActionDataString()Get an I18N String to represent the Action Data.java.lang.StringgetActionString()String data for action.NamedBeangetBean()java.lang.StringgetDeviceName()Name of the device or element that is effected.java.awt.event.ActionListenergetListener()NamedBeanHandle<?>getNamedBean()intgetOption()Options on when action is taken.java.lang.StringgetOptionString(boolean type)Get the Option String in I18N format.SoundgetSound()Get the Sound.javax.swing.TimergetTimer()Conditional.ActiongetType()The consequent device or element type.java.lang.StringgetTypeString()booleanisTimerActive()voidsetActionData(int actionData)voidsetActionData(java.lang.String actionData)Sets action data from I18N name for it.voidsetActionString(java.lang.String actionString)Set the Action String.voidsetDeviceName(java.lang.String deviceName)voidsetListener(java.awt.event.ActionListener listener)voidsetOption(int option)Set the Action Option.voidsetTimer(javax.swing.Timer timer)voidsetType(java.lang.String type)Sets type from user's name for it.voidsetType(Conditional.Action type)voidstartTimer()voidstopTimer()
-
-
-
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.
-
-