Class SettableCommandButtonViewer

All Implemented Interfaces:
ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, SwingConstants

public class SettableCommandButtonViewer extends SimpleCommandButtonViewer
A SimpleCommandButtonViewer which command's input can be set.
Author:
HO
See Also:
  • Field Details

    • defaultHelpText

      protected boolean defaultHelpText
    • helpText

      protected String helpText
    • buttonText

      protected String buttonText
    • askConfirmation

      protected boolean askConfirmation
    • askConfirmationTitle

      protected String askConfirmationTitle
    • askConfirmationText

      protected String askConfirmationText
    • errorTitle

      protected String errorTitle
    • errorText

      protected String errorText
    • errorReasonTitle

      protected String errorReasonTitle
    • commandInput

      protected String[] commandInput
    • m_argin

      protected List<String> m_argin
    • threadedCommand

      protected boolean threadedCommand
  • Constructor Details

    • SettableCommandButtonViewer

      public SettableCommandButtonViewer()
      Constructor
  • Method Details

    • getHelpText

      public String getHelpText()
      Returns:
      Returns the helpText.
    • setHelpText

      public void setHelpText(String helpText)
      Sets the button help text
      Parameters:
      helpText - The help text to set.
    • isDefaultHelpText

      public boolean isDefaultHelpText()
      Returns whether the default help text is used
      Returns:
      a boolean value. True if the default help text is used, False otherwise
    • setDefaultHelpText

      public void setDefaultHelpText(boolean defaultHelpText)
      Sets whether you wish to use the default help textx
      Parameters:
      defaultHelpText - a boolean value. True to use the default help text, False otherwise
    • setCommandInput

      public void setCommandInput(String[] input)
      Sets the command input
      Parameters:
      input - The command input to set, represented as a String[].
    • getCommandInput

      public String[] getCommandInput()
      Returns the command input
      Returns:
      the command input represented as a String[]
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class SimpleCommandButtonViewer
    • getButtonText

      public String getButtonText()
      Returns:
      Returns the button text.
    • setButtonText

      public void setButtonText(String buttonText)
      Parameters:
      buttonText - The button text to set.
    • isAskConfirmation

      public boolean isAskConfirmation()
      Returns whether execution confirmation will be asked to user.
      Returns:
      a boolean value
    • setAskConfirmation

      public void setAskConfirmation(boolean askConfirmation)
      Sets whether execution confirmation will be asked to user.
      Parameters:
      askConfirmation - a boolean value
    • getAskConfirmationText

      public String getAskConfirmationText()
      Returns the execution confirmation text
      Returns:
      a String
    • setAskConfirmationText

      public void setAskConfirmationText(String textAskConfirmation)
      Sets the execution confirmation text
      Parameters:
      textAskConfirmation - a String
    • getAskConfirmationTitle

      public String getAskConfirmationTitle()
      Returns the confirmation title
      Returns:
      the confirmation title
    • setAskConfirmationTitle

      public void setAskConfirmationTitle(String titleAskConfirmation)
      Sets the confirmation title
      Parameters:
      titleAskConfirmation - Title of confirmation window
    • displayErrorMessage

      protected void displayErrorMessage(Throwable error, fr.esrf.tangoatk.core.ICommand command)
      Displays an error message in a dialog.
      Parameters:
      error - The throwable which represents the reason of the error
      command - The command which is the source of the error
    • getErrorTitle

      public String getErrorTitle()
      Returns:
      the errorTitle
    • setErrorTitle

      public void setErrorTitle(String errorTitle)
      Parameters:
      errorTitle - the errorTitle to set
    • getErrorText

      public String getErrorText()
      Returns:
      the errorText
    • setErrorText

      public void setErrorText(String errorText)
      Parameters:
      errorText - the errorText to set
    • getErrorReasonTitle

      public String getErrorReasonTitle()
      Returns:
      the errorReasonTitle
    • setErrorReasonTitle

      public void setErrorReasonTitle(String errorReasonTitle)
      Parameters:
      errorReasonTitle - the errorReasonTitle to set
    • isThreadedCommand

      public boolean isThreadedCommand()
      Returns whether command will be launched through a thread or not.
      Returns:
      a boolean value. True if a thread will be used, False otherwise.
    • setThreadedCommand

      public void setThreadedCommand(boolean threadedCommand)
      Sets whether to launch command through a thread or not.
      Parameters:
      threadedCommand - a boolean value. True if a thread will be used, False otherwise.
    • main

      public static void main(String[] args) throws fr.esrf.tangoatk.core.ConnectionException, fr.esrf.Tango.DevFailed
      Throws:
      fr.esrf.tangoatk.core.ConnectionException
      fr.esrf.Tango.DevFailed