class PageSizeArgument extends OptionArgument {

    private TreeMap<String, String> options = new TreeMap<>();

    /**
     * Constructs an OptionArgument.
     *
     * @param tool        the tool that needs this argument
     * @param name        the name of the argument
     * @param description the description of the argument
     */
    public PageSizeArgument(AbstractTool tool, String name, String description) {
        super(tool, name, description);
        Class<?> ps = PageSize.class;
        Field[] sizes = ps.getDeclaredFields();
        try {
            for (Field size : sizes) {
                addOption(size.getName(), size.get(null));
            }
        } catch (IllegalArgumentException | IllegalAccessException e) {
            e.printStackTrace();
        }
    }

    /**
     * Adds an Option.
     *
     * @param description the description of the option
     * @param value       the value of the option
     */
    public void addOption(String description, String value) {
        options.put(description, value);
    }

    /**
     * Gets the options.
     *
     * @return Returns the options.
     */
    public TreeMap<String, String> getOptions() {
        return options;
    }

    /**
     * Gets the argument as an object.
     *
     * @return an object
     * @throws InstantiationException if the key can't be compared with the other ones in the map
     */
    public Object getArgument() throws InstantiationException {
        if (value == null) {
            return null;
        }
        try {
            return options.get(value);
        } catch (Exception e) {
            throw new InstantiationException(e.getMessage());
        }
    }

    /**
     * @return String
     * @see com.lowagie.toolbox.arguments.StringArgument#getUsage()
     */
    public String getUsage() {<FILL_FUNCTION_BODY>}

    /**
     * @param evt ActionEvent
     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
     */
    public void actionPerformed(ActionEvent evt) {
        Object[] message = new Object[2];
        message[0] = "Choose one of the following pagesizes:";
        JComboBox<String> cb = new JComboBox<>();
        for (String o : options.keySet()) {
            cb.addItem(o);
        }
        message[1] = cb;
        int result = JOptionPane.showOptionDialog(
                tool.getInternalFrame(),
                message,
                description,
                JOptionPane.OK_CANCEL_OPTION,
                JOptionPane.QUESTION_MESSAGE,
                null,
                null,
                null
        );
        if (result == 0) {
            setValue(cb.getSelectedItem());
        }
    }

    /**
     * Returns a string representation of the object.
     *
     * @return a string representation of the object.
     */
    public String toString() {
        return super.getValue().toString();
    }

}

        StringBuilder buf = new StringBuilder("  ");
        buf.append(name);
        buf.append(" -  ");
        buf.append(description);
        buf.append('\n');
        buf.append("    possible options:\n");
        String s;
        for (Object o : options.keySet()) {
            s = (String) o;
            buf.append("    - ");
            buf.append(s);
            buf.append('\n');
        }
        return buf.toString();
    
<methods>public void <init>(com.lowagie.toolbox.AbstractTool, java.lang.String, java.lang.String) ,public void actionPerformed(java.awt.event.ActionEvent) ,public void addOption(java.lang.Object, java.lang.Object) ,public java.lang.Object getArgument() throws java.lang.InstantiationException,public java.lang.String getUsage() <variables>private TreeMap<java.lang.String,com.lowagie.toolbox.arguments.OptionArgument.Entry> options