Changeset 27857 in osm for applications/editors/josm/plugins/osmarender/src/org
- Timestamp:
- 2012-02-18T15:10:01+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java
r27243 r27857 34 34 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 35 35 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 36 import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting; 37 import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting; 36 38 import org.openstreetmap.josm.io.OsmWriter; 37 39 import org.openstreetmap.josm.io.OsmWriterFactory; … … 142 144 143 145 @Override public PreferenceSetting getPreferenceSetting() { 144 return new PreferenceSetting(){ 145 private JTextField firefox = new JTextField(10); 146 public void addGui(PreferenceTabbedPane gui) { 147 final JPanel panel = new JPanel(new GridBagLayout()); 148 panel.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 )); 149 150 panel.add(new JLabel(tr("Firefox executable")), GBC.std().insets(10,5,5,0)); 151 panel.add(firefox, GBC.eol().insets(0,5,0,0).fill(GBC.HORIZONTAL)); 152 panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH)); 153 firefox.setText(Main.pref.get("osmarender.firefox")); 154 gui.mapcontent.addTab(tr("Osmarender"), panel); 155 } 156 public boolean ok() { 157 Main.pref.put("osmarender.firefox", firefox.getText()); 158 return false; 159 } 160 }; 146 return new OsmarenderPreferenceSetting(); 147 } 148 149 private class OsmarenderPreferenceSetting implements SubPreferenceSetting { 150 151 private JTextField firefox = new JTextField(10); 152 153 @Override 154 public void addGui(PreferenceTabbedPane gui) { 155 final JPanel panel = new JPanel(new GridBagLayout()); 156 panel.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 )); 157 158 panel.add(new JLabel(tr("Firefox executable")), GBC.std().insets(10,5,5,0)); 159 panel.add(firefox, GBC.eol().insets(0,5,0,0).fill(GBC.HORIZONTAL)); 160 panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH)); 161 firefox.setText(Main.pref.get("osmarender.firefox")); 162 gui.getMapPreference().mapcontent.addTab(tr("Osmarender"), panel); 163 } 164 165 @Override 166 public boolean ok() { 167 Main.pref.put("osmarender.firefox", firefox.getText()); 168 return false; 169 } 170 171 @Override 172 public boolean isExpert() { 173 return false; 174 } 175 176 @Override 177 public TabPreferenceSetting getTabPreferenceSetting(final PreferenceTabbedPane gui) { 178 return gui.getMapPreference(); 179 } 180 161 181 } 162 182
Note:
See TracChangeset
for help on using the changeset viewer.