/** Saves the values to the preferences */ @Override public boolean ok() { pnlApiUrlPreferences.saveToPreferences(); pnlAuthPreferences.saveToPreferences(); pnlProxyPreferences.saveToPreferences(); return false; }
/** * Builds the panel for entering the server access preferences * * @return preferences panel for server settings */ protected JPanel buildContentPanel() { JPanel pnl = new JPanel(new GridBagLayout()); GridBagConstraints gc = new GridBagConstraints(); // the checkbox for the default UL gc.fill = GridBagConstraints.HORIZONTAL; gc.anchor = GridBagConstraints.NORTHWEST; gc.weightx = 1.0; gc.insets = new Insets(0, 0, 0, 0); pnl.add(pnlApiUrlPreferences = new OsmApiUrlInputPanel(), gc); // the remaining access properties gc.gridy = 1; gc.fill = GridBagConstraints.BOTH; gc.weightx = 1.0; gc.weighty = 1.0; gc.insets = new Insets(10, 0, 3, 3); pnl.add(buildTabbedServerPreferences(), gc); // let the AuthPreferencesPanel know when the API URL changes // pnlApiUrlPreferences.addPropertyChangeListener(pnlAuthPreferences); HelpUtil.setHelpContext(pnl, HelpUtil.ht("/Preferences/Connection")); return pnl; }
/** Initializes the configuration panel with values from the preferences */ public void initFromPreferences() { pnlApiUrlPreferences.initFromPreferences(); pnlAuthPreferences.initFromPreferences(); pnlProxyPreferences.initFromPreferences(); }