Changeset 32653 in osm for applications/editors/josm/plugins/mapillary/src/org
- Timestamp:
- 2016-07-14T17:02:54+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java
r31828 r32653 110 110 private final JMenuItem edit; 111 111 112 publicLinkPopUp(final String key) {112 LinkPopUp(final String key) { 113 113 this.copy = new JMenuItem(tr("Copy key")); 114 114 this.copy.addActionListener(new ActionListener() { -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryFilterDialog.java
r32631 r32653 277 277 } 278 278 279 private class UpdateAction extends AbstractAction { 279 private static class UpdateAction extends AbstractAction { 280 280 281 281 private static final long serialVersionUID = -7417238601979689863L; … … 292 292 } 293 293 294 private class ResetAction extends AbstractAction { 294 private static class ResetAction extends AbstractAction { 295 295 /** 296 296 * … … 328 328 * @author nokutu 329 329 */ 330 private class SignChooserAction extends AbstractAction { 330 private static class SignChooserAction extends AbstractAction { 331 331 332 332 private static final long serialVersionUID = 8706299665735930148L; -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryHistoryDialog.java
r32631 r32653 49 49 * 50 50 */ 51 public class MapillaryHistoryDialog extends ToggleDialog implements 52 MapillaryRecordListener { 51 public final class MapillaryHistoryDialog extends ToggleDialog implements MapillaryRecordListener { 53 52 54 53 private static final long serialVersionUID = -3019715241209349372L; … … 59 58 private final transient UndoRedoSelectionListener redoSelectionListener; 60 59 61 private final DefaultTreeModel undoTreeModel = new DefaultTreeModel( 62 new DefaultMutableTreeNode()); 63 private final DefaultTreeModel redoTreeModel = new DefaultTreeModel( 64 new DefaultMutableTreeNode()); 60 private final DefaultTreeModel undoTreeModel = new DefaultTreeModel(new DefaultMutableTreeNode()); 61 private final DefaultTreeModel redoTreeModel = new DefaultTreeModel(new DefaultMutableTreeNode()); 65 62 private final JTree undoTree = new JTree(this.undoTreeModel); 66 63 private final JTree redoTree = new JTree(this.redoTreeModel); … … 88 85 this.undoTree.setRootVisible(false); 89 86 this.undoTree.setCellRenderer(new MapillaryImageTreeCellRenderer()); 90 this.undoTree.getSelectionModel().setSelectionMode( 91 TreeSelectionModel.SINGLE_TREE_SELECTION); 87 this.undoTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); 92 88 this.undoTree.addMouseListener(new MouseEventHandler()); 93 89 this.undoSelectionListener = new UndoRedoSelectionListener(this.undoTree); 94 this.undoTree.getSelectionModel().addTreeSelectionListener( 95 this.undoSelectionListener); 90 this.undoTree.getSelectionModel().addTreeSelectionListener(this.undoSelectionListener); 96 91 97 92 this.redoTree.expandRow(0); … … 99 94 this.redoTree.setShowsRootHandles(true); 100 95 this.redoTree.setRootVisible(false); 101 this.redoTree.getSelectionModel().setSelectionMode( 102 TreeSelectionModel.SINGLE_TREE_SELECTION); 96 this.redoTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); 103 97 this.redoTree.addMouseListener(new MouseEventHandler()); 104 98 this.redoSelectionListener = new UndoRedoSelectionListener(this.redoTree); 105 this.redoTree.getSelectionModel().addTreeSelectionListener( 106 this.redoSelectionListener); 99 this.redoTree.getSelectionModel().addTreeSelectionListener(this.redoSelectionListener); 107 100 108 101 JPanel treesPanel = new JPanel(new GridBagLayout()); 109 102 treesPanel.add(this.spacer, GBC.eol()); 110 103 this.spacer.setVisible(false); 111 treesPanel 112 .add(this.undoTree, GBC.eol().fill(GridBagConstraints.HORIZONTAL)); 104 treesPanel.add(this.undoTree, GBC.eol().fill(GridBagConstraints.HORIZONTAL)); 113 105 this.separator.setVisible(false); 114 treesPanel.add(this.separator, GBC.eol() 115 .fill(GridBagConstraints.HORIZONTAL)); 116 treesPanel 117 .add(this.redoTree, GBC.eol().fill(GridBagConstraints.HORIZONTAL)); 118 treesPanel.add(Box.createRigidArea(new Dimension(0, 0)), 119 GBC.std().weight(0, 1)); 106 treesPanel.add(this.separator, GBC.eol().fill(GridBagConstraints.HORIZONTAL)); 107 treesPanel.add(this.redoTree, GBC.eol().fill(GridBagConstraints.HORIZONTAL)); 108 treesPanel.add(Box.createRigidArea(new Dimension(0, 0)), GBC.std().weight(0, 1)); 120 109 treesPanel.setBackground(this.redoTree.getBackground()); 121 110 … … 123 112 this.redoButton = new SideButton(new RedoAction()); 124 113 125 createLayout(treesPanel, true, 126 Arrays.asList(new SideButton[] { this.undoButton, this.redoButton })); 114 createLayout(treesPanel, true, Arrays.asList(new SideButton[] {this.undoButton, this.redoButton})); 127 115 } 128 116 … … 196 184 } 197 185 198 private class UndoAction extends AbstractAction { 186 private static class UndoAction extends AbstractAction { 199 187 200 188 private static final long serialVersionUID = -6435832206342007269L; 201 189 202 publicUndoAction() {190 UndoAction() { 203 191 putValue(NAME, tr("Undo")); 204 192 new ImageProvider("undo").getResource().attachImageIcon(this, true); … … 211 199 } 212 200 213 private class RedoAction extends AbstractAction { 201 private static class RedoAction extends AbstractAction { 214 202 215 203 private static final long serialVersionUID = -2761935780353053512L; 216 204 217 publicRedoAction() {205 RedoAction() { 218 206 putValue(NAME, tr("Redo")); 219 207 new ImageProvider("redo").getResource().attachImageIcon(this, true); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryImageDisplay.java
r32592 r32653 417 417 } 418 418 419 private finalPoint img2compCoord(Rectangle visibleRect, int xImg, int yImg) {419 private Point img2compCoord(Rectangle visibleRect, int xImg, int yImg) { 420 420 Rectangle drawRect = calculateDrawImageRectangle(visibleRect); 421 421 return new Point(drawRect.x + ((xImg - visibleRect.x) * drawRect.width) … … 424 424 } 425 425 426 private finalPoint comp2imgCoord(Rectangle visibleRect, int xComp, int yComp) {426 private Point comp2imgCoord(Rectangle visibleRect, int xComp, int yComp) { 427 427 Rectangle drawRect = calculateDrawImageRectangle(visibleRect); 428 428 return new Point( … … 432 432 } 433 433 434 private static finalPoint getCenterImgCoord(Rectangle visibleRect) {434 private static Point getCenterImgCoord(Rectangle visibleRect) { 435 435 return new Point(visibleRect.x + visibleRect.width / 2, visibleRect.y + visibleRect.height / 2); 436 436 } … … 499 499 } 500 500 501 private static finalvoid checkVisibleRectPos(Image image, Rectangle visibleRect) {501 private static void checkVisibleRectPos(Image image, Rectangle visibleRect) { 502 502 if (visibleRect.x < 0) { 503 503 visibleRect.x = 0; -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java
r32631 r32653 45 45 * @author nokutu 46 46 */ 47 public class MapillaryMainDialog extends ToggleDialog implements 47 public final class MapillaryMainDialog extends ToggleDialog implements 48 48 ICachedLoaderListener, MapillaryDataListener { 49 49 … … 343 343 * Constructs a normal NextPictureAction 344 344 */ 345 publicNextPictureAction() {345 NextPictureAction() { 346 346 putValue(NAME, tr("Next picture")); 347 347 putValue(SHORT_DESCRIPTION, tr("Shows the next picture in the sequence")); … … 359 359 * @author nokutu 360 360 */ 361 private class PreviousPictureAction extends AbstractAction { 361 private static class PreviousPictureAction extends AbstractAction { 362 362 363 363 private static final long serialVersionUID = -6420511632957956012L; … … 366 366 * Constructs a normal PreviousPictureAction 367 367 */ 368 publicPreviousPictureAction() {368 PreviousPictureAction() { 369 369 putValue(NAME, tr("Previous picture")); 370 370 putValue(SHORT_DESCRIPTION, tr("Shows the previous picture in the sequence")); … … 382 382 * @author nokutu 383 383 */ 384 private class RedAction extends AbstractAction { 384 private static class RedAction extends AbstractAction { 385 385 386 386 private static final long serialVersionUID = -6480229431481386376L; … … 389 389 * Constructs a normal RedAction 390 390 */ 391 publicRedAction() {391 RedAction() { 392 392 putValue(NAME, tr("Jump to red")); 393 393 putValue(SHORT_DESCRIPTION, … … 409 409 * @author nokutu 410 410 */ 411 private class BlueAction extends AbstractAction { 411 private static class BlueAction extends AbstractAction { 412 412 413 413 private static final long serialVersionUID = 6250690644594703314L; … … 416 416 * Constructs a normal BlueAction 417 417 */ 418 publicBlueAction() {418 BlueAction() { 419 419 putValue(NAME, tr("Jump to blue")); 420 420 putValue(SHORT_DESCRIPTION, … … 431 431 } 432 432 433 private class StopAction extends AbstractAction implements WalkListener { 433 private static class StopAction extends AbstractAction implements WalkListener { 434 434 435 435 private static final long serialVersionUID = -6561451575815789198L; … … 440 440 * Constructs a normal StopAction 441 441 */ 442 publicStopAction() {442 StopAction() { 443 443 putValue(NAME, tr("Stop")); 444 444 putValue(SHORT_DESCRIPTION, tr("Stops the walk.")); … … 459 459 } 460 460 461 private class PlayAction extends AbstractAction implements WalkListener { 461 private static class PlayAction extends AbstractAction implements WalkListener { 462 462 463 463 private static final long serialVersionUID = -17943404752082788L; … … 467 467 * Constructs a normal PlayAction 468 468 */ 469 publicPlayAction() {469 PlayAction() { 470 470 putValue(NAME, tr("Play")); 471 471 putValue(SHORT_DESCRIPTION, tr("Continues with the paused walk.")); … … 487 487 } 488 488 489 private class PauseAction extends AbstractAction implements WalkListener { 489 private static class PauseAction extends AbstractAction implements WalkListener { 490 490 491 491 private static final long serialVersionUID = 4400240686337741192L; … … 496 496 * Constructs a normal PauseAction 497 497 */ 498 publicPauseAction() {498 PauseAction() { 499 499 putValue(NAME, tr("Pause")); 500 500 putValue(SHORT_DESCRIPTION, tr("Pauses the walk.")); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java
r32652 r32653 125 125 } 126 126 127 new Thread( 127 new Thread(new Runnable() { 128 128 @Override 129 129 public void run() { 130 130 String username = MapillaryUser.getUsername(); 131 131 if (username != null) { 132 SwingUtilities.invokeLater( 132 SwingUtilities.invokeLater(new Runnable() { 133 133 @Override 134 134 public void run() { 135 135 onLogin(MapillaryUser.getUsername()); 136 136 } 137 } 137 }); 138 138 } 139 139 } … … 197 197 private final transient MapillaryLoginListener callback; 198 198 199 publicLoginAction(MapillaryLoginListener loginCallback) {199 LoginAction(MapillaryLoginListener loginCallback) { 200 200 this.callback = loginCallback; 201 201 }
Note:
See TracChangeset
for help on using the changeset viewer.