Class OptionArgument

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.util.EventListener
    Direct Known Subclasses:
    PageSizeArgument

    public class OptionArgument
    extends AbstractArgument
    Argument that can be one of several options.
    Since:
    2.1.1 (imported from itexttoolbox project)
    • Constructor Detail

      • OptionArgument

        public OptionArgument​(AbstractTool tool,
                              java.lang.String name,
                              java.lang.String description)
        Constructs an OptionArgument.
        Parameters:
        tool - the tool that needs this argument
        name - the name of the argument
        description - the description of the argument
    • Method Detail

      • addOption

        public void addOption​(java.lang.Object description,
                              java.lang.Object value)
        Adds an Option.
        Parameters:
        description - the description of the option
        value - the value of the option
      • getArgument

        public java.lang.Object getArgument()
                                     throws java.lang.InstantiationException
        Gets the argument as an object.
        Overrides:
        getArgument in class AbstractArgument
        Returns:
        an object
        Throws:
        java.lang.InstantiationException - if the specified key cannot be compared with the keys currently in the map
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent evt)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Specified by:
        actionPerformed in class AbstractArgument
        Parameters:
        evt - ActionEvent
        See Also:
        ActionListener.actionPerformed(java.awt.event.ActionEvent)