Package org.openstreetmap.josm.data.osm

Examples of org.openstreetmap.josm.data.osm.Changeset


            this.selectedChangeset = null;
            super.setSelectedItem(null);
            return;
        }
        if (! (anObject instanceof Changeset)) return;
        Changeset cs = (Changeset)anObject;
        if (cs.getId() == 0 || ! cs.isOpen()) return;
        Changeset candidate = getChangesetById(cs.getId());
        if (candidate == null) return;
        this.selectedChangeset = candidate;
        super.setSelectedItem(selectedChangeset);
    }
View Full Code Here


     * Replies the current changeset
     *
     * @return the current changeset
     */
    public Changeset getChangeset() {
        Changeset cs = pnlChangesetManagement.getSelectedChangeset();
        if (cs == null) {
            cs = new Changeset();
        }
        cs.setKeys(pnlTagSettings.getTags(false));
        return cs;
    }
View Full Code Here

    /* Interface PropertyChangeListener                                           */
    /* -------------------------------------------------------------------------- */
    @Override
    public void propertyChange(PropertyChangeEvent evt) {
        if (evt.getPropertyName().equals(ChangesetManagementPanel.SELECTED_CHANGESET_PROP)) {
            Changeset cs = (Changeset)evt.getNewValue();
            if (cs == null) {
                tpConfigPanels.setTitleAt(1, tr("Tags of new changeset"));
            } else {
                tpConfigPanels.setTitleAt(1, tr("Tags of changeset {0}", cs.getId()));
            }
        }
    }
View Full Code Here

     */
    protected void downloadChangeset(int changesetId) throws OsmTransferException {
        synchronized(this) {
            reader = new OsmServerChangesetReader();
        }
        Changeset cs = reader.readChangeset(changesetId, getProgressMonitor().createSubTaskMonitor(0, false));
        synchronized(this) {
            reader = null;
        }
        ChangesetCache.getInstance().update(cs);
    }
View Full Code Here

                getProgressMonitor().setCustomText(tr("({0}/{1}) Downloading content for changeset {2}...", i, toDownload.size(), id));
                ChangesetDataSet ds = reader.downloadChangeset(id, getProgressMonitor().createSubTaskMonitor(0, false));
                synchronized(this) {
                    reader = null;
                }
                Changeset cs = ChangesetCache.getInstance().get(id);
                cs.setContent(ds);
                ChangesetCache.getInstance().update(cs);
                downloadedChangesets.add(cs);
                getProgressMonitor().worked(1);
            }
        } catch(OsmTransferCanceledException e) {
View Full Code Here

     * for the property {@link #CHANGESET_IN_DETAIL_VIEW_PROP} if necessary.
     *
     * @param cs the changeset currently displayed in the detail view.
     */
    public void setChangesetInDetailView(Changeset cs) {
        Changeset oldValue = changesetInDetailView;
        changesetInDetailView = cs;
        if (oldValue != cs) {
            support.firePropertyChange(CHANGESET_IN_DETAIL_VIEW_PROP, oldValue, changesetInDetailView);
        }
    }
View Full Code Here

     * @return the list of selected changesets
     */
    public List<Changeset> getSelectedChangesets() {
        List<Changeset> ret = new ArrayList<>();
        for (int i =0; i< data.size();i++) {
            Changeset cs = data.get(i);
            if (selectionModel.isSelectedIndex(i)) {
                ret.add(cs);
            }
        }
        return ret;
View Full Code Here

            data.remove(cs);
        }
        for (Changeset cs: event.getUpdatedChangesets()) {
            int idx = data.indexOf(cs);
            if (idx >= 0) {
                Changeset mine = data.get(idx);
                if (mine != cs) {
                    mine.mergeFrom(cs);
                }
            }
        }
        sort();
        fireTableDataChanged();
View Full Code Here

            int row, int column) {
        if (value == null)
            return this;
        reset();
        renderColors(isSelected);
        Changeset cs = (Changeset)value;
        switch(column) {
        case 0: /* id */ renderId(cs); break;
        case 1: /* upload comment */ renderUploadComment(cs); break;
        case 2: /* open/closed */ renderOpen(cs); break;
        case 3: /* user */ renderUser(cs); break;
        case 4: /* created at */ renderDate(cs.getCreatedAt()); break;
        case 5: /* closed at */ renderDate(cs.getClosedAt()); break;
        }
        return this;
    }
View Full Code Here

        Set<Changeset> changesets = new HashSet<>(ids.size());
        for (int id: ids) {
            if (id <= 0) {
                continue;
            }
            changesets.add(new Changeset(id));
        }
        setChangesets(changesets);
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.osm.Changeset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.