Changeset 30532 in osm for applications/editors/josm/plugins/turnrestrictions/test
- Timestamp:
- 2014-07-14T04:18:06+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/turnrestrictions/test/src/org/openstreetmap/josm/plugins/turnrestrictions/editor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnrestrictions/test/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorTest.java
r23192 r30532 15 15 import javax.swing.JPanel; 16 16 import javax.swing.JScrollPane; 17 import javax.swing.JTextArea;18 17 19 18 import org.openstreetmap.josm.data.coor.LatLon; … … 35 34 public class TurnRestrictionLegEditorTest extends JFrame { 36 35 37 private JTextArea taTest;38 36 private TurnRestrictionLegEditor editor; 39 37 private TurnRestrictionEditorModel model; 40 private JList lstObjects;41 private DefaultListModel listModel;38 private JList<OsmPrimitive> lstObjects; 39 private DefaultListModel<OsmPrimitive> listModel; 42 40 private DataSet dataSet; 43 44 41 45 42 protected JPanel buildLegEditorPanel() { … … 76 73 protected JPanel buildObjectListPanel() { 77 74 JPanel pnl = new JPanel(new BorderLayout()); 78 listModel = new DefaultListModel ();79 pnl.add(new JScrollPane(lstObjects = new JList (listModel)), BorderLayout.CENTER);75 listModel = new DefaultListModel<>(); 76 pnl.add(new JScrollPane(lstObjects = new JList<>(listModel)), BorderLayout.CENTER); 80 77 lstObjects.setCellRenderer(new OsmPrimitivRenderer()); 81 78 -
applications/editors/josm/plugins/turnrestrictions/test/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/ViaListTest.java
r23192 r30532 21 21 * 22 22 */ 23 public class ViaListTest extends JFrame{23 public class ViaListTest extends JFrame { 24 24 25 private ViaList lstVias;26 25 private TurnRestrictionEditorModel model; 27 private JList lstJOSMSelection;28 29 26 30 27 protected void build() { 31 28 DataSet ds = new DataSet(); 32 OsmDataLayer layer =new OsmDataLayer(ds, "test", null);29 OsmDataLayer layer =new OsmDataLayer(ds, "test", null); 33 30 // mock a controler 34 31 NavigationControler controler = new NavigationControler() { … … 54 51 55 52 DefaultListSelectionModel selectionModel = new DefaultListSelectionModel(); 56 c.add( lstVias =new ViaList(new ViaListModel(model, selectionModel), selectionModel), gc);53 c.add(new ViaList(new ViaListModel(model, selectionModel), selectionModel), gc); 57 54 58 55 gc.gridx = 1; 59 c.add( lstJOSMSelection = new JList(), gc);56 c.add(new JList<>(), gc); 60 57 61 58 setSize(600,600);
Note:
See TracChangeset
for help on using the changeset viewer.