Changeset 8468 in josm for trunk/src/org
- Timestamp:
- 2015-06-06T01:48:41+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
r8443 r8468 36 36 37 37 /** (preference key => return value) mappings valid for the current operation (no, those two maps cannot be combined) */ 38 pr otectedstatic final Map<String, Integer> sessionChoices = new HashMap<>();38 private static final Map<String, Integer> sessionChoices = new HashMap<>(); 39 39 /** (preference key => return value) mappings valid for the current session */ 40 pr otectedstatic final Map<String, Integer> immediateChoices = new HashMap<>();40 private static final Map<String, Integer> immediateChoices = new HashMap<>(); 41 41 /** a set indication that (preference key) is or may be stored for the currently active bulk operation */ 42 pr otectedstatic final Set<String> immediateActive = new HashSet<>();42 private static final Set<String> immediateActive = new HashSet<>(); 43 43 44 44 /** … … 243 243 244 244 /** 245 * This is a message panel used in dialogs which can be enabled/disabled with a preference 246 * setting. 245 * This is a message panel used in dialogs which can be enabled/disabled with a preference setting. 247 246 * In addition to the normal message any {@link JOptionPane} would display it includes 248 247 * a checkbox for enabling/disabling this particular dialog. … … 250 249 */ 251 250 static class MessagePanel extends JPanel { 252 private final ButtonGroup group = new ButtonGroup();253 251 private final JRadioButton cbShowPermanentDialog = new JRadioButton(NotShowAgain.PERMANENT.getLabel()); 254 252 private final JRadioButton cbShowSessionDialog = new JRadioButton(NotShowAgain.SESSION.getLabel()); … … 258 256 /** 259 257 * Constructs a new panel. 260 * @param message the the message (null to add no message, Component instances are added directly, otherwise a JLabel with the string representation is added) 258 * @param message the the message (null to add no message, Component instances are added directly, 259 * otherwise a JLabel with the string representation is added) 261 260 * @param displayImmediateOption whether to provide "Do not show again (this session)" 262 261 */ 263 262 public MessagePanel(Object message, boolean displayImmediateOption) { 264 263 cbStandard.setSelected(true); 264 ButtonGroup group = new ButtonGroup(); 265 265 group.add(cbShowPermanentDialog); 266 266 group.add(cbShowSessionDialog); -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r8419 r8468 443 443 public static final String TILE_BOUNDS_PROP = TileAddressInputPanel.class.getName() + ".tileBounds"; 444 444 445 private JosmTextField tfTileAddress;446 445 private transient TileAddressValidator valTileAddress; 447 446 … … 467 466 gc.weightx = 1.0; 468 467 gc.gridx = 1; 469 pnl.add(tfTileAddress = new JosmTextField(), gc); 468 JosmTextField tfTileAddress = new JosmTextField(); 469 pnl.add(tfTileAddress, gc); 470 470 valTileAddress = new TileAddressValidator(tfTileAddress); 471 471 SelectAllOnFocusGainedDecorator.decorate(tfTileAddress); -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
r8419 r8468 510 510 private static final class StatisticsInfoTable extends JPanel { 511 511 512 private JTable infoTable; 513 514 protected void build(StatisticsTableModel model) { 515 infoTable = new JTable(model, new StatisticsTableColumnModel()); 512 private StatisticsInfoTable(StatisticsTableModel model) { 513 JTable infoTable = new JTable(model, new StatisticsTableColumnModel()); 516 514 infoTable.setShowHorizontalLines(true); 517 515 infoTable.setShowVerticalLines(false); … … 521 519 } 522 520 523 private StatisticsInfoTable(StatisticsTableModel model) {524 build(model);525 }526 527 521 @Override 528 522 public Insets getInsets() { -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r8444 r8468 767 767 } 768 768 769 /** 770 * Constructs a new {@code SearchPopupMenu}. 771 */ 769 772 public SearchPopupMenu() { 770 773 for (SearchSetting ss: org.openstreetmap.josm.actions.search.SearchAction.getSearchHistory()) { … … 780 783 */ 781 784 protected static class SelectionMenuItem extends JMenuItem implements ActionListener { 782 private final transient DefaultNameFormatter df = DefaultNameFormatter.getInstance();783 785 protected transient Collection<? extends OsmPrimitive> sel; 784 786 785 787 public SelectionMenuItem(Collection<? extends OsmPrimitive> sel) { 786 super();787 788 this.sel = sel; 788 789 int ways = 0; … … 816 817 this.sel=new ArrayList<>(); // empty selection 817 818 } 819 DefaultNameFormatter df = DefaultNameFormatter.getInstance(); 818 820 if (ways + nodes + relations == 1) { 819 821 text.append(": "); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r8444 r8468 605 605 606 606 public class DialogPopupMenu extends JPopupMenu { 607 private final ButtonGroup buttonHidingGroup = new ButtonGroup(); 608 private final JMenu buttonHidingMenu = new JMenu(tr("Side buttons")); 609 607 608 /** 609 * Constructs a new {@code DialogPopupMenu}. 610 */ 610 611 public DialogPopupMenu() { 611 612 alwaysShown.setSelected(buttonHiding == ButtonHidingType.ALWAYS_SHOWN); 612 613 dynamic.setSelected(buttonHiding == ButtonHidingType.DYNAMIC); 613 614 alwaysHidden.setSelected(buttonHiding == ButtonHidingType.ALWAYS_HIDDEN); 615 ButtonGroup buttonHidingGroup = new ButtonGroup(); 616 JMenu buttonHidingMenu = new JMenu(tr("Side buttons")); 614 617 for (JRadioButtonMenuItem rb : new JRadioButtonMenuItem[]{alwaysShown, dynamic, alwaysHidden}) { 615 618 buttonHidingGroup.add(rb); -
trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
r8404 r8468 14 14 15 15 import javax.swing.DefaultListModel; 16 import javax.swing.ImageIcon;17 16 import javax.swing.JLabel; 18 17 import javax.swing.JList; … … 195 194 static class BookmarkCellRenderer extends JLabel implements ListCellRenderer<BookmarkList.Bookmark> { 196 195 197 private ImageIcon icon; 198 196 /** 197 * Constructs a new {@code BookmarkCellRenderer}. 198 */ 199 199 public BookmarkCellRenderer() { 200 200 setOpaque(true); 201 icon = ImageProvider.get("dialogs", "bookmark"); 202 setIcon(icon); 201 setIcon(ImageProvider.get("dialogs", "bookmark")); 203 202 } 204 203 … … 217 216 StringBuilder sb = new StringBuilder(128); 218 217 sb.append("<html>min[latitude,longitude]=<strong>[") 219 .append(area.getMinLat()).append(',').append(area.getMinLon()).append("]</strong>" )220 .append("<br>max[latitude,longitude]=<strong>[")221 .append(area.getMaxLat()).append(',').append(area.getMaxLon()).append("]</strong>" )222 .append("</html>");218 .append(area.getMinLat()).append(',').append(area.getMinLon()).append("]</strong>"+ 219 "<br>max[latitude,longitude]=<strong>[") 220 .append(area.getMaxLat()).append(',').append(area.getMaxLon()).append("]</strong>"+ 221 "</html>"); 223 222 return sb.toString(); 224 223 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
r8444 r8468 22 22 public static final Cascade EMPTY_CASCADE = new Cascade(); 23 23 24 pr otectedMap<String, Object> prop = new HashMap<>();24 private Map<String, Object> prop = new HashMap<>(); 25 25 26 26 private static final Pattern HEX_COLOR_PATTERN = Pattern.compile("#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})"); -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r8419 r8468 454 454 } 455 455 456 pr otectedstatic final CopyOnWriteArrayList<MapPaintSylesUpdateListener> listeners456 private static final CopyOnWriteArrayList<MapPaintSylesUpdateListener> listeners 457 457 = new CopyOnWriteArrayList<>(); 458 458 -
trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
r8442 r8468 318 318 319 319 class CancelAction extends AbstractAction { 320 321 /** 322 * Constructs a new {@code CancelAction}. 323 */ 320 324 public CancelAction() { 321 325 putValue(NAME, tr("Cancel")); … … 336 340 337 341 class AcceptAccessTokenAction extends AbstractAction implements PropertyChangeListener { 338 private transient OAuthToken token; 339 342 343 /** 344 * Constructs a new {@code AcceptAccessTokenAction}. 345 */ 340 346 public AcceptAccessTokenAction() { 341 347 putValue(NAME, tr("Accept Access Token")); … … 359 365 if (!evt.getPropertyName().equals(AbstractAuthorizationUI.ACCESS_TOKEN_PROP)) 360 366 return; 361 token = (OAuthToken)evt.getNewValue(); 362 updateEnabledState(token); 367 updateEnabledState((OAuthToken)evt.getNewValue()); 363 368 } 364 369 } … … 366 371 class WindowEventHandler extends WindowAdapter { 367 372 @Override 368 public void windowClosing(WindowEvent arg0) {373 public void windowClosing(WindowEvent e) { 369 374 new CancelAction().cancel(); 370 375 } -
trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
r8442 r8468 113 113 */ 114 114 private class RetrieveRequestTokenPanel extends JPanel { 115 private JCheckBox cbShowAdvancedParameters;116 115 117 116 /** … … 130 129 gc.weightx = 0.0; 131 130 gc.insets = new Insets(0,0,0,3); 132 pnl.add(cbShowAdvancedParameters = new JCheckBox(), gc); 131 JCheckBox cbShowAdvancedParameters = new JCheckBox(); 132 pnl.add(cbShowAdvancedParameters, gc); 133 133 cbShowAdvancedParameters.setSelected(false); 134 134 cbShowAdvancedParameters.addItemListener( -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r8404 r8468 67 67 } 68 68 69 private List<PrefEntry> allData; 70 private List<PrefEntry> displayData = new ArrayList<>(); 71 private JosmTextField txtFilter; 72 private PreferencesTable table; 73 69 74 private AdvancedPreference() { 70 75 super(/* ICON(preferences/) */ "advanced", tr("Advanced Preferences"), tr("Setting Preference entries directly. Use with caution!")); … … 75 80 return true; 76 81 } 77 78 protected List<PrefEntry> allData;79 protected List<PrefEntry> displayData = new ArrayList<>();80 protected JosmTextField txtFilter;81 protected PreferencesTable table;82 82 83 83 @Override -
trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
r8461 r8468 30 30 31 31 // properties need JOSM restart to apply, modified rarely enough 32 pr otectedstatic final int MAX_KEY_LENGTH = Main.pref.getInteger("tags.paste.max-key-length", 50);33 pr otectedstatic final int MAX_KEY_COUNT = Main.pref.getInteger("tags.paste.max-key-count", 30);34 pr otectedstatic final String KEY_PATTERN = Main.pref.get("tags.paste.tag-pattern", "[0-9a-zA-Z:_]*");35 pr otectedstatic final int MAX_VALUE_LENGTH = 255;32 private static final int MAX_KEY_LENGTH = Main.pref.getInteger("tags.paste.max-key-length", 50); 33 private static final int MAX_KEY_COUNT = Main.pref.getInteger("tags.paste.max-key-count", 30); 34 private static final String KEY_PATTERN = Main.pref.get("tags.paste.tag-pattern", "[0-9a-zA-Z:_]*"); 35 private static final int MAX_VALUE_LENGTH = 255; 36 36 37 37 private TextTagParser() {
Note:
See TracChangeset
for help on using the changeset viewer.