Class OptionComboCommandViewer

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
fr.esrf.tangoatk.widget.command.OptionComboCommandViewer
All Implemented Interfaces:
fr.esrf.tangoatk.core.IErrorListener, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class OptionComboCommandViewer extends JPanel implements ActionListener, fr.esrf.tangoatk.core.IErrorListener
An OptionComboCommandViewer is a StringVoidCommand viewer. This means that the command used as the model for this viewer takes a String input argument and returns no output argument. To be able to use a String-Void Command as the model for OptionComboCommandViewer the String-Void command should accept only a limited number of strings as it's input. Typically this viewer is used for a command which accepts a limited number of "options" defined as strings. The valid options for the command are displayed in a comboBox. When an item is selected in the comboBox, the command is executed with the input parameter = selected item. The list of possible options is given to the viewer by calling the method "setOptionList".
See Also:
  • Constructor Details

    • OptionComboCommandViewer

      public OptionComboCommandViewer()
    • OptionComboCommandViewer

      public OptionComboCommandViewer(String cmdTitle)
  • Method Details

    • enableExecution

      public void enableExecution()
    • disableExecution

      public void disableExecution()
    • getTheFont

      public Font getTheFont()
    • setTheFont

      public void setTheFont(Font ft)
    • getModel

      public fr.esrf.tangoatk.core.ICommand getModel()
    • setModel

      public void setModel(fr.esrf.tangoatk.core.ICommand optionCmdModel)
    • clearModel

      public void clearModel()
    • getOptionList

      public String[] getOptionList()
    • setOptionList

      public void setOptionList(String[] optStrList)
    • getValueList

      public String[] getValueList()
    • setValueList

      public void setValueList(String[] valueList)
    • getCmdOption

      public String getCmdOption(JComboBox source)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String newTitle)
    • getSelectedIndex

      public int getSelectedIndex()
    • setSelectedIndex

      public void setSelectedIndex(int idx) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • errorChange

      public void errorChange(fr.esrf.tangoatk.core.ErrorEvent e)
      Specified by:
      errorChange in interface fr.esrf.tangoatk.core.IErrorListener
    • main

      public static void main(String[] args)