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
Modifier and TypeMethodDescriptiondescription(boolean triggerType) Get an I18N description of the ConditionAction.voiddispose()Dispose this ConditionalAction.intInteger data for action.Get an I18N String to represent the Action Data.String data for action.getBean()Name of the device or element that is effected.intOptions on when action is taken.getOptionString(boolean type) Get the Option String in I18N format.getSound()Get the Sound.getTimer()getType()The consequent device or element type.booleanvoidsetActionData(int actionData) voidsetActionData(String actionData) Sets action data from I18N name for it.voidsetActionString(String actionString) Set the Action String.voidsetDeviceName(String deviceName) voidsetListener(ActionListener listener) voidsetOption(int option) Set the Action Option.voidvoidSets type from user's name for it.voidsetType(Conditional.Action type) voidvoid
-
Method Details
-
getActionData
int getActionData()Integer data for action.- Returns:
- the data
-
getActionDataString
Get an I18N String to represent the Action Data.- Returns:
- human readable String of the data.
-
getActionString
String data for action.- Returns:
- the action 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
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
The consequent device or element type.- Returns:
- the type
-
getTypeString
- Returns:
- String name of this consequent type
-
setActionData
Sets action data from I18N name for it.- Parameters:
actionData- user name
-
setActionData
-
setActionString
Set the Action String. Any String float values ( delayed Sensor ) should use a . decimal separator.- Parameters:
actionString- the action String.
-
setDeviceName
-
setOption
Set the Action Option.- Parameters:
option- the action option number.
-
setType
Sets type from user's name for it.- Parameters:
type- name of the type
-
setType
-
description
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
-
setTimer
-
isTimerActive
boolean isTimerActive() -
startTimer
void startTimer() -
stopTimer
void stopTimer() -
getListener
-
setListener
-
getSound
Get the Sound.- Returns:
- the sound
-
getNamedBean
-
getBean
-
dispose
void dispose()Dispose this ConditionalAction.
-