Changeset 4976 in josm for trunk/src/org
- Timestamp:
- 2012-02-18T01:17:18+01:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/preferences
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/AudioPreference.java
r4968 r4976 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.GridBagLayout; 7 6 8 import javax.swing.Box; 7 9 import javax.swing.JCheckBox; 8 10 import javax.swing.JLabel; 11 import javax.swing.JPanel; 9 12 import javax.swing.JTextField; 10 13 11 14 import org.openstreetmap.josm.Main; 12 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.PreferencePanel;13 15 import org.openstreetmap.josm.tools.GBC; 14 16 … … 54 56 55 57 public void addGui(PreferenceTabbedPane gui) { 56 PreferencePanel audio = gui.createPreferenceTab(this);58 JPanel audio = new JPanel(new GridBagLayout()); 57 59 58 60 // audioMenuVisible … … 119 121 120 122 audio.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL)); 123 124 createPreferenceTabWithScrollPane(gui, audio); 121 125 } 122 126 -
trunk/src/org/openstreetmap/josm/gui/preferences/DefaultTabPreferenceSetting.java
r4968 r4976 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.preferences; 3 4 import javax.swing.JPanel; 5 import javax.swing.JScrollPane; 6 7 import org.openstreetmap.josm.tools.GBC; 3 8 4 9 public abstract class DefaultTabPreferenceSetting extends DefaultPreferenceSetting implements TabPreferenceSetting { … … 46 51 return title; 47 52 } 53 54 protected final void createPreferenceTabWithScrollPane(PreferenceTabbedPane gui, JPanel panel) { 55 GBC a = GBC.eol().insets(-5,0,0,0); 56 a.anchor = GBC.EAST; 57 58 JScrollPane scrollPane = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); 59 scrollPane.setBorder(null); 60 61 JPanel tab = gui.createPreferenceTab(this); 62 tab.add(scrollPane, GBC.eol().fill(GBC.BOTH)); 63 tab.add(GBC.glue(0,10), a); 64 } 48 65 } -
trunk/src/org/openstreetmap/josm/gui/preferences/RemoteControlPreference.java
r4968 r4976 61 61 public void addGui(final PreferenceTabbedPane gui) { 62 62 63 JPanel remote = gui.createPreferenceTab(this);63 JPanel remote = new JPanel(new GridBagLayout()); 64 64 65 65 remote.add(enableRemoteControl = new JCheckBox(tr("Enable remote control"), RemoteControl.PROP_REMOTECONTROL_ENABLED.get()), GBC.eol()); … … 123 123 enableRemoteControl.addActionListener(remoteControlEnabled); 124 124 remoteControlEnabled.actionPerformed(null); 125 createPreferenceTabWithScrollPane(gui, remote); 125 126 } 126 127 -
trunk/src/org/openstreetmap/josm/gui/preferences/ValidatorPreference.java
r4968 r4976 13 13 import javax.swing.JLabel; 14 14 import javax.swing.JPanel; 15 import javax.swing.JScrollPane;16 15 17 16 import org.openstreetmap.josm.Main; … … 114 113 } 115 114 116 JScrollPane testPane = new JScrollPane(testPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); 117 testPane.setBorder(null); 118 119 JPanel tab = gui.createPreferenceTab(this); 120 tab.add(testPane, GBC.eol().fill(GBC.BOTH)); 121 tab.add(GBC.glue(0,10), a); 115 createPreferenceTabWithScrollPane(gui, testPanel); 122 116 } 123 117
Note:
See TracChangeset
for help on using the changeset viewer.