Changeset 8377 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2015-05-17T04:02:42+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java
r8291 r8377 84 84 private UserInfo userInfo; 85 85 86 p ublicDownloadOpenChangesetsTask() {87 super(tr("Downloading open changesets ..." , false /* don't ignore exceptions */));86 private DownloadOpenChangesetsTask() { 87 super(tr("Downloading open changesets ..."), false /* don't ignore exceptions */); 88 88 } 89 89 -
trunk/src/org/openstreetmap/josm/actions/DistributeAction.java
r8247 r8377 111 111 * @return true in this case 112 112 */ 113 private Boolean checkDistributeWay(Collection<Way> ways, Collection<Node> nodes) {113 private boolean checkDistributeWay(Collection<Way> ways, Collection<Node> nodes) { 114 114 if(ways.size() == 1 && nodes.size() <= 2) { 115 115 Way w = ways.iterator().next(); -
trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
r8308 r8377 57 57 tr("Adjust the position of this imagery layer"), Main.map, 58 58 cursor); 59 putValue("toolbar", false);59 putValue("toolbar", Boolean.FALSE); 60 60 this.layer = layer; 61 61 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r6889 r8377 36 36 super(name, "mapmode/"+iconName, tooltip, shortcut, false); 37 37 this.cursor = cursor; 38 putValue("active", false);38 putValue("active", Boolean.FALSE); 39 39 } 40 40 … … 53 53 */ 54 54 public void enterMode() { 55 putValue("active", true);55 putValue("active", Boolean.TRUE); 56 56 Main.map.mapView.setNewCursor(cursor, this); 57 57 updateStatusLine(); … … 62 62 */ 63 63 public void exitMode() { 64 putValue("active", false);64 putValue("active", Boolean.FALSE); 65 65 Main.map.mapView.resetCursor(this); 66 66 } -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r8345 r8377 505 505 if (s.mode == SearchMode.replace) { 506 506 if (matcher.match(osm)) { 507 p.set(osm, true);507 p.set(osm, Boolean.TRUE); 508 508 } else { 509 p.set(osm, false);509 p.set(osm, Boolean.FALSE); 510 510 } 511 511 } else if (s.mode == SearchMode.add && !p.get(osm) && matcher.match(osm)) { 512 p.set(osm, true);512 p.set(osm, Boolean.TRUE); 513 513 } else if (s.mode == SearchMode.remove && p.get(osm) && matcher.match(osm)) { 514 p.set(osm, false);514 p.set(osm, Boolean.FALSE); 515 515 } else if (s.mode == SearchMode.in_selection && p.get(osm) && !matcher.match(osm)) { 516 p.set(osm, false);516 p.set(osm, Boolean.FALSE); 517 517 } 518 518 } … … 523 523 tr("Error"), 524 524 JOptionPane.ERROR_MESSAGE 525 526 525 ); 527 526 } -
trunk/src/org/openstreetmap/josm/data/notes/NoteComment.java
r7451 r8377 18 18 19 19 //not currently used. I'm planning on using this to keep track of new actions that need to be uploaded 20 private Boolean isNew;20 private boolean isNew; 21 21 22 22 /** … … 33 33 * @param isNew Whether or not this comment is new and needs to be uploaded 34 34 */ 35 public NoteComment(Date createDate, User user, String commentText, Action action, Boolean isNew) {35 public NoteComment(Date createDate, User user, String commentText, Action action, boolean isNew) { 36 36 this.text = commentText; 37 37 this.user = user; … … 61 61 } 62 62 63 public void setIsNew( Boolean isNew) {63 public void setIsNew(boolean isNew) { 64 64 this.isNew = isNew; 65 65 } 66 66 67 67 /** @return true if this is a new comment/action and needs to be uploaded to the API */ 68 public Boolean getIsNew() {68 public boolean getIsNew() { 69 69 return isNew; 70 70 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r8364 r8377 954 954 Node firstNode = viaWay.firstNode(); 955 955 Node lastNode = viaWay.lastNode(); 956 Boolean onewayvia = false;956 Boolean onewayvia = Boolean.FALSE; 957 957 958 958 String onewayviastr = viaWay.get("oneway"); 959 959 if(onewayviastr != null) { 960 960 if("-1".equals(onewayviastr)) { 961 onewayvia = true;961 onewayvia = Boolean.TRUE; 962 962 Node tmp = firstNode; 963 963 firstNode = lastNode; … … 966 966 onewayvia = OsmUtils.getOsmBoolean(onewayviastr); 967 967 if (onewayvia == null) { 968 onewayvia = false;968 onewayvia = Boolean.FALSE; 969 969 } 970 970 } -
trunk/src/org/openstreetmap/josm/data/validation/TestError.java
r8346 r8377 33 33 public class TestError implements Comparable<TestError>, DataSetListener { 34 34 /** is this error on the ignore list */ 35 private Boolean ignored = false;35 private boolean ignored = false; 36 36 /** Severity */ 37 37 private Severity severity; … … 208 208 } 209 209 210 public Boolean getIgnored() {210 public boolean getIgnored() { 211 211 return ignored; 212 212 } -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r8356 r8377 349 349 } 350 350 351 Boolean skipLoadingPlugins = false;351 boolean skipLoadingPlugins = false; 352 352 if (args.containsKey(Option.SKIP_PLUGINS)) { 353 353 skipLoadingPlugins = true; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
r8308 r8377 774 774 } 775 775 776 p ublicstatic interface FreezeActionProperties {776 private static interface FreezeActionProperties { 777 777 String PROP_SELECTED = FreezeActionProperties.class.getName() + ".selected"; 778 778 } … … 782 782 * 783 783 */ 784 class FreezeAction extends AbstractAction implements ItemListener, FreezeActionProperties {785 786 p ublicFreezeAction() {784 private class FreezeAction extends AbstractAction implements ItemListener, FreezeActionProperties { 785 786 private FreezeAction() { 787 787 putValue(Action.NAME, tr("Freeze")); 788 788 putValue(Action.SHORT_DESCRIPTION, tr("Freeze the current list of merged elements.")); 789 putValue(PROP_SELECTED, false);789 putValue(PROP_SELECTED, Boolean.FALSE); 790 790 setEnabled(true); 791 791 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r8345 r8377 173 173 layerList.addMouseListener(new PopupMenuHandler()); 174 174 layerList.setBackground(UIManager.getColor("Button.background")); 175 layerList.putClientProperty("terminateEditOnFocusLost", true);176 layerList.putClientProperty("JTable.autoStartsEdit", false);175 layerList.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 176 layerList.putClientProperty("JTable.autoStartsEdit", Boolean.FALSE); 177 177 layerList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); 178 178 layerList.setTableHeader(null); -
trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
r8376 r8377 140 140 tblStyles.setSelectionModel(selectionModel= new DefaultListSelectionModel()); 141 141 tblStyles.addMouseListener(new PopupMenuHandler()); 142 tblStyles.putClientProperty("terminateEditOnFocusLost", true);142 tblStyles.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 143 143 tblStyles.setBackground(UIManager.getColor("Panel.background")); 144 144 tblStyles.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r8346 r8377 312 312 setIsShowing(true); 313 313 windowMenuItem.setState(true); 314 toggleAction.putValue("selected", false);315 toggleAction.putValue("selected", true);314 toggleAction.putValue("selected", Boolean.FALSE); 315 toggleAction.putValue("selected", Boolean.TRUE); 316 316 } 317 317 -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java
r8291 r8377 33 33 /** 34 34 * Asynchronous task to send a changeset query to the OSM API. 35 * 35 * @since 2689 36 36 */ 37 37 public class ChangesetQueryTask extends PleaseWaitRunnable implements ChangesetDownloadTask{ … … 57 57 */ 58 58 public ChangesetQueryTask(ChangesetQuery query) { 59 super(tr("Querying and downloading changesets" ,false /* don't ignore exceptions */));59 super(tr("Querying and downloading changesets"), false /* don't ignore exceptions */); 60 60 CheckParameterUtil.ensureParameterNotNull(query, "query"); 61 61 this.query = query; -
trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java
r8308 r8377 55 55 setBackground(UIManager.getColor("Button.background")); 56 56 setIntercellSpacing(new Dimension(6, 0)); 57 putClientProperty("terminateEditOnFocusLost", true);57 putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 58 58 popupMenu = new VersionTablePopupMenu(); 59 59 addMouseListener(new MouseListener()); -
trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java
r8285 r8377 59 59 putValue(NAME, file); 60 60 putValue("help", ht("/Action/OpenRecent")); 61 putValue("toolbar", false);61 putValue("toolbar", Boolean.FALSE); 62 62 } 63 63 @Override -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
r8346 r8377 40 40 zIndex = c.get(Z_INDEX, 0f, Float.class); 41 41 objectZIndex = c.get(OBJECT_Z_INDEX, 0f, Float.class); 42 isModifier = c.get(MODIFIER, false, Boolean.class);42 isModifier = c.get(MODIFIER, Boolean.FALSE, Boolean.class); 43 43 } 44 44 -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r8342 r8377 369 369 if (defaultNodesIdx == cacheIdx) 370 370 return defaultNodes; 371 defaultNodes = fromCanvas("default-points", true, Boolean.class);371 defaultNodes = fromCanvas("default-points", Boolean.TRUE, Boolean.class); 372 372 defaultNodesIdx = cacheIdx; 373 373 return defaultNodes; … … 380 380 if (defaultLinesIdx == cacheIdx) 381 381 return defaultLines; 382 defaultLines = fromCanvas("default-lines", true, Boolean.class);382 defaultLines = fromCanvas("default-lines", Boolean.TRUE, Boolean.class); 383 383 defaultLinesIdx = cacheIdx; 384 384 return defaultLines; -
trunk/src/org/openstreetmap/josm/gui/mappaint/MultiCascade.java
r7005 r8377 64 64 c = new Cascade(); 65 65 if (!"default".equals(layer) && !"*".equals(layer)) { 66 c.put(MODIFIER, true);66 c.put(MODIFIER, Boolean.TRUE); 67 67 } 68 68 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r8324 r8377 969 969 Boolean b = Cascade.convertTo(arg.evaluate(env), boolean.class); 970 970 if (b == null || !b) { 971 return false;971 return Boolean.FALSE; 972 972 } 973 973 } 974 return true;974 return Boolean.TRUE; 975 975 } 976 976 } … … 996 996 Boolean b = Cascade.convertTo(arg.evaluate(env), boolean.class); 997 997 if (b != null && b) { 998 return true;998 return Boolean.TRUE; 999 999 } 1000 1000 } 1001 return false;1001 return Boolean.FALSE; 1002 1002 } 1003 1003 } -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r8324 r8377 327 327 tblIconPaths.getColumnModel().getColumn(0).setCellEditor(new FileOrUrlCellEditor(false)); 328 328 tblIconPaths.setRowHeight(20); 329 tblIconPaths.putClientProperty("terminateEditOnFocusLost", true);329 tblIconPaths.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 330 330 iconPathsModel.setIconPaths(getInitialIconPathsList()); 331 331 -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java
r7356 r8377 90 90 * @see #active 91 91 */ 92 public SourceEntry(String url, String name, String title, Boolean active) {92 public SourceEntry(String url, String name, String title, boolean active) { 93 93 this(url, false, null, name, title, active); 94 94 } -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java
r8308 r8377 69 69 ListSettingTableModel listModel = new ListSettingTableModel(); 70 70 JTable table = new JTable(listModel); 71 table.putClientProperty("terminateEditOnFocusLost", true);71 table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 72 72 table.setTableHeader(null); 73 73 -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java
r8376 r8377 102 102 tableModel = new ListTableModel(); 103 103 table = new JTable(tableModel); 104 table.putClientProperty("terminateEditOnFocusLost", true);104 table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 105 105 table.setTableHeader(null); 106 106 -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java
r8308 r8377 120 120 tableModel = new MapTableModel(); 121 121 table = new JTable(tableModel); 122 table.putClientProperty("terminateEditOnFocusLost", true);122 table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 123 123 table.getTableHeader().getColumnModel().getColumn(0).setHeaderValue(tr("Key")); 124 124 table.getTableHeader().getColumnModel().getColumn(1).setHeaderValue(tr("Value")); -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
r8308 r8377 53 53 model = new AllSettingsTableModel(); 54 54 setModel(model); 55 putClientProperty("terminateEditOnFocusLost", true);55 putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 56 56 getColumnModel().getColumn(1).setCellRenderer(new SettingCellRenderer()); 57 57 getColumnModel().getColumn(1).setCellEditor(new SettingCellEditor()); -
trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
r7402 r8377 276 276 @Override 277 277 public boolean ok() { 278 Boolean ret = false;278 boolean ret = false; 279 279 for(String d : del) { 280 280 Main.pref.put("color."+d, null); … … 282 282 for (int i = 0; i < colors.getRowCount(); ++i) { 283 283 String key = (String)colors.getValueAt(i, 0); 284 if(Main.pref.putColor(key, (Color)colors.getValueAt(i, 1))) 285 { 284 if(Main.pref.putColor(key, (Color)colors.getValueAt(i, 1))) { 286 285 if(key.startsWith("mappaint.")) { 287 286 ret = true; -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
r8308 r8377 302 302 } 303 303 }; 304 activeTable.putClientProperty("terminateEditOnFocusLost", true);304 activeTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 305 305 306 306 defaultModel = new ImageryDefaultLayerTableModel(); -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
r8017 r8377 84 84 if (selectedPluginsMap.get(pi) == null) { 85 85 if (activePlugins.contains(pi.name)) { 86 selectedPluginsMap.put(pi, true);86 selectedPluginsMap.put(pi, Boolean.TRUE); 87 87 } 88 88 } -
trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java
r8285 r8377 108 108 requestedState.title = title; 109 109 } 110 requestedState.intermediate = false;110 requestedState.intermediate = Boolean.FALSE; 111 111 } else { 112 112 checkState(State.IN_TASK); … … 126 126 requestedState.title = title; 127 127 } 128 requestedState.intermediate = true;128 requestedState.intermediate = Boolean.TRUE; 129 129 } else { 130 130 checkState(State.IN_TASK); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
r8365 r8377 555 555 return null; 556 556 case KEY: 557 return tags.containsKey(key) ? true: null;557 return tags.containsKey(key) ? Boolean.TRUE : null; 558 558 case KEY_REQUIRED: 559 559 return tags.containsKey(key); 560 560 case KEY_VALUE: 561 return tags.containsKey(key) && getValues().contains(tags.get(key)) ? true: null;561 return tags.containsKey(key) && getValues().contains(tags.get(key)) ? Boolean.TRUE : null; 562 562 case KEY_VALUE_REQUIRED: 563 563 return tags.containsKey(key) && getValues().contains(tags.get(key)); -
trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java
r8291 r8377 46 46 protected void feedbackInvalid(String msg) { 47 47 if (valid == null || valid || !Objects.equals(msg, this.msg)) { 48 // only provide feedback if the validity has changed. This avoids 49 // unnecessary UI updates. 48 // only provide feedback if the validity has changed. This avoids unnecessary UI updates. 50 49 tc.setBorder(ERROR_BORDER); 51 50 tc.setBackground(ERROR_BACKGROUND); 52 51 tc.setToolTipText(msg); 53 valid = false;52 valid = Boolean.FALSE; 54 53 this.msg = msg; 55 54 } … … 62 61 protected void feedbackValid(String msg) { 63 62 if (valid == null || !valid || !Objects.equals(msg, this.msg)) { 64 // only provide feedback if the validity has changed. This avoids 65 // unnecessary UI updates. 63 // only provide feedback if the validity has changed. This avoids unnecessary UI updates. 66 64 tc.setBorder(UIManager.getBorder("TextField.border")); 67 65 tc.setBackground(UIManager.getColor("TextField.background")); 68 66 tc.setToolTipText(msg == null ? "" : msg); 69 valid = true;67 valid = Boolean.TRUE; 70 68 this.msg = msg; 71 69 } -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
r8005 r8377 184 184 public void propertyChange(PropertyChangeEvent evt) { 185 185 if ("editable".equals(evt.getPropertyName())) { 186 if (evt.getNewValue().equals( true)) {186 if (evt.getNewValue().equals(Boolean.TRUE)) { 187 187 enableMenu(); 188 188 } else { -
trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java
r8291 r8377 125 125 defaults.put("EditorPane[Enabled].backgroundPainter", bgColor); 126 126 pane.putClientProperty("Nimbus.Overrides", defaults); 127 pane.putClientProperty("Nimbus.Overrides.InheritDefaults", true);127 pane.putClientProperty("Nimbus.Overrides.InheritDefaults", Boolean.TRUE); 128 128 pane.setBackground(bgColor); 129 129 } -
trunk/src/org/openstreetmap/josm/io/NoteReader.java
r8347 r8377 55 55 private Action noteAction; 56 56 private Date commentCreateDate; 57 private Boolean commentIsNew;57 private boolean commentIsNew; 58 58 private List<Note> notes; 59 59 private String commentText; … … 119 119 commentIsNew = false; 120 120 } else { 121 commentIsNew = Boolean. valueOf(isNew);121 commentIsNew = Boolean.parseBoolean(isNew); 122 122 } 123 123 break; … … 145 145 commentUsername = null; 146 146 commentCreateDate = null; 147 commentIsNew = null;147 commentIsNew = false; 148 148 commentText = null; 149 149 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
r8342 r8377 134 134 * @param san SubjectAlternativeName extension (optional) 135 135 */ 136 private static X509Certificate generateCertificate(String dn, KeyPair pair, int days, String algorithm, String san) throws GeneralSecurityException, IOException { 136 private static X509Certificate generateCertificate(String dn, KeyPair pair, int days, String algorithm, String san) 137 throws GeneralSecurityException, IOException { 137 138 PrivateKey privkey = pair.getPrivate(); 138 139 X509CertInfo info = new X509CertInfo(); … … 166 167 CertificateExtensions ext = new CertificateExtensions(); 167 168 // Critical: Not CA, max path len 0 168 ext.set(BasicConstraintsExtension.NAME, new BasicConstraintsExtension( true, false, 0));169 ext.set(BasicConstraintsExtension.NAME, new BasicConstraintsExtension(Boolean.TRUE, false, 0)); 169 170 // Critical: only allow TLS ("serverAuth" = 1.3.6.1.5.5.7.3.1) 170 ext.set(ExtendedKeyUsageExtension.NAME, new ExtendedKeyUsageExtension( true,171 ext.set(ExtendedKeyUsageExtension.NAME, new ExtendedKeyUsageExtension(Boolean.TRUE, 171 172 new Vector<ObjectIdentifier>(Arrays.asList(new ObjectIdentifier("1.3.6.1.5.5.7.3.1"))))); 172 173 … … 185 186 } 186 187 // Non critical 187 ext.set(SubjectAlternativeNameExtension.NAME, new SubjectAlternativeNameExtension( false, gnames));188 ext.set(SubjectAlternativeNameExtension.NAME, new SubjectAlternativeNameExtension(Boolean.FALSE, gnames)); 188 189 } 189 190 -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r7894 r8377 80 80 Class<?> eawtFullScreenUtilities = Class.forName("com.apple.eawt.FullScreenUtilities"); 81 81 eawtFullScreenUtilities.getDeclaredMethod("setWindowCanFullScreen", 82 new Class[]{Window.class, boolean.class}).invoke(eawtFullScreenUtilities, window, true);82 new Class[]{Window.class, boolean.class}).invoke(eawtFullScreenUtilities, window, Boolean.TRUE); 83 83 } catch (ReflectiveOperationException | SecurityException | IllegalArgumentException e) { 84 84 Main.warn("Failed to register with OSX: " + e); -
trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java
r8126 r8377 29 29 for (Area a : leftHandTrafficPolygons) { 30 30 if (a.contains(ll.lon(), ll.lat())) 31 return true;31 return Boolean.TRUE; 32 32 } 33 return false;33 return Boolean.FALSE; 34 34 } 35 35 … … 40 40 PolygonIntersection is = Geometry.polygonIntersection(abox, a, 1e-10 /* using deg and not meters */); 41 41 if (is == PolygonIntersection.FIRST_INSIDE_SECOND) 42 return true;42 return Boolean.TRUE; 43 43 if (is != PolygonIntersection.OUTSIDE) 44 44 return null; 45 45 } 46 return false;46 return Boolean.FALSE; 47 47 } 48 48 }
Note:
See TracChangeset
for help on using the changeset viewer.