Changeset 6889 in josm
- Timestamp:
- 2014-02-27T01:41:49+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 106 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r6743 r6889 39 39 * @return the base URL, i.e. http://api.openstreetmap.org/browse 40 40 */ 41 static public String getBaseBrowseUrl() {41 public static String getBaseBrowseUrl() { 42 42 String baseUrl = Main.pref.get("osm-server.url", OsmApi.DEFAULT_API_URL); 43 43 Pattern pattern = Pattern.compile("/api/?$"); … … 58 58 * @return the base URL, i.e. http://www.openstreetmap.org/user 59 59 */ 60 static public String getBaseUserUrl() {60 public static String getBaseUserUrl() { 61 61 String baseUrl = Main.pref.get("osm-server.url", OsmApi.DEFAULT_API_URL); 62 62 Pattern pattern = Pattern.compile("/api/?$"); -
trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java
r6792 r6889 28 28 * 29 29 */ 30 static public class LayerListCellRenderer extends DefaultListCellRenderer {30 public static class LayerListCellRenderer extends DefaultListCellRenderer { 31 31 32 32 @Override -
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r6679 r6889 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.tools.I18n.trc;7 6 import static org.openstreetmap.josm.tools.I18n.trn; 8 7 … … 258 257 * A pair of nodes. 259 258 */ 260 static public class NodePair {259 public static class NodePair { 261 260 private final Node a; 262 261 private final Node b; … … 376 375 } 377 376 378 static public class NodeGraph {379 static public List<NodePair> buildNodePairs(Way way, boolean directed) {377 public static class NodeGraph { 378 public static List<NodePair> buildNodePairs(Way way, boolean directed) { 380 379 List<NodePair> pairs = new ArrayList<NodePair>(); 381 380 for (Pair<Node,Node> pair: way.getNodePairs(false /* don't sort */)) { … … 388 387 } 389 388 390 static public List<NodePair> buildNodePairs(List<Way> ways, boolean directed) {389 public static List<NodePair> buildNodePairs(List<Way> ways, boolean directed) { 391 390 List<NodePair> pairs = new ArrayList<NodePair>(); 392 391 for (Way w: ways) { … … 396 395 } 397 396 398 static public List<NodePair> eliminateDuplicateNodePairs(List<NodePair> pairs) {397 public static List<NodePair> eliminateDuplicateNodePairs(List<NodePair> pairs) { 399 398 List<NodePair> cleaned = new ArrayList<NodePair>(); 400 399 for(NodePair p: pairs) { … … 406 405 } 407 406 408 static public NodeGraph createDirectedGraphFromNodePairs(List<NodePair> pairs) {407 public static NodeGraph createDirectedGraphFromNodePairs(List<NodePair> pairs) { 409 408 NodeGraph graph = new NodeGraph(); 410 409 for (NodePair pair: pairs) { … … 414 413 } 415 414 416 static public NodeGraph createDirectedGraphFromWays(Collection<Way> ways) {415 public static NodeGraph createDirectedGraphFromWays(Collection<Way> ways) { 417 416 NodeGraph graph = new NodeGraph(); 418 417 for (Way w: ways) { … … 422 421 } 423 422 424 static public NodeGraph createUndirectedGraphFromNodeList(List<NodePair> pairs) {423 public static NodeGraph createUndirectedGraphFromNodeList(List<NodePair> pairs) { 425 424 NodeGraph graph = new NodeGraph(); 426 425 for (NodePair pair: pairs) { -
trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java
r6830 r6889 14 14 * @since 78 15 15 */ 16 abstract publicclass DiskAccessAction extends JosmAction {16 public abstract class DiskAccessAction extends JosmAction { 17 17 18 18 /** -
trunk/src/org/openstreetmap/josm/actions/ExpertToggleAction.java
r6792 r6889 28 28 private static final ExpertToggleAction INSTANCE = new ExpertToggleAction(); 29 29 30 private s ynchronized staticvoid fireExpertModeChanged(boolean isExpert) {30 private static synchronized void fireExpertModeChanged(boolean isExpert) { 31 31 { 32 32 Iterator<WeakReference<ExpertModeChangeListener>> it = listeners.iterator(); … … 64 64 } 65 65 66 public s ynchronized staticvoid addExpertModeChangeListener(ExpertModeChangeListener listener, boolean fireWhenAdding) {66 public static synchronized void addExpertModeChangeListener(ExpertModeChangeListener listener, boolean fireWhenAdding) { 67 67 if (listener == null) return; 68 68 for (WeakReference<ExpertModeChangeListener> wr : listeners) { … … 81 81 * @param listener the listener. Ignored if null. 82 82 */ 83 public s ynchronized staticvoid removeExpertModeChangeListener(ExpertModeChangeListener listener) {83 public static synchronized void removeExpertModeChangeListener(ExpertModeChangeListener listener) { 84 84 if (listener == null) return; 85 85 Iterator<WeakReference<ExpertModeChangeListener>> it = listeners.iterator(); … … 94 94 } 95 95 96 public s ynchronized staticvoid addVisibilitySwitcher(Component c) {96 public static synchronized void addVisibilitySwitcher(Component c) { 97 97 if (c == null) return; 98 98 for (WeakReference<Component> wr : visibilityToggleListeners) { … … 104 104 } 105 105 106 public s ynchronized staticvoid removeVisibilitySwitcher(Component c) {106 public static synchronized void removeVisibilitySwitcher(Component c) { 107 107 if (c == null) return; 108 108 Iterator<WeakReference<Component>> it = visibilityToggleListeners.iterator(); -
trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r6882 r6889 95 95 private final String defaultExtension; 96 96 97 static protectedvoid sort(List<ExtensionFileFilter> filters) {97 protected static void sort(List<ExtensionFileFilter> filters) { 98 98 Collections.sort( 99 99 filters, -
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r6814 r6889 38 38 * @author imi 39 39 */ 40 abstract publicclass JosmAction extends AbstractAction implements Destroyable {40 public abstract class JosmAction extends AbstractAction implements Destroyable { 41 41 42 42 protected Shortcut sc; -
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r6822 r6889 83 83 * @param fileList A list of files 84 84 */ 85 static public void openFiles(List<File> fileList) {85 public static void openFiles(List<File> fileList) { 86 86 openFiles(fileList, false); 87 87 } 88 88 89 static public void openFiles(List<File> fileList, boolean recordHistory) {89 public static void openFiles(List<File> fileList, boolean recordHistory) { 90 90 OpenFileTask task = new OpenFileTask(fileList, null); 91 91 task.setRecordHistory(recordHistory); … … 93 93 } 94 94 95 static public class OpenFileTask extends PleaseWaitRunnable {95 public static class OpenFileTask extends PleaseWaitRunnable { 96 96 private List<File> files; 97 97 private List<File> successfullyOpenedFiles = new ArrayList<File>(); -
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r6798 r6889 405 405 */ 406 406 private static class WayData { 407 final publicWay way; // The assigned way408 final publicint nSeg; // Number of Segments of the Way409 final publicint nNode; // Number of Nodes of the Way407 public final Way way; // The assigned way 408 public final int nSeg; // Number of Segments of the Way 409 public final int nNode; // Number of Nodes of the Way 410 410 public Direction[] segDirections; // Direction of the segments 411 411 // segment i goes from node i to node (i+1) 412 412 public EastNorth segSum; // (Vector-)sum of all horizontal segments plus the sum of all vertical 413 // 413 // segments turned by 90 degrees 414 414 public double heading; // heading of segSum == approximate heading of the way 415 415 public WayData(Way pWay) { -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r6679 r6889 259 259 * @return the list of chunks 260 260 */ 261 static public List<List<Node>> buildSplitChunks(Way wayToSplit, List<Node> splitPoints){261 public static List<List<Node>> buildSplitChunks(Way wayToSplit, List<Node> splitPoints){ 262 262 CheckParameterUtil.ensureParameterNotNull(wayToSplit, "wayToSplit"); 263 263 CheckParameterUtil.ensureParameterNotNull(splitPoints, "splitPoints"); … … 532 532 * @return the result from the split operation 533 533 */ 534 static public SplitWayResult split(OsmDataLayer layer, Way way, List<Node> atNodes, Collection<? extends OsmPrimitive> selection) {534 public static SplitWayResult split(OsmDataLayer layer, Way way, List<Node> atNodes, Collection<? extends OsmPrimitive> selection) { 535 535 List<List<Node>> chunks = buildSplitChunks(way, atNodes); 536 536 if (chunks == null) return null; -
trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
r6380 r6889 120 120 } 121 121 122 @Override public void exitMode() { 122 @Override 123 public void exitMode() { 123 124 super.exitMode(); 124 125 Main.map.mapView.removeMouseListener(this); … … 132 133 } 133 134 134 @Override public void actionPerformed(ActionEvent e) { 135 @Override 136 public void actionPerformed(ActionEvent e) { 135 137 super.actionPerformed(e); 136 138 doActionPerformed(e); 137 139 } 138 140 139 static public void doActionPerformed(ActionEvent e) {141 public static void doActionPerformed(ActionEvent e) { 140 142 if(!Main.map.mapView.isActiveLayerDrawable()) 141 143 return; -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r6798 r6889 82 82 */ 83 83 public class DrawAction extends MapMode implements MapViewPaintable, SelectionChangedListener, AWTEventListener { 84 final privateCursor cursorJoinNode;85 final privateCursor cursorJoinWay;84 private final Cursor cursorJoinNode; 85 private final Cursor cursorJoinWay; 86 86 87 87 private Node lastUsedNode = null; -
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r6792 r6889 823 823 * @param g the Graphics2D object it will be used on 824 824 */ 825 static privateLine2D createSemiInfiniteLine(Point2D start, Point2D unitvector, Graphics2D g) {825 private static Line2D createSemiInfiniteLine(Point2D start, Point2D unitvector, Graphics2D g) { 826 826 Rectangle bounds = g.getDeviceConfiguration().getBounds(); 827 827 try { -
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
r6830 r6889 74 74 private boolean dragging = false; 75 75 76 final privateCursor cursorSelect;77 final privateCursor cursorSelectHover;78 final privateCursor cursorImprove;79 final privateCursor cursorImproveAdd;80 final privateCursor cursorImproveDelete;81 final privateCursor cursorImproveAddLock;82 final privateCursor cursorImproveLock;76 private final Cursor cursorSelect; 77 private final Cursor cursorSelectHover; 78 private final Cursor cursorImprove; 79 private final Cursor cursorImproveAdd; 80 private final Cursor cursorImproveDelete; 81 private final Cursor cursorImproveAddLock; 82 private final Cursor cursorImproveLock; 83 83 84 84 private Color guideColor; -
trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r6084 r6889 24 24 * control. 25 25 */ 26 abstract publicclass MapMode extends JosmAction implements MouseListener, MouseMotionListener {26 public abstract class MapMode extends JosmAction implements MouseListener, MouseMotionListener { 27 27 protected final Cursor cursor; 28 28 protected boolean ctrl; -
trunk/src/org/openstreetmap/josm/actions/mapmode/ModifiersSpec.java
r4134 r6889 8 8 */ 9 9 public class ModifiersSpec { 10 static public final int ON = 1, OFF = 0, UNKNOWN = 2;10 public static final int ON = 1, OFF = 0, UNKNOWN = 2; 11 11 public int alt = UNKNOWN; 12 12 public int shift = UNKNOWN; -
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
r6316 r6889 188 188 } 189 189 190 static privateNode copyNode(Node source, boolean copyTags) {190 private static Node copyNode(Node source, boolean copyTags) { 191 191 if (copyTags) 192 192 return new Node(source, true); -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r6679 r6889 75 75 76 76 // contains all possible cases the cursor can be in the SelectAction 77 static privateenum SelectActionCursor {77 private static enum SelectActionCursor { 78 78 rect("normal", "selection"), 79 79 rect_add("normal", "select_add"), … … 666 666 * still pressed) 667 667 */ 668 final privateboolean dragInProgress() {668 private final boolean dragInProgress() { 669 669 return didMouseDrag && startingDraggingPos != null; 670 670 } 671 672 671 673 672 /** … … 832 831 * reported. If there is, it will execute the merge and add it to the undo buffer. 833 832 */ 834 final privatevoid mergePrims(Point p) {833 private final void mergePrims(Point p) { 835 834 Collection<Node> selNodes = getCurrentDataSet().getSelectedNodes(); 836 835 if (selNodes.isEmpty()) … … 850 849 * position. Either returns the node or null, if no suitable one is nearby. 851 850 */ 852 final privateNode findNodeToMergeTo(Point p) {851 private final Node findNodeToMergeTo(Point p) { 853 852 Collection<Node> target = mv.getNearestNodes(p, 854 853 getCurrentDataSet().getSelectedNodes(), -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r6851 r6889 154 154 * @param <T> The setting type 155 155 */ 156 abstract publicstatic class AbstractSetting<T> implements Setting<T> {156 public abstract static class AbstractSetting<T> implements Setting<T> { 157 157 protected final T value; 158 158 /** … … 1307 1307 * The default plugin site 1308 1308 */ 1309 private final staticString[] DEFAULT_PLUGIN_SITE = {Main.JOSM_WEBSITE+"/plugin%<?plugins=>"};1309 private static final String[] DEFAULT_PLUGIN_SITE = {Main.JOSM_WEBSITE+"/plugin%<?plugins=>"}; 1310 1310 1311 1311 /** -
trunk/src/org/openstreetmap/josm/data/Version.java
r6822 r6889 23 23 public class Version { 24 24 /** constant to indicate that the current build isn't assigned a JOSM version number */ 25 static public final int JOSM_UNKNOWN_VERSION = 0;25 public static final int JOSM_UNKNOWN_VERSION = 0; 26 26 27 27 /** the unique instance */ … … 34 34 * @return the content of the resource file; null, if an error occurred 35 35 */ 36 static public String loadResourceFile(URL resource) {36 public static String loadResourceFile(URL resource) { 37 37 if (resource == null) return null; 38 38 String s = null; … … 60 60 * @return the unique instance of the version information 61 61 */ 62 63 static public Version getInstance() { 62 public static Version getInstance() { 64 63 if (instance == null) { 65 64 instance = new Version(); -
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r6830 r6889 675 675 * What to do, when the tags have changed by one of the tag-changing methods. 676 676 */ 677 abstract protectedvoid keysChangedImpl(Map<String, String> originalKeys);677 protected abstract void keysChangedImpl(Map<String, String> originalKeys); 678 678 679 679 /** -
trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java
r6362 r6889 34 34 public final class ChangesetCache implements PreferenceChangedListener{ 35 35 /** the unique instance */ 36 static privatefinal ChangesetCache instance = new ChangesetCache();36 private static final ChangesetCache instance = new ChangesetCache(); 37 37 38 38 /** -
trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java
r6084 r6889 28 28 } 29 29 30 final privateMap<PrimitiveId, HistoryOsmPrimitive> primitives = new HashMap<PrimitiveId, HistoryOsmPrimitive>();31 final privateMap<PrimitiveId, ChangesetModificationType> modificationTypes = new HashMap<PrimitiveId, ChangesetModificationType>();30 private final Map<PrimitiveId, HistoryOsmPrimitive> primitives = new HashMap<PrimitiveId, HistoryOsmPrimitive>(); 31 private final Map<PrimitiveId, ChangesetModificationType> modificationTypes = new HashMap<PrimitiveId, ChangesetModificationType>(); 32 32 33 33 /** -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r6830 r6889 40 40 * @author imi 41 41 */ 42 abstract publicclass OsmPrimitive extends AbstractPrimitive implements Comparable<OsmPrimitive>, TemplateEngineDataProvider {42 public abstract class OsmPrimitive extends AbstractPrimitive implements Comparable<OsmPrimitive>, TemplateEngineDataProvider { 43 43 private static final String SPECIAL_VALUE_ID = "id"; 44 44 private static final String SPECIAL_VALUE_LOCAL_NAME = "localname"; … … 119 119 * @return the sub-list of OSM primitives of type <code>type</code> 120 120 */ 121 static public <T extends OsmPrimitive> List<T> getFilteredList(Collection<OsmPrimitive> list, Class<T> type) {121 public static <T extends OsmPrimitive> List<T> getFilteredList(Collection<OsmPrimitive> list, Class<T> type) { 122 122 if (list == null) return Collections.emptyList(); 123 123 List<T> ret = new LinkedList<T>(); … … 141 141 * @return the sub-set of OSM primitives of type <code>type</code> 142 142 */ 143 static public <T extends OsmPrimitive> Set<T> getFilteredSet(Collection<OsmPrimitive> set, Class<T> type) {143 public static <T extends OsmPrimitive> Set<T> getFilteredSet(Collection<OsmPrimitive> set, Class<T> type) { 144 144 Set<T> ret = new LinkedHashSet<T>(); 145 145 if (set != null) { … … 160 160 * empty set if primitives is null or if there are no referring primitives 161 161 */ 162 static public Set<OsmPrimitive> getReferrer(Collection<? extends OsmPrimitive> primitives) {162 public static Set<OsmPrimitive> getReferrer(Collection<? extends OsmPrimitive> primitives) { 163 163 HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>(); 164 164 if (primitives == null || primitives.isEmpty()) return ret; … … 1077 1077 * @param visitor The visitor from which the visit() function must be called. 1078 1078 */ 1079 abstract publicvoid accept(Visitor visitor);1079 public abstract void accept(Visitor visitor); 1080 1080 1081 1081 /** -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveComparator.java
r6380 r6889 10 10 /** Comparator, comparing by type and objects display names */ 11 11 public class OsmPrimitiveComparator implements Comparator<OsmPrimitive> { 12 final privateMap<OsmPrimitive, String> cache= new HashMap<OsmPrimitive, String>();13 final privateDefaultNameFormatter df = DefaultNameFormatter.getInstance();12 private final Map<OsmPrimitive, String> cache= new HashMap<OsmPrimitive, String>(); 13 private final DefaultNameFormatter df = DefaultNameFormatter.getInstance(); 14 14 public boolean relationsFirst = false; 15 15 … … 26 26 String an = cachedName(a); 27 27 String bn = cachedName(b); 28 // make sure display names starting with digits are the end of the 29 // list 28 // make sure display names starting with digits are the end of the list 30 29 if (Character.isDigit(an.charAt(0)) && Character.isDigit(bn.charAt(0))) 31 30 return an.compareTo(bn); -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java
r4387 r6889 19 19 MULTIPOLYGON (marktr(/* ICON(data/) */"multipolygon"), null, RelationData.class); 20 20 21 private final staticCollection<OsmPrimitiveType> DATA_VALUES = Arrays.asList(NODE, WAY, RELATION);21 private static final Collection<OsmPrimitiveType> DATA_VALUES = Arrays.asList(NODE, WAY, RELATION); 22 22 23 23 private final String apiTypeName; -
trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java
r5589 r6889 17 17 public abstract class PrimitiveData extends AbstractPrimitive { 18 18 19 /** 20 * Constructs a new {@code PrimitiveData}. 21 */ 19 22 public PrimitiveData() { 20 23 id = OsmPrimitive.generateUniqueId(); … … 51 54 52 55 @SuppressWarnings("unchecked") 53 static public <T extends PrimitiveData> List<T> getFilteredList(Collection<T> list, OsmPrimitiveType type) {56 public static <T extends PrimitiveData> List<T> getFilteredList(Collection<T> list, OsmPrimitiveType type) { 54 57 List<T> ret = new ArrayList<T>(); 55 58 for(PrimitiveData p: list) { -
trunk/src/org/openstreetmap/josm/data/osm/RelationToChildReference.java
r5266 r6889 14 14 * @return a set of all {@link RelationToChildReference}s for a given child primitive 15 15 */ 16 static public Set<RelationToChildReference> getRelationToChildReferences(OsmPrimitive child) {16 public static Set<RelationToChildReference> getRelationToChildReferences(OsmPrimitive child) { 17 17 Set<Relation> parents = OsmPrimitive.getFilteredSet(child.getReferrers(), Relation.class); 18 18 Set<RelationToChildReference> references = new HashSet<RelationToChildReference>(); … … 34 34 * primitives 35 35 */ 36 static public Set<RelationToChildReference> getRelationToChildReferences(Collection<? extends OsmPrimitive> children) {36 public static Set<RelationToChildReference> getRelationToChildReferences(Collection<? extends OsmPrimitive> children) { 37 37 Set<RelationToChildReference> references = new HashSet<RelationToChildReference>(); 38 38 for (OsmPrimitive child: children) { -
trunk/src/org/openstreetmap/josm/data/osm/User.java
r6822 r6889 25 25 public final class User { 26 26 27 static privateAtomicLong uidCounter = new AtomicLong();27 private static AtomicLong uidCounter = new AtomicLong(); 28 28 29 29 /** … … 31 31 */ 32 32 private static Map<Long,User> userMap = new HashMap<Long,User>(); 33 private final staticUser anonymous = createLocalUser(tr("<anonymous>"));33 private static final User anonymous = createLocalUser(tr("<anonymous>")); 34 34 35 35 private static long getNextLocalUid() { -
trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
r6830 r6889 113 113 * @return the option selected by user. {@link JOptionPane#CLOSED_OPTION} if the dialog was closed. 114 114 */ 115 static public int showOptionDialog(String preferenceKey, Component parent, Object message, String title, int optionType, int messageType, Object [] options, Object defaultOption) throws HeadlessException {115 public static int showOptionDialog(String preferenceKey, Component parent, Object message, String title, int optionType, int messageType, Object [] options, Object defaultOption) throws HeadlessException { 116 116 int ret = getDialogReturnValue(preferenceKey); 117 117 if (isYesOrNo(ret)) … … 156 156 * @see JOptionPane#ERROR_MESSAGE 157 157 */ 158 static public boolean showConfirmationDialog(String preferenceKey, Component parent, Object message, String title, int optionType, int messageType, int trueOption) throws HeadlessException {158 public static boolean showConfirmationDialog(String preferenceKey, Component parent, Object message, String title, int optionType, int messageType, int trueOption) throws HeadlessException { 159 159 int ret = getDialogReturnValue(preferenceKey); 160 160 if (isYesOrNo(ret)) … … 190 190 * @see JOptionPane#ERROR_MESSAGE 191 191 */ 192 static public void showMessageDialog(String preferenceKey, Component parent, Object message, String title,int messageType) {192 public static void showMessageDialog(String preferenceKey, Component parent, Object message, String title,int messageType) { 193 193 if (getDialogReturnValue(preferenceKey) == Integer.MAX_VALUE) 194 194 return; -
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r6804 r6889 47 47 public class DefaultNameFormatter implements NameFormatter, HistoryNameFormatter { 48 48 49 static privateDefaultNameFormatter instance;49 private static DefaultNameFormatter instance; 50 50 51 51 private static final List<NameFormatterHook> formatHooks = new LinkedList<NameFormatterHook>(); … … 56 56 * @return the unique instance of this formatter 57 57 */ 58 static public DefaultNameFormatter getInstance() {58 public static DefaultNameFormatter getInstance() { 59 59 if (instance == null) { 60 60 instance = new DefaultNameFormatter(); … … 91 91 * A ? prefix indicates a boolean value, for which the key (instead of the value) is used. 92 92 */ 93 static public final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "landuse", "natural",93 public static final String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS = {"name", "ref", "restriction", "landuse", "natural", 94 94 "public_transport", ":LocationCode", "note", "?building"}; 95 95 96 96 /** the current list of tags used as naming tags in relations */ 97 static privateList<String> namingTagsForRelations = null;97 private static List<String> namingTagsForRelations = null; 98 98 99 99 /** … … 106 106 * @return the list of naming tags used in relations 107 107 */ 108 static public List<String> getNamingtagsForRelations() {108 public static List<String> getNamingtagsForRelations() { 109 109 if (namingTagsForRelations == null) { 110 110 namingTagsForRelations = new ArrayList<String>( -
trunk/src/org/openstreetmap/josm/gui/FileDrop.java
r6830 r6889 514 514 * @version 1.2 515 515 */ 516 public static class TransferableObject implements Transferable 517 { 516 public static class TransferableObject implements Transferable { 517 518 518 /** 519 519 * The MIME type for {@link #DATA_FLAVOR} is 520 520 * <tt>application/x-net.iharder.dnd.TransferableObject</tt>. 521 521 */ 522 public final staticString MIME_TYPE = "application/x-net.iharder.dnd.TransferableObject";522 public static final String MIME_TYPE = "application/x-net.iharder.dnd.TransferableObject"; 523 523 524 524 /** … … 529 529 * <tt>application/x-net.iharder.dnd.TransferableObject</tt>. 530 530 */ 531 public final staticDataFlavor DATA_FLAVOR =531 public static final DataFlavor DATA_FLAVOR = 532 532 new DataFlavor( FileDrop.TransferableObject.class, MIME_TYPE ); 533 533 -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r6552 r6889 75 75 } 76 76 77 final privateint myVersion = Version.getInstance().getVersion();78 final privateString myJava = System.getProperty("java.version");79 final privateString myLang = LanguageInfo.getWikiLanguagePrefix();77 private final int myVersion = Version.getInstance().getVersion(); 78 private final String myJava = System.getProperty("java.version"); 79 private final String myLang = LanguageInfo.getWikiLanguagePrefix(); 80 80 81 81 /** -
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r6362 r6889 106 106 } 107 107 108 static privateclass DefaultAction extends AbstractAction {108 private static class DefaultAction extends AbstractAction { 109 109 private JDialog dialog; 110 110 private JOptionPane pane; … … 132 132 * @return the list of buttons 133 133 */ 134 static privateList<JButton> createOptionButtons(ButtonSpec[] options, String helpTopic) {134 private static List<JButton> createOptionButtons(ButtonSpec[] options, String helpTopic) { 135 135 List<JButton> buttons = new ArrayList<JButton>(); 136 136 if (options == null) { … … 167 167 * @return the help button 168 168 */ 169 static privateJButton createHelpButton(final String helpTopic) {169 private static JButton createHelpButton(final String helpTopic) { 170 170 JButton b = new JButton(tr("Help")); 171 171 b.setIcon(ImageProvider.get("help")); … … 211 211 * @return the index of the selected option or {@link JOptionPane#CLOSED_OPTION} 212 212 */ 213 static public int showOptionDialog(Component parentComponent, Object msg, String title, int messageType, Icon icon, final ButtonSpec[] options, final ButtonSpec defaultOption, final String helpTopic) {213 public static int showOptionDialog(Component parentComponent, Object msg, String title, int messageType, Icon icon, final ButtonSpec[] options, final ButtonSpec defaultOption, final String helpTopic) { 214 214 final List<JButton> buttons = createOptionButtons(options, helpTopic); 215 215 if (helpTopic != null) { … … 318 318 * @see #showOptionDialog(Component, Object, String, int, Icon, ButtonSpec[], ButtonSpec, String) 319 319 */ 320 static public int showOptionDialog(Component parentComponent, Object msg, String title, int messageType,final String helpTopic) {320 public static int showOptionDialog(Component parentComponent, Object msg, String title, int messageType,final String helpTopic) { 321 321 return showOptionDialog(parentComponent, msg, title, messageType, null,null,null, helpTopic); 322 322 } … … 329 329 * e.g. from PleaseWaitRunnable 330 330 */ 331 static public void showMessageDialogInEDT(final Component parentComponent, final Object msg, final String title, final int messageType, final String helpTopic) {331 public static void showMessageDialogInEDT(final Component parentComponent, final Object msg, final String title, final int messageType, final String helpTopic) { 332 332 GuiHelper.runInEDT(new Runnable() { 333 333 @Override -
trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
r6643 r6889 51 51 public final class JosmUserIdentityManager implements PreferenceChangedListener{ 52 52 53 static privateJosmUserIdentityManager instance;53 private static JosmUserIdentityManager instance; 54 54 55 55 /** … … 58 58 * @return the unique instance of the JOSM user identity manager 59 59 */ 60 static public JosmUserIdentityManager getInstance() {60 public static JosmUserIdentityManager getInstance() { 61 61 if (instance == null) { 62 62 instance = new JosmUserIdentityManager(); -
trunk/src/org/openstreetmap/josm/gui/MainApplet.java
r6615 r6889 36 36 public class MainApplet extends JApplet { 37 37 38 final staticJFrame frame = new JFrame("Java OpenStreetMap Editor");38 static final JFrame frame = new JFrame("Java OpenStreetMap Editor"); 39 39 40 40 public static final class UploadPreferencesAction extends JosmAction { … … 61 61 } 62 62 63 private final staticString[][] paramInfo = {63 private static final String[][] paramInfo = { 64 64 {"username", tr("string"), tr("Name of the user.")}, 65 65 {"password", tr("string"), tr("OSM Password.")}, -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r6830 r6889 385 385 * these groups are empty. 386 386 */ 387 public final staticMenuListener menuSeparatorHandler = new MenuListener() {387 public static final MenuListener menuSeparatorHandler = new MenuListener() { 388 388 @Override 389 389 public void menuCanceled(MenuEvent arg0) {} -
trunk/src/org/openstreetmap/josm/gui/MapScaler.java
r6792 r6889 41 41 } 42 42 43 static public Color getColor() {43 public static Color getColor() { 44 44 return Main.pref.getColor(marktr("scale"), Color.white); 45 45 } -
trunk/src/org/openstreetmap/josm/gui/Notification.java
r6357 r6889 30 30 public class Notification { 31 31 32 public final staticint DEFAULT_CONTENT_WIDTH = 350;32 public static final int DEFAULT_CONTENT_WIDTH = 350; 33 33 34 34 // some standard duration values (in milliseconds) … … 38 38 * E.g. "Please select at least one node". 39 39 */ 40 public final static int TIME_SHORT = Main.pref.getInteger("notification-time-short-ms", 3000); 40 public static final int TIME_SHORT = Main.pref.getInteger("notification-time-short-ms", 3000); 41 41 42 /** 42 43 * Short message of one or two lines (5 s). 43 44 */ 44 public final static int TIME_DEFAULT = Main.pref.getInteger("notification-time-default-ms", 5000); 45 public static final int TIME_DEFAULT = Main.pref.getInteger("notification-time-default-ms", 5000); 46 45 47 /** 46 48 * Somewhat longer message (10 s). 47 49 */ 48 public final static int TIME_LONG = Main.pref.getInteger("notification-time-long-ms", 10000); 50 public static final int TIME_LONG = Main.pref.getInteger("notification-time-long-ms", 10000); 51 49 52 /** 50 53 * Long text. 51 54 * (Make sure is still sensible to show as a notification) 52 55 */ 53 public final staticint TIME_VERY_LONG = Main.pref.getInteger("notification-time-very_long-ms", 20000);56 public static final int TIME_VERY_LONG = Main.pref.getInteger("notification-time-very_long-ms", 20000); 54 57 55 58 private Component content; -
trunk/src/org/openstreetmap/josm/gui/SideButton.java
r6367 r6889 25 25 */ 26 26 public class SideButton extends JButton implements Destroyable { 27 private final staticint iconHeight = 20;27 private static final int iconHeight = 20; 28 28 29 29 private PropertyChangeListener propertyChangeListener; -
trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
r6267 r6889 111 111 } 112 112 113 static privateclass SplashScreenProgressRenderer extends JPanel implements ProgressRenderer {113 private static class SplashScreenProgressRenderer extends JPanel implements ProgressRenderer { 114 114 private JLabel lblTaskTitle; 115 115 private JLabel lblCustomText; -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r6802 r6889 87 87 88 88 /** the unique instance of the dialog */ 89 static privateCombinePrimitiveResolverDialog instance;89 private static CombinePrimitiveResolverDialog instance; 90 90 91 91 /** -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
r6883 r6889 503 503 } 504 504 505 static privateclass StatisticsInfoTable extends JPanel {505 private static class StatisticsInfoTable extends JPanel { 506 506 507 507 private JTable infoTable; -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r6822 r6889 71 71 * @see #paintConflicts 72 72 */ 73 static public Color getColor() {73 public static Color getColor() { 74 74 return Main.pref.getColor(marktr("conflict"), Color.gray); 75 75 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
r6340 r6889 27 27 private List<JPanel> panels = new ArrayList<JPanel>(); 28 28 29 final privateJSplitPane parent;29 private final JSplitPane parent; 30 30 public DialogsPanel(JSplitPane parent) { 31 31 this.parent = parent; -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r6783 r6889 80 80 public class LayerListDialog extends ToggleDialog { 81 81 /** the unique instance of the dialog */ 82 static privateLayerListDialog instance;82 private static LayerListDialog instance; 83 83 84 84 /** … … 87 87 * @param mapFrame the map frame 88 88 */ 89 static public void createInstance(MapFrame mapFrame) {89 public static void createInstance(MapFrame mapFrame) { 90 90 if (instance != null) 91 91 throw new IllegalStateException("Dialog was already created"); … … 100 100 * @see #createInstance(MapFrame) 101 101 */ 102 static public LayerListDialog getInstance() throws IllegalStateException {102 public static LayerListDialog getInstance() throws IllegalStateException { 103 103 if (instance == null) 104 104 throw new IllegalStateException("Dialog not created yet. Invoke createInstance() first"); -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java
r6708 r6889 31 31 public class LayerListPopup extends JPopupMenu { 32 32 33 public final staticclass InfoAction extends AbstractAction {33 public static final class InfoAction extends AbstractAction { 34 34 private final Layer layer; 35 35 -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r6822 r6889 38 38 import org.openstreetmap.josm.actions.relation.EditRelationAction; 39 39 import org.openstreetmap.josm.actions.relation.SelectInRelationListAction; 40 import org.openstreetmap.josm.actions.search.SearchAction;41 40 import org.openstreetmap.josm.actions.search.SearchAction.SearchSetting; 42 41 import org.openstreetmap.josm.data.SelectionChangedListener; … … 408 407 * 409 408 */ 410 static privateclass SelectionListModel extends AbstractListModel implements EditLayerChangeListener, SelectionChangedListener, DataSetListener{409 private static class SelectionListModel extends AbstractListModel implements EditLayerChangeListener, SelectionChangedListener, DataSetListener{ 411 410 412 411 private static final int SELECTION_HISTORY_SIZE = 10; … … 656 655 */ 657 656 protected static class SearchMenuItem extends JMenuItem implements ActionListener { 658 final protectedSearchSetting s;657 protected final SearchSetting s; 659 658 660 659 public SearchMenuItem(SearchSetting s) { … … 675 674 */ 676 675 protected static class SearchPopupMenu extends JPopupMenu { 677 static public void launch(Component parent) {676 public static void launch(Component parent) { 678 677 if (org.openstreetmap.josm.actions.search.SearchAction.getSearchHistory().isEmpty()) 679 678 return; … … 696 695 */ 697 696 protected static class SelectionMenuItem extends JMenuItem implements ActionListener { 698 final privateDefaultNameFormatter df = DefaultNameFormatter.getInstance();697 private final DefaultNameFormatter df = DefaultNameFormatter.getInstance(); 699 698 protected Collection<? extends OsmPrimitive> sel; 700 699 … … 755 754 */ 756 755 protected static class SelectionHistoryPopup extends JPopupMenu { 757 static public void launch(Component parent, Collection<Collection<? extends OsmPrimitive>> history) {756 public static void launch(Component parent, Collection<Collection<? extends OsmPrimitive>> history) { 758 757 if (history == null || history.isEmpty()) return; 759 758 JPopupMenu menu = new SelectionHistoryPopup(history); … … 770 769 771 770 /** Quicker comparator, comparing just by type and ID's */ 772 static privateclass OsmPrimitiveQuickComparator implements Comparator<OsmPrimitive> {771 private static class OsmPrimitiveQuickComparator implements Comparator<OsmPrimitive> { 773 772 774 773 private int compareId(OsmPrimitive a, OsmPrimitive b) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r6829 r6889 115 115 protected final ToggleDialogAction toggleAction; 116 116 protected String preferencePrefix; 117 final protectedString name;117 protected final String name; 118 118 119 119 /** DialogsPanel that manages all ToggleDialogs */ -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
r6883 r6889 280 280 * open or closed changesets 281 281 */ 282 static privateclass OpenAndCloseStateRestrictionPanel extends JPanel {282 private static class OpenAndCloseStateRestrictionPanel extends JPanel { 283 283 284 284 private JRadioButton rbOpenOnly; … … 928 928 } 929 929 930 static privateclass BBoxRestrictionPanel extends BoundingBoxSelectionPanel {930 private static class BBoxRestrictionPanel extends BoundingBoxSelectionPanel { 931 931 public BBoxRestrictionPanel() { 932 932 setBorder(BorderFactory.createCompoundBorder( -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableCellRenderer.java
r6101 r6889 18 18 */ 19 19 public abstract class MemberTableCellRenderer extends JLabel implements TableCellRenderer { 20 public final staticColor BGCOLOR_EMPTY_ROW = new Color(234, 234, 234);21 public final staticColor BGCOLOR_IN_JOSM_SELECTION = new Color(235,255,177);20 public static final Color BGCOLOR_EMPTY_ROW = new Color(234, 234, 234); 21 public static final Color BGCOLOR_IN_JOSM_SELECTION = new Color(235,255,177); 22 22 23 public final staticColor BGCOLOR_NOT_IN_OPPOSITE = new Color(255, 197, 197);24 public final staticColor BGCOLOR_DOUBLE_ENTRY = new Color(254,226,214);23 public static final Color BGCOLOR_NOT_IN_OPPOSITE = new Color(255, 197, 197); 24 public static final Color BGCOLOR_DOUBLE_ENTRY = new Color(254,226,214); 25 25 26 26 /** … … 66 66 67 67 @Override 68 abstract publicComponent getTableCellRendererComponent(JTable table, Object value, boolean isSelected,68 public abstract Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, 69 69 boolean hasFocus, int row, int column); 70 70 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java
r6296 r6889 17 17 public class MemberTableLinkedCellRenderer extends MemberTableCellRenderer { 18 18 19 final staticImage arrowUp = ImageProvider.get("dialogs/relation", "arrowup").getImage();20 final staticImage arrowDown = ImageProvider.get("dialogs/relation", "arrowdown").getImage();21 final staticImage corners = ImageProvider.get("dialogs/relation", "roundedcorners").getImage();22 final staticImage roundabout_right = ImageProvider.get("dialogs/relation", "roundabout_right_tiny").getImage();23 final staticImage roundabout_left = ImageProvider.get("dialogs/relation", "roundabout_left_tiny").getImage();19 static final Image arrowUp = ImageProvider.get("dialogs/relation", "arrowup").getImage(); 20 static final Image arrowDown = ImageProvider.get("dialogs/relation", "arrowdown").getImage(); 21 static final Image corners = ImageProvider.get("dialogs/relation", "roundedcorners").getImage(); 22 static final Image roundabout_right = ImageProvider.get("dialogs/relation", "roundabout_right_tiny").getImage(); 23 static final Image roundabout_left = ImageProvider.get("dialogs/relation", "roundabout_left_tiny").getImage(); 24 24 private WayConnectionType value = new WayConnectionType(); 25 25 -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java
r6316 r6889 29 29 * @return the singleton {@link RelationDialogManager} 30 30 */ 31 static public RelationDialogManager getRelationDialogManager() {31 public static RelationDialogManager getRelationDialogManager() { 32 32 if (RelationDialogManager.relationDialogManager == null) { 33 33 RelationDialogManager.relationDialogManager = new RelationDialogManager(); … … 42 42 * 43 43 */ 44 static privateclass DialogContext {44 private static class DialogContext { 45 45 public final Relation relation; 46 46 public final OsmDataLayer layer; -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
r6792 r6889 24 24 * @see #getRelation() 25 25 */ 26 static public final String RELATION_PROP = RelationEditor.class.getName() + ".relation";26 public static final String RELATION_PROP = RelationEditor.class.getName() + ".relation"; 27 27 28 28 /** the property name for the current relation snapshot 29 29 * @see #getRelationSnapshot() 30 30 */ 31 static public final String RELATION_SNAPSHOT_PROP = RelationEditor.class.getName() + ".relationSnapshot";31 public static final String RELATION_SNAPSHOT_PROP = RelationEditor.class.getName() + ".relationSnapshot"; 32 32 33 33 /** the list of registered relation editor classes */ … … 207 207 /* property change support */ 208 208 /* ----------------------------------------------------------------------- */ 209 final privatePropertyChangeSupport support = new PropertyChangeSupport(this);209 private final PropertyChangeSupport support = new PropertyChangeSupport(this); 210 210 211 211 @Override -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRenderer.java
r6084 r6889 20 20 */ 21 21 public class RelationTreeCellRenderer extends JLabel implements TreeCellRenderer { 22 public final staticColor BGCOLOR_SELECTED = new Color(143,170,255);22 public static final Color BGCOLOR_SELECTED = new Color(143,170,255); 23 23 24 24 /** the relation icon */ -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRenderer.java
r6476 r6889 19 19 */ 20 20 public class SelectionTableCellRenderer extends JLabel implements TableCellRenderer { 21 public final staticColor BGCOLOR_DOUBLE_ENTRY = new Color(254,226,214);22 public final staticColor BGCOLOR_SINGLE_ENTRY = new Color(235,255,177);21 public static final Color BGCOLOR_DOUBLE_ENTRY = new Color(254,226,214); 22 public static final Color BGCOLOR_SINGLE_ENTRY = new Color(235,255,177); 23 23 24 24 /** -
trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java
r6340 r6889 48 48 */ 49 49 public class ChangesetManagementPanel extends JPanel implements ListDataListener{ 50 public final staticString SELECTED_CHANGESET_PROP = ChangesetManagementPanel.class.getName() + ".selectedChangeset";51 public final staticString CLOSE_CHANGESET_AFTER_UPLOAD = ChangesetManagementPanel.class.getName() + ".closeChangesetAfterUpload";50 public static final String SELECTED_CHANGESET_PROP = ChangesetManagementPanel.class.getName() + ".selectedChangeset"; 51 public static final String CLOSE_CHANGESET_AFTER_UPLOAD = ChangesetManagementPanel.class.getName() + ".closeChangesetAfterUpload"; 52 52 53 53 private JRadioButton rbUseNew; -
trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
r6885 r6889 43 43 public class CredentialDialog extends JDialog { 44 44 45 static public CredentialDialog getOsmApiCredentialDialog(String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {45 public static CredentialDialog getOsmApiCredentialDialog(String username, String password, String host, String saveUsernameAndPasswordCheckboxText) { 46 46 CredentialDialog dialog = new CredentialDialog(saveUsernameAndPasswordCheckboxText); 47 47 if (Utils.equal(OsmApi.getOsmApi().getHost(), host)) { … … 54 54 } 55 55 56 static public CredentialDialog getHttpProxyCredentialDialog(String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {56 public static CredentialDialog getHttpProxyCredentialDialog(String username, String password, String host, String saveUsernameAndPasswordCheckboxText) { 57 57 CredentialDialog dialog = new CredentialDialog(saveUsernameAndPasswordCheckboxText); 58 58 dialog.prepareForProxyCredentials(username, password); … … 320 320 } 321 321 322 static privateclass SelectAllOnFocusHandler extends FocusAdapter {322 private static class SelectAllOnFocusHandler extends FocusAdapter { 323 323 @Override 324 324 public void focusGained(FocusEvent e) { … … 337 337 * If both text fields contain characters, submits the form by calling owner's {@link OKAction}. 338 338 */ 339 static privateclass TFKeyListener implements KeyListener{339 private static class TFKeyListener implements KeyListener{ 340 340 protected CredentialDialog owner; // owner Dependency Injection to call OKAction 341 341 protected JTextField currentTF; -
trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
r6087 r6889 32 32 33 33 class LayerNameAndFilePathTableCell extends JPanel implements TableCellRenderer, TableCellEditor { 34 private final staticColor colorError = new Color(255,197,197);35 private final staticString separator = System.getProperty("file.separator");36 private final staticString ellipsis = "…" + separator;34 private static final Color colorError = new Color(255,197,197); 35 private static final String separator = System.getProperty("file.separator"); 36 private static final String ellipsis = "…" + separator; 37 37 38 38 private final JLabel lblLayerName = new JLabel(); … … 41 41 private final JButton btnFileChooser = new JButton(new LaunchFileChooserAction()); 42 42 43 private final staticGBC defaultCellStyle = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0);43 private static final GBC defaultCellStyle = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0); 44 44 45 45 private CopyOnWriteArrayList<CellEditorListener> listeners; 46 46 private File value; 47 48 47 49 48 /** constructor that sets the default on each element **/ … … 61 60 tfFilename.addFocusListener( 62 61 new FocusAdapter() { 63 @Override public void focusGained(FocusEvent e) { 62 @Override 63 public void focusGained(FocusEvent e) { 64 64 tfFilename.selectAll(); 65 65 } -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
r6643 r6889 52 52 53 53 public class SaveLayersDialog extends JDialog implements TableModelListener { 54 static public enum UserAction {54 public static enum UserAction { 55 55 /** 56 56 * save/upload layers was successful, proceed with operation … … 58 58 PROCEED, 59 59 /** 60 * save/upload of layers was not successful or user canceled 61 * operation 60 * save/upload of layers was not successful or user canceled operation 62 61 */ 63 62 CANCEL -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java
r6084 r6889 15 15 16 16 public class SaveLayersModel extends DefaultTableModel { 17 static final publicString MODE_PROP = SaveLayerInfo.class.getName() + ".mode";17 public static final String MODE_PROP = SaveLayerInfo.class.getName() + ".mode"; 18 18 public enum Mode { 19 19 EDITING_DATA, … … 29 29 private static final int columnActions = 2; 30 30 31 /** 32 * Constructs a new {@code SaveLayersModel}. 33 */ 31 34 public SaveLayersModel() { 32 35 mode = Mode.EDITING_DATA; -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTableColumnModel.java
r6084 r6889 23 23 private final JLabel needsUpload = new JLabel(tr("should be uploaded")); 24 24 private final JLabel needsSave = new JLabel(tr("should be saved")); 25 private final staticGBC defaultCellStyle = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0);25 private static final GBC defaultCellStyle = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0); 26 26 27 27 public RecommendedActionsTableCell() { -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r6654 r6889 63 63 public class UploadDialog extends JDialog implements PropertyChangeListener, PreferenceChangedListener{ 64 64 /** the unique instance of the upload dialog */ 65 static privateUploadDialog uploadDialog;65 private static UploadDialog uploadDialog; 66 66 67 67 /** 68 68 * List of custom components that can be added by plugins at JOSM startup. 69 69 */ 70 static privatefinal Collection<Component> customComponents = new ArrayList<Component>();70 private static final Collection<Component> customComponents = new ArrayList<Component>(); 71 71 72 72 /** … … 75 75 * @return the unique instance of the upload dialog 76 76 */ 77 static public UploadDialog getUploadDialog() {77 public static UploadDialog getUploadDialog() { 78 78 if (uploadDialog == null) { 79 79 uploadDialog = new UploadDialog(); -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategy.java
r6248 r6889 50 50 * the default upload strategy 51 51 */ 52 public final staticUploadStrategy DEFAULT_UPLOAD_STRATEGY = SINGLE_REQUEST_STRATEGY;52 public static final UploadStrategy DEFAULT_UPLOAD_STRATEGY = SINGLE_REQUEST_STRATEGY; 53 53 54 54 /** -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
r6340 r6889 46 46 * The property for the upload strategy 47 47 */ 48 public final staticString UPLOAD_STRATEGY_SPECIFICATION_PROP =48 public static final String UPLOAD_STRATEGY_SPECIFICATION_PROP = 49 49 UploadStrategySelectionPanel.class.getName() + ".uploadStrategySpecification"; 50 50 -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java
r5832 r6889 15 15 public class UploadStrategySpecification { 16 16 /** indicates that the chunk size isn't specified */ 17 static public final int UNSPECIFIED_CHUNK_SIZE = -1;17 public static final int UNSPECIFIED_CHUNK_SIZE = -1; 18 18 19 19 private UploadStrategy strategy; -
trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java
r6084 r6889 25 25 */ 26 26 public class UploadedObjectsSummaryPanel extends JPanel { 27 static public final String NUM_OBJECTS_TO_UPLOAD_PROP = UploadedObjectsSummaryPanel.class.getName() + ".numObjectsToUpload";27 public static final String NUM_OBJECTS_TO_UPLOAD_PROP = UploadedObjectsSummaryPanel.class.getName() + ".numObjectsToUpload"; 28 28 29 29 /** the list with the added primitives */ -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r6830 r6889 255 255 256 256 /* for preferences */ 257 static public Color getGenericColor() {257 public static Color getGenericColor() { 258 258 return Main.pref.getColor(marktr("gps point"), Color.gray); 259 259 } … … 363 363 } 364 364 365 private final staticColor[] colors = new Color[256];365 private static final Color[] colors = new Color[256]; 366 366 static { 367 367 for (int i = 0; i < colors.length; i++) { … … 370 370 } 371 371 372 private final staticColor[] colors_cyclic = new Color[256];372 private static final Color[] colors_cyclic = new Color[256]; 373 373 static { 374 374 for (int i = 0; i < colors_cyclic.length; i++) { … … 405 405 406 406 // lookup array to draw arrows without doing any math 407 private final staticint ll0 = 9;408 private final staticint sl4 = 5;409 private final staticint sl9 = 3;410 private final staticint[][] dir = { { +sl4, +ll0, +ll0, +sl4 }, { -sl9, +ll0, +sl9, +ll0 }, { -ll0, +sl4, -sl4, +ll0 },407 private static final int ll0 = 9; 408 private static final int sl4 = 5; 409 private static final int sl9 = 3; 410 private static final int[][] dir = { { +sl4, +ll0, +ll0, +sl4 }, { -sl9, +ll0, +sl9, +ll0 }, { -ll0, +sl4, -sl4, +ll0 }, 411 411 { -ll0, -sl9, -ll0, +sl9 }, { -sl4, -ll0, -ll0, -sl4 }, { +sl9, -ll0, -sl9, -ll0 }, 412 412 { +ll0, -sl4, +sl4, -ll0 }, { +ll0, +sl9, +ll0, -sl9 }, { +sl4, +ll0, +ll0, +sl4 }, … … 814 814 * additional entries are initialized to true; 815 815 */ 816 final privatevoid ensureTrackVisibilityLength() {816 private final void ensureTrackVisibilityLength() { 817 817 final int l = data.tracks.size(); 818 818 if (l == trackVisibility.length) -
trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
r6830 r6889 48 48 * @author imi 49 49 */ 50 abstract publicclass Layer implements Destroyable, MapViewPaintable, ProjectionChangeListener {50 public abstract class Layer implements Destroyable, MapViewPaintable, ProjectionChangeListener { 51 51 52 52 public interface LayerAction { … … 59 59 } 60 60 61 62 61 /** 63 62 * Special class that can be returned by getMenuEntries when JSeparator needs to be created … … 80 79 } 81 80 82 static public final String VISIBLE_PROP = Layer.class.getName() + ".visible";83 static public final String OPACITY_PROP = Layer.class.getName() + ".opacity";84 static public final String NAME_PROP = Layer.class.getName() + ".name";85 86 static public final int ICON_SIZE = 16;81 public static final String VISIBLE_PROP = Layer.class.getName() + ".visible"; 82 public static final String OPACITY_PROP = Layer.class.getName() + ".opacity"; 83 public static final String NAME_PROP = Layer.class.getName() + ".name"; 84 85 public static final int ICON_SIZE = 16; 87 86 88 87 /** keeps track of property change listeners */ … … 142 141 */ 143 142 @Override 144 abstract public void paint(Graphics2D g, MapView mv, Bounds box); 143 public abstract void paint(Graphics2D g, MapView mv, Bounds box); 144 145 145 /** 146 146 * Return a representative small image for this layer. The image must not 147 147 * be larger than 64 pixel in any dimension. 148 148 */ 149 abstract publicIcon getIcon();149 public abstract Icon getIcon(); 150 150 151 151 /** … … 162 162 * @return A small tooltip hint about some statistics for this layer. 163 163 */ 164 abstract publicString getToolTipText();164 public abstract String getToolTipText(); 165 165 166 166 /** … … 171 171 * mergeFrom should be one of the last things to do with a layer. 172 172 */ 173 abstract publicvoid mergeFrom(Layer from);173 public abstract void mergeFrom(Layer from); 174 174 175 175 /** … … 177 177 * @return Whether the other layer can be merged into this layer. 178 178 */ 179 abstract publicboolean isMergable(Layer other);180 181 abstract publicvoid visitBoundingBox(BoundingXYVisitor v);182 183 abstract publicObject getInfoComponent();179 public abstract boolean isMergable(Layer other); 180 181 public abstract void visitBoundingBox(BoundingXYVisitor v); 182 183 public abstract Object getInfoComponent(); 184 184 185 185 /** … … 200 200 * 201 201 */ 202 abstract publicAction[] getMenuEntries();202 public abstract Action[] getMenuEntries(); 203 203 204 204 /** -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r6501 r6889 91 91 */ 92 92 public class OsmDataLayer extends Layer implements Listener, SelectionChangedListener { 93 static public final String REQUIRES_SAVE_TO_DISK_PROP = OsmDataLayer.class.getName() + ".requiresSaveToDisk";94 static public final String REQUIRES_UPLOAD_TO_SERVER_PROP = OsmDataLayer.class.getName() + ".requiresUploadToServer";93 public static final String REQUIRES_SAVE_TO_DISK_PROP = OsmDataLayer.class.getName() + ".requiresSaveToDisk"; 94 public static final String REQUIRES_UPLOAD_TO_SERVER_PROP = OsmDataLayer.class.getName() + ".requiresUploadToServer"; 95 95 96 96 private boolean requiresSaveToFile = false; … … 122 122 123 123 /** the global counter for created data layers */ 124 static privateint dataLayerCounter = 0;124 private static int dataLayerCounter = 0; 125 125 126 126 /** … … 129 129 * @return a new unique name for a data layer 130 130 */ 131 static public String createNewName() {131 public static String createNewName() { 132 132 dataLayerCounter++; 133 133 return tr("Data Layer {0}", dataLayerCounter); 134 134 } 135 135 136 public final staticclass DataCountVisitor extends AbstractVisitor {136 public static final class DataCountVisitor extends AbstractVisitor { 137 137 public int nodes; 138 138 public int ways; -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r6830 r6889 471 471 * in preferences. 472 472 */ 473 static public void setMaxWorkers() {473 public static void setMaxWorkers() { 474 474 JobDispatcher.setMaxWorkers(PROP_TMS_JOBS.get()); 475 475 JobDispatcher.getInstance().setLIFO(true); -
trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
r6105 r6889 174 174 * session. There should be preference listener updating this cache. 175 175 */ 176 static privateColor DEFAULT_TEXT_COLOR = null;177 static privatevoid initDefaultParameters() {176 private static Color DEFAULT_TEXT_COLOR = null; 177 private static void initDefaultParameters() { 178 178 if (DEFAULT_TEXT_COLOR != null) return; 179 179 DEFAULT_TEXT_COLOR = PaintColors.TEXT.get(); -
trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
r6740 r6889 25 25 protected Map<String, Object> prop = new HashMap<String, Object>(); 26 26 27 private final staticPattern HEX_COLOR_PATTERN = Pattern.compile("#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})");27 private static final Pattern HEX_COLOR_PATTERN = Pattern.compile("#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})"); 28 28 29 29 public <T> T get(String key, T def, Class<T> klass) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
r6663 r6889 14 14 import org.openstreetmap.josm.gui.mappaint.mapcss.Instruction.RelativeFloat; 15 15 16 abstract publicclass ElemStyle implements StyleKeys {16 public abstract class ElemStyle implements StyleKeys { 17 17 18 18 protected static final String[] ICON_KEYS = {"icon-image", "icon-width", "icon-height", "icon-opacity"}; … … 91 91 * a JOSM session. Should have a listener listening to preference changes. 92 92 */ 93 static privateString DEFAULT_FONT_NAME = null;94 static privateFloat DEFAULT_FONT_SIZE = null;95 static privatevoid initDefaultFontParameters() {93 private static String DEFAULT_FONT_NAME = null; 94 private static Float DEFAULT_FONT_SIZE = null; 95 private static void initDefaultFontParameters() { 96 96 if (DEFAULT_FONT_NAME != null) return; // already initialized - skip initialization 97 97 DEFAULT_FONT_NAME = Main.pref.get("mappaint.font", "Helvetica"); … … 99 99 } 100 100 101 static privateclass FontDescriptor {101 private static class FontDescriptor { 102 102 public String name; 103 103 public int style; … … 141 141 } 142 142 143 static privatefinal Map<FontDescriptor, Font> FONT_MAP = new HashMap<FontDescriptor, Font>();144 static privateFont getCachedFont(FontDescriptor fd) {143 private static final Map<FontDescriptor, Font> FONT_MAP = new HashMap<FontDescriptor, Font>(); 144 private static Font getCachedFont(FontDescriptor fd) { 145 145 Font f = FONT_MAP.get(fd); 146 146 if (f != null) return f; … … 150 150 } 151 151 152 static privateFont getCachedFont(String name, int style, int size){152 private static Font getCachedFont(String name, int style, int size){ 153 153 return getCachedFont(new FontDescriptor(name, style, size)); 154 154 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java
r3967 r6889 28 28 } 29 29 30 public final staticKeyword AUTO = new Keyword("auto");31 public final staticKeyword BOTTOM = new Keyword("bottom");32 public final staticKeyword CENTER = new Keyword("center");33 public final staticKeyword DEFAULT = new Keyword("default");34 public final staticKeyword RIGHT = new Keyword("right");35 public final staticKeyword THINNEST = new Keyword("thinnest");30 public static final Keyword AUTO = new Keyword("auto"); 31 public static final Keyword BOTTOM = new Keyword("bottom"); 32 public static final Keyword CENTER = new Keyword("center"); 33 public static final Keyword DEFAULT = new Keyword("default"); 34 public static final Keyword RIGHT = new Keyword("right"); 35 public static final Keyword THINNEST = new Keyword("thinnest"); 36 36 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java
r6830 r6889 43 43 * if no suitable value could be composed 44 44 */ 45 abstract publicString compose(OsmPrimitive primitive);46 47 static public class StaticLabelCompositionStrategy extends LabelCompositionStrategy {45 public abstract String compose(OsmPrimitive primitive); 46 47 public static class StaticLabelCompositionStrategy extends LabelCompositionStrategy { 48 48 private String defaultLabel; 49 49 … … 92 92 } 93 93 94 static public class TagLookupCompositionStrategy extends LabelCompositionStrategy {94 public static class TagLookupCompositionStrategy extends LabelCompositionStrategy { 95 95 96 96 private String defaultLabelTag; … … 147 147 } 148 148 149 static public class DeriveLabelFromNameTagsCompositionStrategy extends LabelCompositionStrategy {149 public static class DeriveLabelFromNameTagsCompositionStrategy extends LabelCompositionStrategy { 150 150 151 151 /** -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
r6830 r6889 25 25 private final List<StyleList> data; 26 26 27 private final staticStorage<StyleCache> internPool = new Storage<StyleCache>(); // TODO: clean up the intern pool from time to time (after purge or layer removal)28 29 public final staticStyleCache EMPTY_STYLECACHE = (new StyleCache()).intern();27 private static final Storage<StyleCache> internPool = new Storage<StyleCache>(); // TODO: clean up the intern pool from time to time (after purge or layer removal) 28 29 public static final StyleCache EMPTY_STYLECACHE = (new StyleCache()).intern(); 30 30 31 31 private StyleCache() { -
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java
r6289 r6889 21 21 import org.openstreetmap.josm.tools.Utils; 22 22 23 abstract publicclass StyleSource extends SourceEntry {23 public abstract class StyleSource extends SourceEntry { 24 24 25 25 private List<Throwable> errors = new ArrayList<Throwable>(); … … 44 44 } 45 45 46 abstract publicvoid apply(MultiCascade mc, OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed);46 public abstract void apply(MultiCascade mc, OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed); 47 47 48 abstract publicvoid loadStyleSource();48 public abstract void loadStyleSource(); 49 49 50 50 /** … … 54 54 * @see #closeSourceInputStream(InputStream) 55 55 */ 56 abstract publicInputStream getSourceInputStream() throws IOException;56 public abstract InputStream getSourceInputStream() throws IOException; 57 57 58 58 /** … … 101 101 } 102 102 103 final publicImageIcon getIcon() {103 public final ImageIcon getIcon() { 104 104 if (getErrors().isEmpty()) 105 105 return getSourceIcon(); -
trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java
r6070 r6889 20 20 */ 21 21 public class TextElement implements StyleKeys { 22 static public final LabelCompositionStrategy AUTO_LABEL_COMPOSITION_STRATEGY = new DeriveLabelFromNameTagsCompositionStrategy();22 public static final LabelCompositionStrategy AUTO_LABEL_COMPOSITION_STRATEGY = new DeriveLabelFromNameTagsCompositionStrategy(); 23 23 24 24 /** the strategy for building the actual label value for a given a {@link OsmPrimitive}. -
trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
r6883 r6889 175 175 } 176 176 177 static privateclass AccessTokenKeyValidator extends AbstractTextComponentValidator {177 private static class AccessTokenKeyValidator extends AbstractTextComponentValidator { 178 178 179 179 public AccessTokenKeyValidator(JTextComponent tc) throws IllegalArgumentException { -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/AbstractProjectionChoice.java
r6733 r6889 6 6 import org.openstreetmap.josm.data.projection.Projections; 7 7 8 abstract publicclass AbstractProjectionChoice implements ProjectionChoice {8 public abstract class AbstractProjectionChoice implements ProjectionChoice { 9 9 10 10 protected String name; … … 53 53 } 54 54 55 abstract publicString getCurrentCode();55 public abstract String getCurrentCode(); 56 56 57 abstract publicString getProjectionName();57 public abstract String getProjectionName(); 58 58 59 59 @Override -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/ListProjectionChoice.java
r6295 r6889 17 17 * A projection choice, that offers a list of projections in a combo-box. 18 18 */ 19 abstract publicclass ListProjectionChoice extends AbstractProjectionChoice {19 public abstract class ListProjectionChoice extends AbstractProjectionChoice { 20 20 21 21 protected int index; // 0-based index … … 54 54 * Convert 0-based index to preference value. 55 55 */ 56 abstract protectedString indexToZone(int index);56 protected abstract String indexToZone(int index); 57 57 58 58 /** 59 59 * Convert preference value to 0-based index. 60 60 */ 61 abstract protectedint zoneToIndex(String zone);61 protected abstract int zoneToIndex(String zone); 62 62 63 63 @Override -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
r6529 r6889 253 253 * Combobox with all projections available 254 254 */ 255 private JosmComboBox projectionCombo = new JosmComboBox(projectionChoices.toArray());255 private final JosmComboBox projectionCombo = new JosmComboBox(projectionChoices.toArray()); 256 256 257 257 /** 258 258 * Combobox with all coordinate display possibilities 259 259 */ 260 private JosmComboBox coordinatesCombo = new JosmComboBox(CoordinateFormat.values());261 262 private JosmComboBox unitsCombo = new JosmComboBox(unitsValuesTr);260 private final JosmComboBox coordinatesCombo = new JosmComboBox(CoordinateFormat.values()); 261 262 private final JosmComboBox unitsCombo = new JosmComboBox(unitsValuesTr); 263 263 264 264 /** … … 281 281 * This is the panel holding all projection preferences 282 282 */ 283 private JPanel projPanel = new JPanel(new GridBagLayout());283 private final JPanel projPanel = new JPanel(new GridBagLayout()); 284 284 285 285 /** … … 288 288 * in sync 289 289 */ 290 static privateGBC projSubPrefPanelGBC = GBC.std().fill(GBC.BOTH).weight(1.0, 1.0);290 private static final GBC projSubPrefPanelGBC = GBC.std().fill(GBC.BOTH).weight(1.0, 1.0); 291 291 292 292 @Override … … 380 380 } 381 381 382 static public void setProjection() {382 public static void setProjection() { 383 383 setProjection(PROP_PROJECTION.get(), PROP_SUB_PROJECTION.get()); 384 384 } 385 385 386 static public void setProjection(String id, Collection<String> pref) {386 public static void setProjection(String id, Collection<String> pref) { 387 387 ProjectionChoice pc = projectionChoicesById.get(id); 388 388 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java
r6792 r6889 11 11 public class UTMFranceDOMProjectionChoice extends ListProjectionChoice { 12 12 13 private final staticString FortMarigotName = tr("Guadeloupe Fort-Marigot 1949");14 private final staticString SainteAnneName = tr("Guadeloupe Ste-Anne 1948");15 private final staticString MartiniqueName = tr("Martinique Fort Desaix 1952");16 private final staticString Reunion92Name = tr("Reunion RGR92");17 private final staticString Guyane92Name = tr("Guyane RGFG95");18 private final staticString[] utmGeodesicsNames = { FortMarigotName, SainteAnneName, MartiniqueName, Reunion92Name, Guyane92Name};13 private static final String FortMarigotName = tr("Guadeloupe Fort-Marigot 1949"); 14 private static final String SainteAnneName = tr("Guadeloupe Ste-Anne 1948"); 15 private static final String MartiniqueName = tr("Martinique Fort Desaix 1952"); 16 private static final String Reunion92Name = tr("Reunion RGR92"); 17 private static final String Guyane92Name = tr("Guyane RGFG95"); 18 private static final String[] utmGeodesicsNames = { FortMarigotName, SainteAnneName, MartiniqueName, Reunion92Name, Guyane92Name}; 19 19 20 private final staticInteger FortMarigotEPSG = 2969;21 private final staticInteger SainteAnneEPSG = 2970;22 private final staticInteger MartiniqueEPSG = 2973;23 private final staticInteger ReunionEPSG = 2975;24 private final staticInteger GuyaneEPSG = 2972;25 private final staticInteger[] utmEPSGs = { FortMarigotEPSG, SainteAnneEPSG, MartiniqueEPSG, ReunionEPSG, GuyaneEPSG };20 private static final Integer FortMarigotEPSG = 2969; 21 private static final Integer SainteAnneEPSG = 2970; 22 private static final Integer MartiniqueEPSG = 2973; 23 private static final Integer ReunionEPSG = 2975; 24 private static final Integer GuyaneEPSG = 2972; 25 private static final Integer[] utmEPSGs = { FortMarigotEPSG, SainteAnneEPSG, MartiniqueEPSG, ReunionEPSG, GuyaneEPSG }; 26 26 27 27 /** -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java
r6792 r6889 33 33 private Hemisphere hemisphere; 34 34 35 private final staticList<String> cbEntries = new ArrayList<String>();35 private static final List<String> cbEntries = new ArrayList<String>(); 36 36 static { 37 37 for (int i = 1; i <= 60; i++) { -
trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
r6643 r6889 25 25 * Common intervals 26 26 */ 27 final static publicint INTERVAL_ALWAYS = -1;28 final static publicint INTERVAL_HOURLY = 60*60;29 final static publicint INTERVAL_DAILY = INTERVAL_HOURLY * 24;30 final static publicint INTERVAL_WEEKLY = INTERVAL_DAILY * 7;31 final static publicint INTERVAL_MONTHLY = INTERVAL_WEEKLY * 4;32 final static publicint INTERVAL_NEVER = Integer.MAX_VALUE;27 public static final int INTERVAL_ALWAYS = -1; 28 public static final int INTERVAL_HOURLY = 60*60; 29 public static final int INTERVAL_DAILY = INTERVAL_HOURLY * 24; 30 public static final int INTERVAL_WEEKLY = INTERVAL_DAILY * 7; 31 public static final int INTERVAL_MONTHLY = INTERVAL_WEEKLY * 4; 32 public static final int INTERVAL_NEVER = Integer.MAX_VALUE; 33 33 34 34 /** … … 40 40 * The ident that identifies the stored file. Includes file-ending. 41 41 */ 42 final privateString ident;42 private final String ident; 43 43 44 44 /** 45 45 * The (file-)path where the data will be stored 46 46 */ 47 final privateFile path;47 private final File path; 48 48 49 49 /** 50 50 * How often to update the cached version 51 51 */ 52 final privateint updateInterval;52 private final int updateInterval; 53 53 54 54 /** -
trunk/src/org/openstreetmap/josm/io/CacheFiles.java
r6248 r6889 29 29 * Common expirey dates 30 30 */ 31 final static publicint EXPIRE_NEVER = -1;32 final static publicint EXPIRE_DAILY = 60 * 60 * 24;33 final static publicint EXPIRE_WEEKLY = EXPIRE_DAILY * 7;34 final static publicint EXPIRE_MONTHLY = EXPIRE_WEEKLY * 4;35 36 final privateFile dir;37 final privateString ident;38 final privateboolean enabled;31 public static final int EXPIRE_NEVER = -1; 32 public static final int EXPIRE_DAILY = 60 * 60 * 24; 33 public static final int EXPIRE_WEEKLY = EXPIRE_DAILY * 7; 34 public static final int EXPIRE_MONTHLY = EXPIRE_WEEKLY * 4; 35 36 private final File dir; 37 private final String ident; 38 private final boolean enabled; 39 39 40 40 private long expire; // in seconds … … 273 273 } 274 274 275 final static public int CLEAN_ALL = 0; 276 final static public int CLEAN_SMALL_FILES = 1; 277 final static public int CLEAN_BY_DATE = 2; 275 public static final int CLEAN_ALL = 0; 276 public static final int CLEAN_SMALL_FILES = 1; 277 public static final int CLEAN_BY_DATE = 2; 278 278 279 /** 279 280 * Performs a non-default, specified clean up -
trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java
r6643 r6889 31 31 * that a changeset was closed 32 32 */ 33 final static publicString ERROR_HEADER_PATTERN = "The changeset (\\d+) was closed at (.*)";33 public static final String ERROR_HEADER_PATTERN = "The changeset (\\d+) was closed at (.*)"; 34 34 35 35 public static enum Source { … … 57 57 * @return true if <code>errorHeader</code> matches with {@link #ERROR_HEADER_PATTERN} 58 58 */ 59 static public boolean errorHeaderMatchesPattern(String errorHeader) {59 public static boolean errorHeaderMatchesPattern(String errorHeader) { 60 60 if (errorHeader == null) 61 61 return false; -
trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
r6830 r6889 36 36 * 37 37 */ 38 static public ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException{38 public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException{ 39 39 return new ChangesetQueryUrlParser().parse(query); 40 40 } -
trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java
r6380 r6889 32 32 public class DiffResultProcessor { 33 33 34 static privateclass DiffResultEntry {34 private static class DiffResultEntry { 35 35 public long new_id; 36 36 public int new_version; -
trunk/src/org/openstreetmap/josm/io/GpxExporter.java
r6815 r6889 39 39 40 40 public class GpxExporter extends FileExporter implements GpxConstants { 41 private final staticString warningGpl = "<html><font color='red' size='-2'>"41 private static final String warningGpl = "<html><font color='red' size='-2'>" 42 42 + tr("Note: GPL is not compatible with the OSM license. Do not upload GPL licensed tracks.") + "</html>"; 43 43 -
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r6552 r6889 41 41 private String indent = ""; 42 42 43 private final staticint WAY_POINT = 0;44 private final staticint ROUTE_POINT = 1;45 private final staticint TRACK_POINT = 2;43 private static final int WAY_POINT = 0; 44 private static final int ROUTE_POINT = 1; 45 private static final int TRACK_POINT = 2; 46 46 47 47 public void write(GpxData data) { -
trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
r6867 r6889 34 34 File file = null; 35 35 36 public final staticlong DEFAULT_MAXTIME = -1L;36 public static final long DEFAULT_MAXTIME = -1L; 37 37 38 38 /** -
trunk/src/org/openstreetmap/josm/io/NmeaReader.java
r6822 r6889 132 132 public GpxData data; 133 133 134 // private final staticSimpleDateFormat GGATIMEFMT =134 // private static final SimpleDateFormat GGATIMEFMT = 135 135 // new SimpleDateFormat("HHmmss.SSS"); 136 private final staticSimpleDateFormat RMCTIMEFMT =136 private static final SimpleDateFormat RMCTIMEFMT = 137 137 new SimpleDateFormat("ddMMyyHHmmss.SSS"); 138 private final staticSimpleDateFormat RMCTIMEFMTSTD =138 private static final SimpleDateFormat RMCTIMEFMTSTD = 139 139 new SimpleDateFormat("ddMMyyHHmmss"); 140 140 141 private Date readTime(String p) 142 { 141 private Date readTime(String p) { 143 142 Date d = RMCTIMEFMT.parse(p, new ParsePosition(0)); 144 143 if (d == null) { -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r6875 r6889 59 59 * Maximum number of retries to send a request in case of HTTP 500 errors or timeouts 60 60 */ 61 static public final int DEFAULT_MAX_NUM_RETRIES = 5;61 public static final int DEFAULT_MAX_NUM_RETRIES = 5; 62 62 63 63 /** … … 67 67 * @since 5386 68 68 */ 69 static public final int MAX_DOWNLOAD_THREADS = 2;69 public static final int MAX_DOWNLOAD_THREADS = 2; 70 70 71 71 /** … … 73 73 * @since 5422 74 74 */ 75 static public final String DEFAULT_API_URL = "http://api.openstreetmap.org/api";75 public static final String DEFAULT_API_URL = "http://api.openstreetmap.org/api"; 76 76 77 77 // The collection of instantiated OSM APIs … … 88 88 * 89 89 */ 90 static public OsmApi getOsmApi(String serverUrl) {90 public static OsmApi getOsmApi(String serverUrl) { 91 91 OsmApi api = instances.get(serverUrl); 92 92 if (api == null) { … … 102 102 * @return the OsmApi 103 103 */ 104 static public OsmApi getOsmApi() {104 public static OsmApi getOsmApi() { 105 105 String serverUrl = Main.pref.get("osm-server.url", DEFAULT_API_URL); 106 106 return getOsmApi(serverUrl); -
trunk/src/org/openstreetmap/josm/io/OsmApiPrimitiveGoneException.java
r3083 r6889 17 17 * The regexp pattern for the error header replied by the OSM API 18 18 */ 19 static public final String ERROR_HEADER_PATTERN = "The (\\S+) with the id (\\d+) has already been deleted";19 public static final String ERROR_HEADER_PATTERN = "The (\\S+) with the id (\\d+) has already been deleted"; 20 20 /** the type of the primitive which is gone on the server */ 21 21 private OsmPrimitiveType type; -
trunk/src/org/openstreetmap/josm/io/OsmChangeBuilder.java
r6009 r6889 18 18 */ 19 19 public class OsmChangeBuilder { 20 static public final String DEFAULT_API_VERSION = "0.6";20 public static final String DEFAULT_API_VERSION = "0.6"; 21 21 22 22 private String currentMode; -
trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java
r6695 r6889 25 25 public class OsmServerUserInfoReader extends OsmServerReader { 26 26 27 static protectedString getAttribute(Node node, String name) {27 protected static String getAttribute(Node node, String name) { 28 28 return node.getAttributes().getNamedItem(name).getNodeValue(); 29 29 } … … 35 35 * @throws OsmDataParsingException if parsing goes wrong 36 36 */ 37 static public UserInfo buildFromXML(Document document) throws OsmDataParsingException {37 public static UserInfo buildFromXML(Document document) throws OsmDataParsingException { 38 38 try { 39 39 XPathFactory factory = XPathFactory.newInstance(); -
trunk/src/org/openstreetmap/josm/tools/AudioUtil.java
r6830 r6889 28 28 * @return the calibrated length of recording in seconds. 29 29 */ 30 static public double getCalibratedDuration(File wavFile) {30 public static double getCalibratedDuration(File wavFile) { 31 31 try { 32 32 AudioInputStream audioInputStream = AudioSystem.getAudioInputStream( -
trunk/src/org/openstreetmap/josm/tools/Diff.java
r6830 r6889 491 491 492 492 /** Standard ScriptBuilders. */ 493 public final staticScriptBuilder493 public static final ScriptBuilder 494 494 forwardScript = new ForwardScript(), 495 495 reverseScript = new ReverseScript(); -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r6814 r6889 854 854 855 855 /** 90 degrees in radians units */ 856 final staticdouble DEGREE_90 = 90.0 * Math.PI / 180.0;856 static final double DEGREE_90 = 90.0 * Math.PI / 180.0; 857 857 858 858 /** -
trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
r6380 r6889 35 35 * @since 5915 36 36 */ 37 static public String getWikiLanguagePrefix(LocaleType type) {37 public static String getWikiLanguagePrefix(LocaleType type) { 38 38 if(type == LocaleType.ENGLISH) 39 39 return ""; … … 60 60 * @see #getWikiLanguagePrefix(LocaleType) 61 61 */ 62 static public String getWikiLanguagePrefix() {62 public static String getWikiLanguagePrefix() { 63 63 return getWikiLanguagePrefix(LocaleType.DEFAULT); 64 64 } … … 70 70 * @see #getJOSMLocaleCode(Locale) 71 71 */ 72 static public String getJOSMLocaleCode() {72 public static String getJOSMLocaleCode() { 73 73 return getJOSMLocaleCode(Locale.getDefault()); 74 74 } … … 84 84 * @return the JOSM code for the given locale 85 85 */ 86 static public String getJOSMLocaleCode(Locale locale) {86 public static String getJOSMLocaleCode(Locale locale) { 87 87 if (locale == null) return "en"; 88 88 String full = locale.toString(); … … 106 106 * @return the resulting locale 107 107 */ 108 static public Locale getLocale(String localeName) {108 public static Locale getLocale(String localeName) { 109 109 if (localeName.equals("he")) { 110 110 localeName = "iw_IL"; … … 123 123 } 124 124 125 static public String getLanguageCodeXML() {125 public static String getLanguageCodeXML() { 126 126 return getJOSMLocaleCode()+"."; 127 127 } 128 128 129 static public String getLanguageCodeManifest() {129 public static String getLanguageCodeManifest() { 130 130 return getJOSMLocaleCode()+"_"; 131 131 } -
trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
r6830 r6889 250 250 * @return matching zoom level for area 251 251 */ 252 static public int getZoom(Bounds b) {252 public static int getZoom(Bounds b) { 253 253 // convert to mercator (for calculation of zoom only) 254 254 double latMin = Math.log(Math.tan(Math.PI/4.0+b.getMinLat()/180.0*Math.PI/2.0))*180.0/Math.PI; -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r6380 r6889 432 432 * @return the platform specific key stroke for the 'Copy' command 433 433 */ 434 static public KeyStroke getCopyKeyStroke() {434 public static KeyStroke getCopyKeyStroke() { 435 435 Shortcut sc = shortcuts.get("system:copy"); 436 436 if (sc == null) return null; … … 445 445 * @return the platform specific key stroke for the 'Paste' command 446 446 */ 447 static public KeyStroke getPasteKeyStroke() {447 public static KeyStroke getPasteKeyStroke() { 448 448 Shortcut sc = shortcuts.get("system:paste"); 449 449 if (sc == null) return null; … … 458 458 * @return the platform specific key stroke for the 'Cut' command 459 459 */ 460 static public KeyStroke getCutKeyStroke() {460 public static KeyStroke getCutKeyStroke() { 461 461 Shortcut sc = shortcuts.get("system:cut"); 462 462 if (sc == null) return null; -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6883 r6889 412 412 } 413 413 414 private final staticdouble EPSILON = 1e-11;414 private static final double EPSILON = 1e-11; 415 415 416 416 /** -
trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
r6828 r6889 31 31 * @return the geometry object 32 32 */ 33 static public WindowGeometry centerOnScreen(Dimension extent) {33 public static WindowGeometry centerOnScreen(Dimension extent) { 34 34 return centerOnScreen(extent, "gui.geometry"); 35 35 } … … 44 44 * @return the geometry object 45 45 */ 46 static public WindowGeometry centerOnScreen(Dimension extent, String preferenceKey) {46 public static WindowGeometry centerOnScreen(Dimension extent, String preferenceKey) { 47 47 Rectangle size = preferenceKey != null ? getScreenInfo(preferenceKey) 48 48 : getFullScreenInfo(); … … 62 62 * @return the geometry object 63 63 */ 64 static public WindowGeometry centerInWindow(Component reference, Dimension extent) {64 public static WindowGeometry centerInWindow(Component reference, Dimension extent) { 65 65 Window parentWindow = null; 66 66 while(reference != null && ! (reference instanceof Window) ) { … … 82 82 * Exception thrown by the WindowGeometry class if something goes wrong 83 83 */ 84 static public class WindowGeometryException extends Exception {84 public static class WindowGeometryException extends Exception { 85 85 public WindowGeometryException(String message, Throwable cause) { 86 86 super(message, cause); … … 178 178 } 179 179 180 static public WindowGeometry mainWindow(String preferenceKey, String arg, boolean maximize) {180 public static WindowGeometry mainWindow(String preferenceKey, String arg, boolean maximize) { 181 181 Rectangle screenDimension = getScreenInfo("gui.geometry"); 182 182 if (arg != null) {
Note:
See TracChangeset
for help on using the changeset viewer.