Ignore:
Timestamp:
2014-07-14T04:18:06+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix compilation warnings

Location:
applications/editors/josm/plugins/public_transport/src/public_transport
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSImporterDialog.java

    r29854 r30532  
    2828  private JDialog jDialog = null;
    2929  private JTabbedPane tabbedPane = null;
    30   private JComboBox cbStoptype = null;
     30  private JComboBox<TransText> cbStoptype = null;
    3131  private JList tracksList = null;
    3232  private JTextField tfGPSTimeStart = null;
     
    6868    contentPane.add(label);
    6969
    70     cbStoptype = new JComboBox();
     70    cbStoptype = new JComboBox<>();
    7171    cbStoptype.setEditable(false);
    7272    for(String type : stoptypes)
     
    481481  public static double parseTime(String s)
    482482  {
    483     double result = 0;
    484483    if ((s.charAt(2) != ':') || (s.charAt(2) != ':')
    485484     || (s.length() < 8))
  • applications/editors/josm/plugins/public_transport/src/public_transport/RoutePatternAction.java

    r29859 r30532  
    398398  private static JDialog jDialog = null;
    399399  private static JTabbedPane tabbedPane = null;
    400   private static DefaultListModel relsListModel = null;
     400  private static DefaultListModel<RouteReference> relsListModel = null;
    401401  private static TagTableModel requiredTagsData = null;
    402402  private static CustomCellEditorTable requiredTagsTable = null;
     
    410410  private static StoplistTableModel stoplistData = null;
    411411  private static JTable stoplistTable = null;
    412   private static JList relsList = null;
     412  private static JList<RouteReference> relsList = null;
    413413  private static JCheckBox cbRight = null;
    414414  private static JCheckBox cbLeft = null;
     
    418418  private static Vector< RelationMember > markedWays = new Vector< RelationMember >();
    419419  private static Vector< RelationMember > markedNodes = new Vector< RelationMember >();
    420 
    421   private static Relation copy = null;
    422420
    423421  public RoutePatternAction() {
     
    470468      contentPane.add(headline);
    471469
    472       relsListModel = new DefaultListModel();
    473       relsList = new JList(relsListModel);
     470      relsListModel = new DefaultListModel<>();
     471      relsList = new JList<>(relsListModel);
    474472      JScrollPane rpListSP = new JScrollPane(relsList);
    475473      String[] data = {"1", "2", "3", "4", "5", "6"};
     
    584582      rowContent.add("route");
    585583      requiredTagsData.addRow(rowContent);
    586       JComboBox comboBox = new JComboBox();
     584      JComboBox<String> comboBox = new JComboBox<>();
    587585      comboBox.addItem("route");
    588586      requiredTagsTable.setCellEditor(0, 1, new DefaultCellEditor(comboBox));
     
    592590      rowContent.add(1, "bus");
    593591      requiredTagsData.addRow(rowContent);
    594       /*JComboBox*/ comboBox = new JComboBox();
     592      /*JComboBox*/ comboBox = new JComboBox<>();
    595593      comboBox.addItem("bus");
    596594      comboBox.addItem("trolleybus");
     
    743741      itineraryTable.setModel(itineraryData);
    744742      /*JScrollPane*/ tableSP = new JScrollPane(itineraryTable);
    745       /*JComboBox*/ comboBox = new JComboBox();
     743      /*JComboBox*/ comboBox = new JComboBox<>();
    746744      comboBox.addItem("");
    747745      comboBox.addItem("forward");
     
    867865      stoplistTable.setModel(stoplistData);
    868866      /*JScrollPane*/ tableSP = new JScrollPane(stoplistTable);
    869       /*JComboBox*/ comboBox = new JComboBox();
     867      /*JComboBox*/ comboBox = new JComboBox<>();
    870868      comboBox.addItem("");
    871869      comboBox.addItem("forward_stop");
     
    11091107      Vector< RelationMember > itemsToReflect = new Vector< RelationMember >();
    11101108      Vector< RelationMember > otherItems = new Vector< RelationMember >();
    1111       int insPos = itineraryTable.getSelectedRow();
    11121109
    11131110      // Temp
    11141111      Node firstNode = null;
    1115       Node lastNode = null;
     1112      //Node lastNode = null;
    11161113
    11171114      for (int i = 0; i < currentRoute.getMembersCount(); ++i)
     
    11361133              firstNode = item.getWay().getNode(0);
    11371134          }
    1138           lastNode = item.getWay().getNode(item.getWay().getNodesCount() - 1);
     1135          //lastNode = item.getWay().getNode(item.getWay().getNodesCount() - 1);
    11391136        }
    11401137        else if (item.isNode())
  • applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterAction.java

    r30358 r30532  
    3838{
    3939  private static StopImporterDialog dialog = null;
    40   private static DefaultListModel tracksListModel = null;
     40  private static DefaultListModel<TrackReference> tracksListModel = null;
    4141  private static GpxData data = null;
    4242  private static TrackReference currentTrack = null;
     
    6262  }
    6363
    64   public DefaultListModel getTracksListModel()
     64  public DefaultListModel<TrackReference> getTracksListModel()
    6565  {
    6666    if (tracksListModel == null)
    67       tracksListModel = new DefaultListModel();
     67      tracksListModel = new DefaultListModel<>();
    6868    return tracksListModel;
    6969  }
  • applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterDialog.java

    r29859 r30532  
    3333  private JDialog jDialog = null;
    3434  private JTabbedPane tabbedPane = null;
    35   private JComboBox cbStoptype = null;
    36   private JList tracksList = null;
     35  private JComboBox<TransText> cbStoptype = null;
     36  private JList<TrackReference> tracksList = null;
    3737  private JTextField tfGPSTimeStart = null;
    3838  private JTextField tfStopwatchStart = null;
     
    8080    contentPane.add(label);
    8181
    82     DefaultListModel tracksListModel = controller.getTracksListModel();
    83     tracksList = new JList(tracksListModel);
     82    DefaultListModel<TrackReference> tracksListModel = controller.getTracksListModel();
     83    tracksList = new JList<>(tracksListModel);
    8484    JScrollPane rpListSP = new JScrollPane(tracksList);
    8585    String[] data = {"1", "2", "3", "4", "5", "6"};
     
    114114    contentPane.add(label);
    115115
    116     cbStoptype = new JComboBox();
     116    cbStoptype = new JComboBox<>();
    117117    cbStoptype.setEditable(false);
    118118    for(String type : stoptypes)
     
    640640  {
    641641    stoplistTable.setModel(model);
    642     JComboBox comboBox = new JComboBox();
     642    JComboBox<TransText> comboBox = new JComboBox<>();
    643643    comboBox.addItem(new TransText(null));
    644644    comboBox.addItem(new TransText(marktr("yes")));
     
    661661  {
    662662    waypointTable.setModel(model);
    663     JComboBox comboBox = new JComboBox();
     663    JComboBox<TransText> comboBox = new JComboBox<>();
    664664    comboBox.addItem(new TransText(null));
    665665    comboBox.addItem(new TransText(marktr("yes")));
Note: See TracChangeset for help on using the changeset viewer.