Changeset 12372 in josm


Ignore:
Timestamp:
2017-06-09T21:06:35+02:00 (2 years ago)
Author:
michael2402
Message:

See #14794: Document package gui.dialogs.changeset

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListCellRenderer.java

    r8509 r12372  
    1414import org.openstreetmap.josm.tools.ImageProvider;
    1515
     16/**
     17 * This class renders the cells in a {@link ChangesetListModel}.
     18 */
    1619public class ChangesetListCellRenderer extends JLabel implements ListCellRenderer<Changeset> {
    1720
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java

    r11365 r12372  
    2020import org.openstreetmap.josm.data.osm.Storage;
    2121
     22/**
     23 * This is the model that backs a list of changesets
     24 */
    2225public class ChangesetListModel extends DefaultListModel<Changeset> implements ChangesetCacheListener {
    2326    private final transient List<Changeset> data = new ArrayList<>();
     
    2528    private final DefaultListSelectionModel selectionModel;
    2629
     30    /**
     31     * Creates a new {@link ChangesetListModel}
     32     * @param selectionModel The selection model to use for this list
     33     */
    2734    public ChangesetListModel(DefaultListSelectionModel selectionModel) {
    2835        this.selectionModel = selectionModel;
    2936    }
    3037
     38    /**
     39     * Gets the list of changesets that are currently selected
     40     * @return The selected changesets
     41     */
    3142    public Set<Changeset> getSelectedChangesets() {
    3243        Set<Changeset> ret = new HashSet<>();
     
    3950    }
    4051
     52    /**
     53     * Gets the IDs of the changesets that are selected
     54     * @return The selected ids
     55     */
    4156    public Set<Integer> getSelectedChangesetIds() {
    4257        Set<Integer> ret = new HashSet<>();
     
    4964    }
    5065
     66    /**
     67     * Sets the changesets to select
     68     * @param changesets The changesets
     69     */
    5170    public void setSelectedChangesets(Collection<Changeset> changesets) {
    5271        selectionModel.setValueIsAdjusting(true);
     
    86105    }
    87106
     107    /**
     108     * Loads this list with the given changesets
     109     * @param ids The ids of the changesets to display
     110     */
    88111    public void initFromChangesetIds(Collection<Integer> ids) {
    89112        if (ids == null || ids.isEmpty()) {
     
    101124    }
    102125
     126    /**
     127     * Loads this list with the given changesets
     128     * @param primitives The primitives of which the changesets should be displayed
     129     */
    103130    public void initFromPrimitives(Collection<? extends OsmPrimitive> primitives) {
    104131        if (primitives == null) {
     
    116143    }
    117144
     145    /**
     146     * Loads this list with the given changesets
     147     * @param ds The data set to get all changesets from
     148     */
    118149    public void initFromDataSet(DataSet ds) {
    119150        if (ds == null) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetsInActiveDataLayerListModel.java

    r10332 r12372  
    2323public class ChangesetsInActiveDataLayerListModel extends ChangesetListModel implements DataSetListener, ActiveLayerChangeListener {
    2424
     25    /**
     26     * Creates a new {@link ChangesetsInActiveDataLayerListModel}
     27     * @param selectionModel The selection model for the list
     28     */
    2529    public ChangesetsInActiveDataLayerListModel(DefaultListSelectionModel selectionModel) {
    2630        super(selectionModel);
Note: See TracChangeset for help on using the changeset viewer.