Class PromptUser

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, ShallowCopySupporter<AbstractActorTemplate>, SizeOfHandler, Serializable

    public class PromptUser
    extends AbstractActorTemplate
    Generates a sub-flow that prompts the user with the specified parameters and stores the values in variables.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The new name for the actor; leave empty to use current.
        default:
     
    -message <java.lang.String> (property: message)
        The message to prompt the user with.
        default: Please enter values
     
    -value <adams.flow.source.valuedefinition.AbstractValueDefinition> [-value ...] (property: values)
        The value definitions that define the dialog prompting the user to enter
        the values.
        default:
     
    -restore-enabled <boolean> (property: restoreEnabled)
        If enabled, the adams.flow.source.EnterManyValues actor will get set up
        to automatically restore its values.
        default: false
     
    -restore-var <adams.core.VariableName> (property: restoreVar)
        The name of the variable to use for storing the restore file.
        default: restore
     
    -restore-file <java.lang.String> (property: restoreFile)
        The file to store the settings in.
        default: @{flow_filename_long}.props
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Message

        protected String m_Message
        the message for the user.
      • m_RestoreEnabled

        protected boolean m_RestoreEnabled
        whether to enable automatic restore of values.
      • m_RestoreVar

        protected VariableName m_RestoreVar
        the name of the restore variable.
      • m_RestoreFile

        protected String m_RestoreFile
        the name of the restore file.
    • Constructor Detail

      • PromptUser

        public PromptUser()
    • Method Detail

      • setMessage

        public void setMessage​(String value)
        Sets the message to prompt the user with.
        Parameters:
        value - the message
      • getMessage

        public String getMessage()
        Returns the message the user is prompted with.
        Returns:
        the message
      • messageTipText

        public String messageTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setValues

        public void setValues​(AbstractValueDefinition[] value)
        Sets the value definitions.
        Parameters:
        value - the definitions
      • valuesTipText

        public String valuesTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setRestoreEnabled

        public void setRestoreEnabled​(boolean value)
        Sets whether to automatically restore the EnterManyValues settings.
        Parameters:
        value - true if to restore
      • getRestoreEnabled

        public boolean getRestoreEnabled()
        Returns whether to automatically restore the EnterManyValues settings.
        Returns:
        true if to restore
      • restoreEnabledTipText

        public String restoreEnabledTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setRestoreVar

        public void setRestoreVar​(VariableName value)
        Sets the variable name to use for the restore file.
        Parameters:
        value - the variable name
      • getRestoreVar

        public VariableName getRestoreVar()
        Returns the variable name to use for the restore file.
        Returns:
        the variable name
      • restoreVarTipText

        public String restoreVarTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setRestoreFile

        public void setRestoreFile​(String value)
        Sets the file to store the settings in.
        Parameters:
        value - the settings file
      • getRestoreFile

        public String getRestoreFile()
        Returns the file to store the settings in.
        Returns:
        the settings file
      • restoreFileTipText

        public String restoreFileTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • isInteractive

        public boolean isInteractive()
        Whether the flow generated is an interactive one.
        Specified by:
        isInteractive in class AbstractActorTemplate
        Returns:
        true if interactive