- Timestamp:
- 2012-01-22T10:25:45+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/GPXSettingsPanel.java
r4599 r4844 4 4 import static org.openstreetmap.josm.tools.I18n.trc; 5 5 6 import java.awt.Component; 6 7 import java.awt.GridBagLayout; 7 8 import java.awt.event.ActionEvent; … … 22 23 23 24 import org.openstreetmap.josm.Main; 25 import org.openstreetmap.josm.actions.ExpertToggleAction; 24 26 import org.openstreetmap.josm.gui.layer.markerlayer.Marker; 25 27 import org.openstreetmap.josm.gui.layer.markerlayer.Marker.TemplateEntryProperty; … … 91 93 // makeAutoMarkers 92 94 makeAutoMarkers.setToolTipText(tr("Automatically make a marker layer from any waypoints when opening a GPX layer.")); 95 ExpertToggleAction.addVisibilitySwitcher(makeAutoMarkers); 93 96 add(makeAutoMarkers, GBC.eol().insets(20,0,0,5)); 94 97 … … 104 107 /* ensure that default is in data base */ 105 108 106 add(new JLabel(tr("Draw lines between raw GPS points")), GBC.eol().insets(20,0,0,0)); 109 JLabel label = new JLabel(tr("Draw lines between raw GPS points")); 110 add(label, GBC.eol().insets(20,0,0,0)); 107 111 if (layerName!=null) { 108 112 add(drawRawGpsLinesGlobal, GBC.eol().insets(40,0,0,0)); … … 115 119 add(drawRawGpsLinesAll, GBC.eol().insets(40,0,0,0)); 116 120 } 121 ExpertToggleAction.addVisibilitySwitcher(label); 122 ExpertToggleAction.addVisibilitySwitcher(drawRawGpsLinesGlobal); 123 ExpertToggleAction.addVisibilitySwitcher(drawRawGpsLinesNone); 124 ExpertToggleAction.addVisibilitySwitcher(drawRawGpsLinesLocal); 125 ExpertToggleAction.addVisibilitySwitcher(drawRawGpsLinesAll); 117 126 118 127 drawRawGpsLinesActionListener = new ActionListener(){ … … 135 144 // drawRawGpsMaxLineLengthLocal 136 145 drawRawGpsMaxLineLengthLocal.setToolTipText(tr("Maximum length (in meters) to draw lines for local files. Set to ''-1'' to draw all lines.")); 137 add(new JLabel(tr("Maximum length for local files (meters)")), GBC.std().insets(40,0,0,0)); 146 label = new JLabel(tr("Maximum length for local files (meters)")); 147 add(label, GBC.std().insets(40,0,0,0)); 138 148 add(drawRawGpsMaxLineLengthLocal, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5)); 149 ExpertToggleAction.addVisibilitySwitcher(label); 150 ExpertToggleAction.addVisibilitySwitcher(drawRawGpsMaxLineLengthLocal); 139 151 140 152 // drawRawGpsMaxLineLength 141 153 drawRawGpsMaxLineLength.setToolTipText(tr("Maximum length (in meters) to draw lines. Set to ''-1'' to draw all lines.")); 142 add(new JLabel(tr("Maximum length (meters)")), GBC.std().insets(40,0,0,0)); 154 label = new JLabel(tr("Maximum length (meters)")); 155 add(label, GBC.std().insets(40,0,0,0)); 143 156 add(drawRawGpsMaxLineLength, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5)); 157 ExpertToggleAction.addVisibilitySwitcher(label); 158 ExpertToggleAction.addVisibilitySwitcher(drawRawGpsMaxLineLength); 144 159 145 160 // forceRawGpsLines 146 161 forceRawGpsLines.setToolTipText(tr("Force drawing of lines if the imported data contain no line information.")); 147 162 add(forceRawGpsLines, GBC.eop().insets(40,0,0,0)); 163 ExpertToggleAction.addVisibilitySwitcher(forceRawGpsLines); 148 164 149 165 // drawGpsArrows … … 160 176 drawGpsArrowsFast.setToolTipText(tr("Draw the direction arrows using table lookups instead of complex math.")); 161 177 add(drawGpsArrowsFast, GBC.eop().insets(60,0,0,0)); 178 ExpertToggleAction.addVisibilitySwitcher(drawGpsArrowsFast); 162 179 163 180 // drawGpsArrowsMinDist … … 169 186 hdopCircleGpsPoints.setToolTipText(tr("Draw a circle from HDOP value.")); 170 187 add(hdopCircleGpsPoints, GBC.eop().insets(20,0,0,0)); 188 ExpertToggleAction.addVisibilitySwitcher(hdopCircleGpsPoints); 171 189 172 190 // largeGpsPoints … … 176 194 // drawLineWidth 177 195 drawLineWidth.setToolTipText(tr("Width of drawn GPX line (0 for default)")); 178 add(new JLabel(tr("Drawing width of GPX lines")), GBC.std().insets( 40,0,0,0));196 add(new JLabel(tr("Drawing width of GPX lines")), GBC.std().insets(20,0,0,0)); 179 197 add(drawLineWidth, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5)); 180 198 … … 223 241 add(colorTypeDilution, GBC.eol().insets(40,0,0,0)); 224 242 add(colorTypeTime, GBC.eol().insets(40,0,0,0)); 243 ExpertToggleAction.addVisibilitySwitcher(colorTypeDirection); 244 ExpertToggleAction.addVisibilitySwitcher(colorTypeDilution); 225 245 226 246 colorDynamic.setToolTipText(tr("Colors points and track segments by data limits.")); 227 247 add(colorDynamic, GBC.eop().insets(40,0,0,0)); 248 ExpertToggleAction.addVisibilitySwitcher(colorDynamic); 228 249 229 250 if (layerName == null) { … … 232 253 233 254 // waypointLabel 234 add(new JLabel(tr("Waypoint labelling")), GBC.std().insets(20,0,0,0)); 255 label = new JLabel(tr("Waypoint labelling")); 256 add(label, GBC.std().insets(20,0,0,0)); 235 257 add(waypointLabel, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5)); 236 258 waypointLabel.addActionListener(new ActionListener() { … … 242 264 updateWaypointLabelCombobox(waypointLabel, waypointLabelPattern, TemplateEntryProperty.forMarker(layerName)); 243 265 add(waypointLabelPattern, GBC.eol().fill(GBC.HORIZONTAL).insets(20,0,0,5)); 266 ExpertToggleAction.addVisibilitySwitcher(label); 267 ExpertToggleAction.addVisibilitySwitcher(waypointLabel); 268 ExpertToggleAction.addVisibilitySwitcher(waypointLabelPattern); 244 269 245 270 // audioWaypointLabel 246 add(Box.createVerticalGlue(), GBC.eol().insets(0, 20, 0, 0)); 247 248 add(new JLabel(tr("Audio waypoint labelling")), GBC.std().insets(20,0,0,0)); 271 Component glue = Box.createVerticalGlue(); 272 add(glue, GBC.eol().insets(0, 20, 0, 0)); 273 ExpertToggleAction.addVisibilitySwitcher(glue); 274 275 label = new JLabel(tr("Audio waypoint labelling")); 276 add(label, GBC.std().insets(20,0,0,0)); 249 277 add(audioWaypointLabel, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5)); 250 278 audioWaypointLabel.addActionListener(new ActionListener() { … … 256 284 updateWaypointLabelCombobox(audioWaypointLabel, audioWaypointLabelPattern, TemplateEntryProperty.forAudioMarker(layerName)); 257 285 add(audioWaypointLabelPattern, GBC.eol().fill(GBC.HORIZONTAL).insets(20,0,0,5)); 286 ExpertToggleAction.addVisibilitySwitcher(label); 287 ExpertToggleAction.addVisibilitySwitcher(audioWaypointLabel); 288 ExpertToggleAction.addVisibilitySwitcher(audioWaypointLabelPattern); 258 289 } 259 290
Note:
See TracChangeset
for help on using the changeset viewer.