Changeset 31396 in osm for applications


Ignore:
Timestamp:
2015-07-21T16:34:28+02:00 (9 years ago)
Author:
nokutu
Message:

Walk mode created. Set an interval and it will automatically switch to next picture.

Location:
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java

    r31386 r31396  
    3232  private final List<MapillaryAbstractImage> multiSelectedImages;
    3333
    34   private List<MapillaryDataListener> listeners = new ArrayList<>();
     34  private List<MapillaryDataListener> listeners = new CopyOnWriteArrayList<>();
    3535
    3636  /**
     
    4141    multiSelectedImages = new ArrayList<>();
    4242    selectedImage = null;
     43   
     44    addListener(MapillaryPlugin.walkAction);
    4345  }
    4446
     
    219221
    220222  /**
    221    * Selects a new image.If the user does ctrl+click, this isn't triggered.
     223   * Selects a new image.If the user does ctrl + click, this isn't triggered.
    222224   *
    223225   * @param image
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java

    r31386 r31396  
    4040  public static final ImageIcon MAP_ICON_SELECTED = new ImageProvider(
    4141      "mapiconselected.png").get();
    42   /** Icon representing an imported iage in the map. */
     42  /** Icon representing an imported image in the map. */
    4343  public static final ImageIcon MAP_ICON_IMPORTED = new ImageProvider(
    4444      "mapiconimported.png").get();
    4545  /** Icon used to identify which images have signs on them */
    4646  public static final ImageIcon MAP_SIGN = new ImageProvider("sign.png").get();
    47   public static final int ICON_SIZE = 24;
    4847
    4948  /** Cache that stores the pictures the downloaded pictures. */
     
    5756  private final MapillaryImportIntoSequenceAction importIntoSequenceAction;
    5857  private final MapillaryJoinAction joinAction;
     58  /** Walk action */
     59  public final static MapillaryWalkAction walkAction = new MapillaryWalkAction();
    5960
    6061  /** Menu button for the {@link MapillaryDownloadAction} action. */
     
    7273  /** Menu button for the {@link MapillaryJoinAction} action. */
    7374  public static JMenuItem JOIN_MENU;
     75  /** Menu button for the {@link MapillaryWalkAction} action. */
     76  public static JMenuItem WALK_MENU;
    7477
    7578  /**
     
    101104          downloadViewAction, false, 14);
    102105      JOIN_MENU = MainMenu.add(Main.main.menu.dataMenu, joinAction, false);
     106      WALK_MENU = MainMenu.add(Main.main.menu.moreToolsMenu, walkAction, false);
    103107    }
    104108
     
    110114    DOWNLOAD_VIEW_MENU.setEnabled(false);
    111115    JOIN_MENU.setEnabled(false);
     116    WALK_MENU.setEnabled(false);
    112117
    113118    try {
     
    151156   *          The JMenuItem object that is going to be enabled or disabled.
    152157   * @param value
    153    *          true to enable de JMenuItem; false to disable it.
     158   *          true to enable the JMenuItem; false to disable it.
    154159   */
    155160  public static void setMenuEnabled(JMenuItem menu, boolean value) {
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java

    r31387 r31396  
    4646  private LinkedList<MapillaryImportedImage> images;
    4747
     48  /**
     49   * Main constructor.
     50   */
    4851  public MapillaryImportIntoSequenceAction() {
    4952    super(tr("Import pictures into sequence"), new ImageProvider("icon24.png"),
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java

    r31389 r31396  
    6565  private JPanel buttonsPanel;
    6666
    67   private MapillaryImageDisplay mapillaryImageDisplay;
     67  /** Object containing the shown image and that handles zoom and drag */
     68  public MapillaryImageDisplay mapillaryImageDisplay;
    6869
    6970  private MapillaryCache imageCache;
     
    257258            title += " -- " + mapillaryImage.getDate();
    258259          setTitle(title);
    259         }
    260         else if (this.image instanceof MapillaryImportedImage) {
     260        } else if (this.image instanceof MapillaryImportedImage) {
    261261          MapillaryImportedImage mapillaryImportedImage = (MapillaryImportedImage) this.image;
    262262          String title = tr(BASE_TITLE);
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java

    r31391 r31396  
    6767      oauth.setText("Login");
    6868    else
    69        oauth.setText("Already loged in, click to relogin");
     69       oauth.setText("Already loged in, click to relogin.");
    7070    panel.add(oauth);
    7171    gui.getDisplayPreference().addSubTab(this, "Mapillary", panel);
Note: See TracChangeset for help on using the changeset viewer.