Changeset 12304 in josm for trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java
- Timestamp:
- 2017-06-02T23:21:03+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java
r11198 r12304 25 25 public class EditableList extends JPanel { 26 26 27 /** 28 * The title displayed in input dialog 29 */ 27 30 public final String title; 31 /** 32 * The list items 33 */ 28 34 public final JList<String> sourcesList = new JList<>(new DefaultListModel<String>()); 35 /** 36 * The add button 37 */ 29 38 public final JButton addSrcButton = new JButton(tr("Add")); 39 /** 40 * The edit button displayed nex to the list 41 */ 30 42 public final JButton editSrcButton = new JButton(tr("Edit")); 43 /** 44 * The delete button 45 */ 31 46 public final JButton deleteSrcButton = new JButton(tr("Delete")); 32 47 … … 115 130 } 116 131 132 /** 133 * Sets the list items by a given list of strings 134 * @param items The items that should be set 135 */ 117 136 public void setItems(final Iterable<String> items) { 118 137 for (String source : items) { … … 121 140 } 122 141 142 /** 143 * Gets all items that are currently displayed 144 * @return All items as list of strings 145 */ 123 146 public List<String> getItems() { 124 147 final List<String> items = new ArrayList<>(sourcesList.getModel().getSize());
Note:
See TracChangeset
for help on using the changeset viewer.