Changeset 4840 in josm for trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
- Timestamp:
- 2012-01-21T23:04:50+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
r4586 r4840 9 9 import java.awt.Dimension; 10 10 import java.awt.FlowLayout; 11 import java.awt.GridBagLayout; 11 12 import java.awt.Insets; 12 13 import java.awt.Toolkit; 13 14 import java.awt.event.ActionEvent; 15 import java.awt.event.ActionListener; 14 16 import java.awt.event.KeyEvent; 15 17 import java.awt.event.WindowAdapter; … … 18 20 import javax.swing.AbstractAction; 19 21 import javax.swing.BorderFactory; 22 import javax.swing.JCheckBox; 20 23 import javax.swing.JComponent; 21 24 import javax.swing.JDialog; … … 24 27 import javax.swing.KeyStroke; 25 28 29 import org.openstreetmap.josm.Main; 26 30 import org.openstreetmap.josm.gui.SideButton; 27 31 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction; 28 32 import org.openstreetmap.josm.gui.help.HelpUtil; 29 33 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.ValidationListener; 34 import org.openstreetmap.josm.tools.GBC; 30 35 import org.openstreetmap.josm.tools.ImageProvider; 31 36 import org.openstreetmap.josm.tools.WindowGeometry; … … 37 42 38 43 protected JPanel buildActionPanel() { 39 JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER)); 40 pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 41 pnl.add(new SideButton(new OKAction())); 42 pnl.add(new SideButton(new CancelAction())); 43 pnl.add(new SideButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Action/Preferences")))); 44 JPanel pnl = new JPanel(new GridBagLayout()); 45 46 JCheckBox expert = new JCheckBox(tr("Expert mode")); 47 expert.setSelected(Main.main.menu.expert.isSelected()); 48 expert.addActionListener(new ActionListener() { 49 public void actionPerformed(ActionEvent e) { 50 Main.main.menu.expert.actionPerformed(null); 51 } 52 }); 53 54 JPanel btns = new JPanel(new FlowLayout(FlowLayout.CENTER)); 55 btns.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 56 btns.add(new SideButton(new OKAction())); 57 btns.add(new SideButton(new CancelAction())); 58 btns.add(new SideButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Action/Preferences")))); 59 pnl.add(expert, GBC.std().insets(5,0,0,0)); 60 pnl.add(btns, GBC.std().fill(GBC.HORIZONTAL)); 44 61 return pnl; 45 62 }
Note:
See TracChangeset
for help on using the changeset viewer.