Changeset 2139 in josm
- Timestamp:
- 2009-09-15T07:52:33+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java
r2115 r2139 17 17 import javax.swing.JOptionPane; 18 18 import javax.swing.JPanel; 19 import javax.swing.JScrollPane; 19 20 import javax.swing.event.ListSelectionEvent; 20 21 import javax.swing.event.ListSelectionListener; … … 28 29 import static org.openstreetmap.josm.tools.I18n.tr; 29 30 31 /** 32 * This dialog lets the user select changesets from a list of changesets. 33 * 34 */ 30 35 public class CloseChangesetDialog extends JDialog { 31 36 37 /** the list */ 32 38 private JList lstOpenChangesets; 39 /** true if the user cancelled the dialog */ 33 40 private boolean canceled; 41 /** the list model */ 34 42 private DefaultListModel model; 35 43 … … 46 54 pnl.setLayout(new BorderLayout()); 47 55 model = new DefaultListModel(); 48 pnl.add( lstOpenChangesets = new JList(model), BorderLayout.CENTER);56 pnl.add(new JScrollPane(lstOpenChangesets = new JList(model)), BorderLayout.CENTER); 49 57 lstOpenChangesets.setCellRenderer(new ChangesetCellRenderer()); 50 58 return pnl; … … 125 133 } 126 134 135 /** 136 * Replies true if this dialog was canceled 137 * @return true if this dialog was canceled 138 */ 127 139 public boolean isCanceled() { 128 140 return canceled; 129 141 } 130 142 143 /** 144 * Sets whether this dialog is canceled 145 * 146 * @param canceled true, if this dialog is canceld 147 */ 131 148 protected void setCanceled(boolean canceled) { 132 149 this.canceled = canceled; 133 150 } 134 151 152 /** 153 * Sets the collection of changesets to be displayed 154 * 155 * @param changesets the collection of changesets. Assumes an empty collection if null 156 */ 135 157 public void setChangesets(Collection<Changeset> changesets) { 136 158 if (changesets == null) { … … 143 165 } 144 166 167 /** 168 * Replies a collection with the changesets the user selected. 169 * Never null, but may be empty. 170 * 171 * @return a collection with the changesets the user selected. 172 */ 145 173 public Collection<Changeset> getSelectedChangesets() { 146 174 Object [] sel = lstOpenChangesets.getSelectedValues();
Note:
See TracChangeset
for help on using the changeset viewer.