Changeset 8870 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2015-10-13T23:50:14+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
r8863 r8870 422 422 } 423 423 424 private String getRelationTypeName(IRelation relation) {424 private static String getRelationTypeName(IRelation relation) { 425 425 String name = trc("Relation type", relation.get("type")); 426 426 if (name == null) { … … 455 455 } 456 456 457 private String getNameTagValue(IRelation relation, String nameTag) {457 private static String getNameTagValue(IRelation relation, String nameTag) { 458 458 if ("name".equals(nameTag)) { 459 459 if (Main.pref.getBoolean("osm-primitives.localize-name", true)) … … 509 509 } 510 510 511 private String buildDefaultToolTip(long id, Map<String, String> tags) {511 private static String buildDefaultToolTip(long id, Map<String, String> tags) { 512 512 StringBuilder sb = new StringBuilder(); 513 513 sb.append("<html><strong>id</strong>=") -
trunk/src/org/openstreetmap/josm/gui/FileDrop.java
r8848 r8870 34 34 import org.openstreetmap.josm.Main; 35 35 import org.openstreetmap.josm.actions.OpenFileAction; 36 import org.openstreetmap.josm.gui.FileDrop.TransferableObject; 36 37 37 38 // CHECKSTYLE.OFF: HideUtilityClassConstructor … … 227 228 228 229 /** Determine if the dragged data is a file list. */ 229 private boolean isDragOk(final DropTargetDragEvent evt) {230 private static boolean isDragOk(final DropTargetDragEvent evt) { 230 231 boolean ok = false; 231 232 -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r8846 r8870 617 617 } 618 618 619 private void handleAutosave() {619 private static void handleAutosave() { 620 620 if (AutosaveTask.PROP_AUTOSAVE_ENABLED.get()) { 621 621 AutosaveTask autosaveTask = new AutosaveTask(); -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r8863 r8870 909 909 * @param result resulting list ofmenu items 910 910 */ 911 private void findMenuItems(final JMenu menu, final String textToFind, final List<JMenuItem> result) {911 private static void findMenuItems(final JMenu menu, final String textToFind, final List<JMenuItem> result) { 912 912 for (int i = 0; i < menu.getItemCount(); i++) { 913 913 JMenuItem menuItem = menu.getItem(i); -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r8856 r8870 207 207 } 208 208 209 private EastNorth calculateDefaultCenter() {209 private static EastNorth calculateDefaultCenter() { 210 210 Bounds b = DownloadDialog.getSavedDownloadBounds(); 211 211 if (b == null) { -
trunk/src/org/openstreetmap/josm/gui/SelectionManager.java
r8557 r8870 368 368 } 369 369 370 private void selectionAreaChanged() {370 private static void selectionAreaChanged() { 371 371 // Trigger a redraw of the map view. 372 372 // A nicer way would be to provide change events for the temporary layer. … … 436 436 } 437 437 438 private Polygon rectToPolygon(Rectangle r) {438 private static Polygon rectToPolygon(Rectangle r) { 439 439 Polygon poly = new Polygon(); 440 440 -
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
r8856 r8870 288 288 * @return List of primitives whose filtering can be affected by change in source primitives 289 289 */ 290 private Collection<OsmPrimitive> getAffectedPrimitives(Collection<? extends OsmPrimitive> primitives) {290 private static Collection<OsmPrimitive> getAffectedPrimitives(Collection<? extends OsmPrimitive> primitives) { 291 291 // Filters can use nested parent/child expression so complete tree is necessary 292 292 Set<OsmPrimitive> result = new HashSet<>(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
r8846 r8870 422 422 } 423 423 424 private String getSort(StyleSource s) {424 private static String getSort(StyleSource s) { 425 425 if (s instanceof XmlStyleSource) { 426 426 return tr("xml"); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r8863 r8870 226 226 * @return {@code true} if the user accepts to overwrite key, {@code false} otherwise 227 227 */ 228 private boolean warnOverwriteKey(String action, String togglePref) {228 private static boolean warnOverwriteKey(String action, String togglePref) { 229 229 ExtendedDialog ed = new ExtendedDialog( 230 230 Main.parent, -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java
r8510 r8870 191 191 } 192 192 193 private void setDotted(Graphics g) {193 private static void setDotted(Graphics g) { 194 194 ((Graphics2D) g).setStroke(new BasicStroke( 195 195 1f, … … 201 201 } 202 202 203 private void unsetDotted(Graphics g) {203 private static void unsetDotted(Graphics g) { 204 204 ((Graphics2D) g).setStroke(new BasicStroke()); 205 205 } -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r8855 r8870 788 788 } 789 789 790 private User getCurrentUser() {790 private static User getCurrentUser() { 791 791 UserInfo info = JosmUserIdentityManager.getInstance().getUserInfo(); 792 792 return info == null ? User.getAnonymous() : User.createOsmUser(info.getId(), info.getDisplayName()); -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r8836 r8870 568 568 } 569 569 570 private String getLastChangesetTagFromHistory(String historyKey, List<String> def) {570 private static String getLastChangesetTagFromHistory(String historyKey, List<String> def) { 571 571 Collection<String> history = Main.pref.getCollection(historyKey, def); 572 572 int age = (int) (System.currentTimeMillis() / 1000 - Main.pref.getInteger(BasicUploadSettingsPanel.HISTORY_LAST_USED_KEY, 0)); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r8846 r8870 1273 1273 } 1274 1274 1275 private int getLastIndexOfListBefore(List<ImageEntry> images, long searchedTime) {1275 private static int getLastIndexOfListBefore(List<ImageEntry> images, long searchedTime) { 1276 1276 int lstSize = images.size(); 1277 1277 … … 1307 1307 } 1308 1308 1309 private String formatTimezone(double timezone) {1309 private static String formatTimezone(double timezone) { 1310 1310 StringBuilder ret = new StringBuilder(); 1311 1311 … … 1326 1326 } 1327 1327 1328 private double parseTimezone(String timezone) throws ParseException {1328 private static double parseTimezone(String timezone) throws ParseException { 1329 1329 1330 1330 if (timezone.isEmpty()) … … 1397 1397 } 1398 1398 1399 private long parseOffset(String offset) throws ParseException {1399 private static long parseOffset(String offset) throws ParseException { 1400 1400 String error = tr("Error while parsing offset.\nExpected format: {0}", "number"); 1401 1401 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r8846 r8870 444 444 } 445 445 446 private Dimension scaledDimension(Image thumb) {446 private static Dimension scaledDimension(Image thumb) { 447 447 final double d = Main.map.mapView.getDist100Pixel(); 448 448 final double size = 10 /*meter*/; /* size of the photo on the map */ -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
r8840 r8870 559 559 } 560 560 561 private Point getCenterImgCoord(Rectangle visibleRect) {561 private static Point getCenterImgCoord(Rectangle visibleRect) { 562 562 return new Point(visibleRect.x + visibleRect.width / 2, 563 563 visibleRect.y + visibleRect.height / 2); … … 630 630 } 631 631 632 private void checkVisibleRectPos(Image image, Rectangle visibleRect) {632 private static void checkVisibleRectPos(Image image, Rectangle visibleRect) { 633 633 if (visibleRect.x < 0) { 634 634 visibleRect.x = 0; … … 645 645 } 646 646 647 private void checkVisibleRectSize(Image image, Rectangle visibleRect) {647 private static void checkVisibleRectSize(Image image, Rectangle visibleRect) { 648 648 if (visibleRect.width > image.getWidth(null)) { 649 649 visibleRect.width = image.getWidth(null); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
r8848 r8870 57 57 } 58 58 59 private void warnCantImportIntoServerLayer(GpxLayer layer) {59 private static void warnCantImportIntoServerLayer(GpxLayer layer) { 60 60 String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>" + 61 61 "Because its way points do not include a timestamp we cannot correlate them with audio data.</html>", -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
r8510 r8870 33 33 } 34 34 35 private void warnCantImportIntoServerLayer(GpxLayer layer) {35 private static void warnCantImportIntoServerLayer(GpxLayer layer) { 36 36 String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>"+ 37 37 "Because its way points do not include a timestamp we cannot correlate them with images.</html>", … … 41 41 } 42 42 43 private void addRecursiveFiles(List<File> files, File[] sel) {43 private static void addRecursiveFiles(List<File> files, File[] sel) { 44 44 for (File f : sel) { 45 45 if (f.isDirectory()) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java
r8836 r8870 69 69 } 70 70 71 private boolean mapHasGpxorMarkerLayer() {71 private static boolean mapHasGpxorMarkerLayer() { 72 72 for (Layer layer : Main.map.mapView.getAllLayers()) { 73 73 if (layer instanceof GpxLayer || layer instanceof MarkerLayer) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r8846 r8870 309 309 } 310 310 311 private boolean conditionRequiresKeyPresence(KeyMatchType matchType) {311 private static boolean conditionRequiresKeyPresence(KeyMatchType matchType) { 312 312 return matchType != KeyMatchType.REGEX; 313 313 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r8846 r8870 141 141 * @param mc side effect: update the valid region for the current MultiCascade 142 142 */ 143 private boolean requiresUpdate(Prototype current, Prototype candidate, Double scale, MultiCascade mc) {143 private static boolean requiresUpdate(Prototype current, Prototype candidate, Double scale, MultiCascade mc) { 144 144 if (current == null || candidate.priority >= current.priority) { 145 145 if (scale == null) -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r8846 r8870 684 684 } 685 685 686 private void appendRow(StringBuilder s, String th, String td) {686 private static void appendRow(StringBuilder s, String th, String td) { 687 687 s.append("<tr><th>").append(th).append("</th><td>").append(td).append("</td</tr>"); 688 688 } … … 1426 1426 } 1427 1427 1428 private String fromSourceEntry(SourceEntry entry) {1428 private static String fromSourceEntry(SourceEntry entry) { 1429 1429 if (entry == null) 1430 1430 return null; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r8836 r8870 195 195 } 196 196 197 private File[] askUserForCustomSettingsFiles(boolean saveFileFlag, String title) {197 private static File[] askUserForCustomSettingsFiles(boolean saveFileFlag, String title) { 198 198 FileFilter filter = new FileFilter() { 199 199 @Override -
trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
r8846 r8870 143 143 } 144 144 145 private String getName(String o) {145 private static String getName(String o) { 146 146 return Main.pref.getColorName(o); 147 147 } … … 262 262 * Add all missing color entries. 263 263 */ 264 private void fixColorPrefixes() {264 private static void fixColorPrefixes() { 265 265 PaintColors.getColors(); 266 266 ConflictColors.getColors(); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java
r8769 r8870 172 172 } 173 173 174 private Long getCacheSize(CacheAccess<String, BufferedImageCacheEntry> cache) {174 private static Long getCacheSize(CacheAccess<String, BufferedImageCacheEntry> cache) { 175 175 ICacheStats stats = cache.getStatistics(); 176 176 for (IStats cacheStats: stats.getAuxiliaryCacheStats()) { … … 242 242 } 243 243 244 private DefaultTableModel getTableModel(final CacheAccess<String, BufferedImageCacheEntry> cache) {244 private static DefaultTableModel getTableModel(final CacheAccess<String, BufferedImageCacheEntry> cache) { 245 245 final DefaultTableModel tableModel = new DefaultTableModel( 246 246 getCacheStats(cache), -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
r8836 r8870 99 99 } 100 100 101 private void addSettingsSection(final JPanel p, String name, JPanel section, GBC gbc) {101 private static void addSettingsSection(final JPanel p, String name, JPanel section, GBC gbc) { 102 102 final JLabel lbl = new JLabel(name); 103 103 lbl.setFont(lbl.getFont().deriveFont(Font.BOLD)); -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
r8836 r8870 164 164 } 165 165 166 private JComponent build() {166 private static JComponent build() { 167 167 StringBuilder s = new StringBuilder(); 168 168 s.append("<b>+proj=...</b> - <i>").append(tr("Projection name")) -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
r8554 r8870 471 471 } 472 472 473 private Collection<String> getSubprojectionPreference(ProjectionChoice pc) {473 private static Collection<String> getSubprojectionPreference(ProjectionChoice pc) { 474 474 return Main.pref.getCollection("projection.sub."+pc.getId(), null); 475 475 } -
trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreference.java
r8836 r8870 160 160 } 161 161 162 private void addDefault(List<ExtendedSourceEntry> defaults, String filename, String title, String description) {162 private static void addDefault(List<ExtendedSourceEntry> defaults, String filename, String title, String description) { 163 163 ExtendedSourceEntry i = new ExtendedSourceEntry(filename+".mapcss", "resource://data/validator/"+filename+".mapcss"); 164 164 i.title = title; -
trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
r8840 r8870 53 53 private boolean cancelable; 54 54 55 private void doInEDT(Runnable runnable) {55 private static void doInEDT(Runnable runnable) { 56 56 // This must be invoke later even if current thread is EDT because inside there is dialog.setVisible 57 57 // which freeze current code flow until modal dialog is closed -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetMenu.java
r8863 r8870 65 65 } 66 66 67 private Component copyMenuComponent(Component menuComponent) {67 private static Component copyMenuComponent(Component menuComponent) { 68 68 if (menuComponent instanceof JMenu) { 69 69 JMenu menu = (JMenu) menuComponent; -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
r8863 r8870 162 162 } 163 163 164 private int isMatching(Collection<String> values, String[] searchString) {164 private static int isMatching(Collection<String> values, String[] searchString) { 165 165 int sum = 0; 166 166 for (String word: searchString) { -
trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java
r8846 r8870 198 198 } 199 199 200 private boolean isFocusInMainWindow() {200 private static boolean isFocusInMainWindow() { 201 201 Component focused = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); 202 202 return focused != null && SwingUtilities.getWindowAncestor(focused) instanceof JFrame; -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r8846 r8870 312 312 } 313 313 314 private Dimension sizeWithInsets(Container parent, Dimension size) {314 private static Dimension sizeWithInsets(Container parent, Dimension size) { 315 315 Insets insets = parent.getInsets(); 316 316 int width = size.width + insets.left + insets.right; … … 331 331 } 332 332 333 private Rectangle boundsWithYandHeight(Rectangle bounds, double y, double height) {333 private static Rectangle boundsWithYandHeight(Rectangle bounds, double y, double height) { 334 334 Rectangle r = new Rectangle(); 335 335 r.setBounds((int) (bounds.getX()), (int) y, (int) (bounds.getWidth()), (int) height); … … 337 337 } 338 338 339 private Rectangle boundsWithXandWidth(Rectangle bounds, double x, double width) {339 private static Rectangle boundsWithXandWidth(Rectangle bounds, double x, double width) { 340 340 Rectangle r = new Rectangle(); 341 341 r.setBounds((int) x, (int) (bounds.getY()), (int) width, (int) (bounds.getHeight()));
Note:
See TracChangeset
for help on using the changeset viewer.