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 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.
      • 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.
      • setActionData

        void setActionData​(java.lang.String actionData)
        Sets action data from I18N name for it.
        Parameters:
        actionData - user name
      • 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
      • 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.
      • setTimer

        void setTimer​(javax.swing.Timer timer)
      • setListener

        void setListener​(java.awt.event.ActionListener listener)
      • dispose

        void dispose()
        Dispose this ConditionalAction.