- Timestamp:
- 2016-03-26T16:00:08+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
r10031 r10047 94 94 @Override 95 95 public void paint(Graphics2D g, MapView mv, Bounds bbox) { 96 ImproveWayAccuracyAction.this.paint(g, mv, bbox); ;96 ImproveWayAccuracyAction.this.paint(g, mv, bbox); 97 97 } 98 98 }; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java
r9759 r10047 28 28 public class ListEditor extends AbstractListEditor<String> { 29 29 30 private final List <String> data;30 private final ListSettingTableModel model; 31 31 32 32 /** … … 38 38 public ListEditor(final JComponent gui, PrefEntry entry, ListSetting setting) { 39 39 super(gui, tr("Change list setting"), entry); 40 List<String> orig = setting.getValue(); 41 if (orig != null) { 42 data = new ArrayList<>(orig); 43 } else { 44 data = new ArrayList<>(); 45 } 40 model = new ListSettingTableModel(setting.getValue()); 46 41 setContent(build(), false); 47 42 } … … 49 44 @Override 50 45 public List<String> getData() { 51 return new ArrayList<>(Utils.filter( data, new Predicate<String>() {46 return new ArrayList<>(Utils.filter(model.getData(), new Predicate<String>() { 52 47 @Override 53 48 public boolean evaluate(String object) { … … 61 56 JPanel p = new JPanel(new GridBagLayout()); 62 57 p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.eol().insets(0, 0, 5, 0)); 63 ListSettingTableModel listModel = new ListSettingTableModel(); 64 JTable table = new JTable(listModel); 58 JTable table = new JTable(model); 65 59 table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 66 60 table.setTableHeader(null); … … 75 69 } 76 70 77 class ListSettingTableModel extends AbstractTableModel { 71 static class ListSettingTableModel extends AbstractTableModel { 72 73 private final List<String> data; 74 75 ListSettingTableModel(List<String> orig) { 76 if (orig != null) { 77 data = new ArrayList<>(orig); 78 } else { 79 data = new ArrayList<>(); 80 } 81 } 78 82 79 83 public List<String> getData() {
Note:
See TracChangeset
for help on using the changeset viewer.