Class PageSizeArgument

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.util.EventListener

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

      • options

        private java.util.TreeMap<java.lang.String,​java.lang.String> options
    • Constructor Detail

      • PageSizeArgument

        public PageSizeArgument​(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.String description,
                              java.lang.String value)
        Adds an Option.
        Parameters:
        description - the description of the option
        value - the value of the option
      • getOptions

        public java.util.TreeMap<java.lang.String,​java.lang.String> getOptions()
        Gets the options.
        Returns:
        Returns the options.
      • getArgument

        public java.lang.Object getArgument()
                                     throws java.lang.InstantiationException
        Gets the argument as an object.
        Overrides:
        getArgument in class OptionArgument
        Returns:
        an object
        Throws:
        java.lang.InstantiationException - if the key can't be compared with the other ones in the map
      • actionPerformed

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

        public java.lang.String toString()
        Returns a string representation of the object.
        Overrides:
        toString in class AbstractArgument
        Returns:
        a string representation of the object.