Ignore:
Timestamp:
2003-10-06T17:55:00+13:00 (21 years ago)
Author:
mdewsnip
Message:

Nearly finished adding tooltips (and thank goodness for that).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java

    r5571 r5589  
    1414import org.greenstone.gatherer.checklist.Entry;
    1515import org.greenstone.gatherer.gui.ModalDialog;
    16 import org.greenstone.gatherer.gui.NumberField;
    1716import org.greenstone.gatherer.gui.SimpleMenuBar;
    1817import org.greenstone.gatherer.util.StaticStrings;
     
    4847    private JTextField library_path_field;
    4948    private JTextField proxy_host_field;
    50     private JTextField proxy_port_field;
     49    private JSpinner proxy_port_field;
    5150    private Preferences self;
    5251
     
    144143    proxy_port_label = new JLabel();
    145144    proxy_port_label.setPreferredSize(LABEL_SIZE);
    146     Dictionary.registerText(proxy_port_label, "Preferences.Connection.Proxy_Port");
    147     proxy_port_field = new NumberField(Gatherer.config.getString("general.proxy_port", true));
     145    Dictionary.registerText(proxy_port_label, "Preferences.Connection.Proxy_Port");
     146    String port_value = Gatherer.config.getString("general.proxy_port", true);
     147    proxy_port_field = new JSpinner(new SpinnerNumberModel((new Integer(port_value)).intValue(), 0, 65535, 1));
    148148    proxy_port_field.setEnabled(currently_enabled);
    149149    Dictionary.registerTooltip(proxy_port_field, "Preferences.Connection.Proxy_Port_Tooltip");
     
    417417        Gatherer.config.set("general.use_proxy", true, use_proxy_checkbox.isSelected());
    418418        Gatherer.config.setString("general.proxy_host", true, proxy_host_field.getText());
    419         Gatherer.config.setString("general.proxy_port", true, proxy_port_field.getText());
     419        Gatherer.config.setString("general.proxy_port", true, proxy_port_field.getValue() + "");
    420420        Gatherer.setProxy();
    421421
Note: See TracChangeset for help on using the changeset viewer.