- Timestamp:
- 2014-04-29T02:07:27+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java
r6969 r7022 28 28 private PreferencesAction(String name, String icon, String tooltip, 29 29 Class<? extends TabPreferenceSetting> tab, Class<? extends SubPreferenceSetting> subTab) { 30 super(name, icon, tooltip, null, false, "preference_" + Utils.<Class >firstNonNull(tab, subTab).getName(), false);30 super(name, icon, tooltip, null, false, "preference_" + Utils.<Class<?>>firstNonNull(tab, subTab).getName(), false); 31 31 this.tab = tab; 32 32 this.subTab = subTab; -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
r7005 r7022 12 12 import java.awt.geom.GeneralPath; 13 13 import java.util.ArrayList; 14 import java.util.Arrays;15 14 import java.util.Iterator; 16 15 import java.util.List; … … 185 184 186 185 // Display highlighted ways after the other ones (fix #8276) 187 for (List<Way> specialWays : Arrays.asList(new List[]{untaggedWays, highlightedWays})) {188 for (final Way way : specialWays){189 way.accept(this);190 }191 specialWays.clear();192 displaySegments();193 }186 List<Way> specialWays = new ArrayList<>(untaggedWays); 187 specialWays.addAll(highlightedWays); 188 for (final Way way : specialWays){ 189 way.accept(this); 190 } 191 specialWays.clear(); 192 displaySegments(); 194 193 195 194 for (final OsmPrimitive osm : data.getSelected()) { -
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r7005 r7022 6 6 7 7 import java.text.MessageFormat; 8 import java.util.Array s;8 import java.util.ArrayList; 9 9 import java.util.Collection; 10 10 import java.util.HashMap; … … 93 93 } 94 94 95 @SuppressWarnings("unchecked")96 95 @Override 97 96 public void visit(Relation n) { … … 201 200 if (r.memberExpression != null) { 202 201 Set<OsmPrimitive> notMatching = new HashSet<>(); 203 for (Collection<OsmPrimitive> c : Arrays.asList(new Collection[]{ri.nodes, ri.ways, ri.relations})) { 204 for (OsmPrimitive p : c) { 205 if (p.isUsable() && !r.memberExpression.match(p)) { 206 notMatching.add(p); 207 } 202 Collection<OsmPrimitive> allPrimitives = new ArrayList<>(); 203 allPrimitives.addAll(ri.nodes); 204 allPrimitives.addAll(ri.ways); 205 allPrimitives.addAll(ri.relations); 206 for (OsmPrimitive p : allPrimitives) { 207 if (p.isUsable() && !r.memberExpression.match(p)) { 208 notMatching.add(p); 208 209 } 209 210 } -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverTable.java
r6890 r7022 42 42 ((MultiValueCellEditor)getColumnModel().getColumn(2).getCellEditor()).addNavigationListeners(this); 43 43 44 setRowHeight((int)new JosmComboBox ().getPreferredSize().getHeight());44 setRowHeight((int)new JosmComboBox<String>().getPreferredSize().getHeight()); 45 45 } 46 46 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r7015 r7022 391 391 // make sure the casts are done in a meaningful way, so 392 392 // the 2 objects really can be considered equal 393 for (Class<?> klass : new Class []{Float.class, Boolean.class, Color.class, float[].class, String.class}) {393 for (Class<?> klass : new Class<?>[]{Float.class, Boolean.class, Color.class, float[].class, String.class}) { 394 394 Object a2 = Cascade.convertTo(a, klass); 395 395 Object b2 = Cascade.convertTo(b, klass); -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java
r7015 r7022 34 34 import javax.swing.JPopupMenu; 35 35 import javax.swing.JScrollPane; 36 import javax.swing.ListCellRenderer; 36 37 import javax.swing.event.DocumentEvent; 37 38 import javax.swing.event.DocumentListener; … … 80 81 private ActionListener clickListener; 81 82 82 private static class ResultListCellRenderer extends DefaultListCellRenderer { 83 private static class ResultListCellRenderer implements ListCellRenderer<TaggingPreset> { 84 final DefaultListCellRenderer def = new DefaultListCellRenderer(); 83 85 @Override 84 public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { 85 JLabel result = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); 86 TaggingPreset tp = (TaggingPreset)value; 86 public Component getListCellRendererComponent(JList<? extends TaggingPreset> list, TaggingPreset tp, int index, boolean isSelected, boolean cellHasFocus) { 87 JLabel result = (JLabel) def.getListCellRendererComponent(list, tp, index, isSelected, cellHasFocus); 87 88 result.setText(tp.getName()); 88 89 result.setIcon((Icon) tp.getValue(Action.SMALL_ICON)); -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r7012 r7022 39 39 Object Ocom_apple_eawt_Application = Ccom_apple_eawt_Application.getConstructor((Class[])null).newInstance((Object[])null); 40 40 Class<?> Ccom_apple_eawt_ApplicationListener = Class.forName("com.apple.eawt.ApplicationListener"); 41 Method MaddApplicationListener = Ccom_apple_eawt_Application.getDeclaredMethod("addApplicationListener", new Class [] { Ccom_apple_eawt_ApplicationListener });42 Object Oproxy = Proxy.newProxyInstance(PlatformHookOsx.class.getClassLoader(), new Class [] { Ccom_apple_eawt_ApplicationListener }, ivhandler);41 Method MaddApplicationListener = Ccom_apple_eawt_Application.getDeclaredMethod("addApplicationListener", new Class<?>[] { Ccom_apple_eawt_ApplicationListener }); 42 Object Oproxy = Proxy.newProxyInstance(PlatformHookOsx.class.getClassLoader(), new Class<?>[] { Ccom_apple_eawt_ApplicationListener }, ivhandler); 43 43 MaddApplicationListener.invoke(Ocom_apple_eawt_Application, new Object[] { Oproxy }); 44 Method MsetEnabledPreferencesMenu = Ccom_apple_eawt_Application.getDeclaredMethod("setEnabledPreferencesMenu", new Class [] { boolean.class });44 Method MsetEnabledPreferencesMenu = Ccom_apple_eawt_Application.getDeclaredMethod("setEnabledPreferencesMenu", new Class<?>[] { boolean.class }); 45 45 MsetEnabledPreferencesMenu.invoke(Ocom_apple_eawt_Application, new Object[] { Boolean.TRUE }); 46 46 } catch (Exception ex) { … … 68 68 if (args[0] != null) { 69 69 try { 70 args[0].getClass().getDeclaredMethod("setHandled", new Class [] { boolean.class }).invoke(args[0], new Object[] { handled });70 args[0].getClass().getDeclaredMethod("setHandled", new Class<?>[] { boolean.class }).invoke(args[0], new Object[] { handled }); 71 71 } catch (Exception ex) { 72 72 Main.warn("Failed to report handled event: " + ex);
Note:
See TracChangeset
for help on using the changeset viewer.