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/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/Preferences.java

    r27863 r30532  
    22
    33
     4import java.awt.event.ActionEvent;
     5import java.awt.event.ActionListener;
     6
     7import javax.swing.DefaultComboBoxModel;
     8import javax.swing.GroupLayout;
     9import javax.swing.JCheckBox;
     10import javax.swing.JComboBox;
     11import javax.swing.JLabel;
    412import javax.swing.JPanel;
     13import javax.swing.JTextField;
     14import javax.swing.event.ChangeEvent;
     15import javax.swing.event.ChangeListener;
    516
    617import org.openstreetmap.josm.Main;
     
    7081    private void initComponents() {
    7182
    72         mainPanel = new javax.swing.JPanel();
    73         addNewTagCheckBox = new javax.swing.JCheckBox();
    74         addNewTagKeyField = new javax.swing.JTextField();
    75         jLabel1 = new javax.swing.JLabel();
    76         addNewTagValueField = new javax.swing.JTextField();
    77         jLabel2 = new javax.swing.JLabel();
    78         optimizeComboBox = new javax.swing.JComboBox();
    79         buildingCheckBox = new javax.swing.JCheckBox();
     83        mainPanel = new JPanel();
     84        addNewTagCheckBox = new JCheckBox();
     85        addNewTagKeyField = new JTextField();
     86        jLabel1 = new JLabel();
     87        addNewTagValueField = new JTextField();
     88        jLabel2 = new JLabel();
     89        optimizeComboBox = new JComboBox<>();
     90        buildingCheckBox = new JCheckBox();
    8091
    8192        thisPanel.setLayout(new java.awt.GridLayout(1, 0));
    8293
    8394        addNewTagCheckBox.setText("Novým primitivám přidávat tag:");
    84         addNewTagCheckBox.addChangeListener(new javax.swing.event.ChangeListener() {
    85             public void stateChanged(javax.swing.event.ChangeEvent evt) {
     95        addNewTagCheckBox.addChangeListener(new ChangeListener() {
     96            public void stateChanged(ChangeEvent evt) {
    8697                addNewTagChanged(evt);
    8798            }
    8899        });
    89         addNewTagCheckBox.addActionListener(new java.awt.event.ActionListener() {
    90             public void actionPerformed(java.awt.event.ActionEvent evt) {
     100        addNewTagCheckBox.addActionListener(new ActionListener() {
     101            public void actionPerformed(ActionEvent evt) {
    91102                addNewTagCheckBoxActionPerformed(evt);
    92103            }
     
    103114        jLabel2.setText("Optimalizovat algoritmus přiřazování:");
    104115
    105         optimizeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "pro rychlejší odezvu", "menší spotřebu paměti" }));
     116        optimizeComboBox.setModel(new DefaultComboBoxModel<>(new String[] { "pro rychlejší odezvu", "menší spotřebu paměti" }));
    106117        optimizeComboBox.setSelectedIndex(1);
    107118        optimizeComboBox.setEnabled(false);
    108119
    109120        buildingCheckBox.setText("Nově polygonům přidávat tag \"building=yes\"");
    110         buildingCheckBox.addChangeListener(new javax.swing.event.ChangeListener() {
    111             public void stateChanged(javax.swing.event.ChangeEvent evt) {
     121        buildingCheckBox.addChangeListener(new ChangeListener() {
     122            public void stateChanged(ChangeEvent evt) {
    112123                buildingCheckBoxaddNewTagChanged(evt);
    113124            }
     
    119130        });
    120131
    121         javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
     132        javax.swing.GroupLayout mainPanelLayout = new GroupLayout(mainPanel);
    122133        mainPanel.setLayout(mainPanelLayout);
    123134        mainPanelLayout.setHorizontalGroup(
     
    213224    private javax.swing.JLabel jLabel2;
    214225    private javax.swing.JPanel mainPanel;
    215     private javax.swing.JComboBox optimizeComboBox;
     226    private javax.swing.JComboBox<String> optimizeComboBox;
    216227    // End of variables declaration//GEN-END:variables
    217228
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/ElementWithHouses.java

    r23190 r30532  
    5757        return houses;
    5858    }
    59 
    60 
    61 
    6259}
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java

    r29854 r30532  
    8787        candLabel = new javax.swing.JLabel();
    8888        mainZoomButton = new javax.swing.JButton();
    89         mainField = new javax.swing.JComboBox();
    90         candField = new javax.swing.JComboBox();
     89        mainField = new javax.swing.JComboBox<>();
     90        candField = new javax.swing.JComboBox<>();
    9191        candPickButton = new javax.swing.JButton();
    9292        mainPickButton = new javax.swing.JButton();
     
    123123        });
    124124
    125         mainField.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
     125        mainField.setModel(new javax.swing.DefaultComboBoxModel<Object>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    126126        mainField.setRenderer(new UniversalListRenderer());
    127127
    128         candField.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " " }));
     128        candField.setModel(new javax.swing.DefaultComboBoxModel<Object>(new String[] { " " }));
    129129        candField.setRenderer(new UniversalListRenderer());
    130130
     
    236236                    r.unOverwrite(prim, r.translate(prim));
    237237
    238                 ComboBoxModel model = candField.getModel();
     238                ComboBoxModel<Object> model = candField.getModel();
    239239                for (int i = 0; i < model.getSize(); i++) {
    240240                    AddressElement elem = (AddressElement) model.getElementAt(i);
     
    253253                    r.unOverwrite(r.translate(elem), elem);
    254254
    255                 ComboBoxModel model = candField.getModel();
     255                ComboBoxModel<Object> model = candField.getModel();
    256256                for (int i = 0; i < model.getSize(); i++) {
    257257                    OsmPrimitive prim = (OsmPrimitive) model.getElementAt(i);
     
    279279
    280280    // Variables declaration - do not modify//GEN-BEGIN:variables
    281     private javax.swing.JComboBox candField;
     281    private javax.swing.JComboBox<Object> candField;
    282282    private javax.swing.JLabel candLabel;
    283283    private javax.swing.JButton candPickButton;
    284284    private javax.swing.JButton candZoomButton;
    285     private javax.swing.JComboBox mainField;
     285    private javax.swing.JComboBox<Object> mainField;
    286286    private javax.swing.JLabel mainLabel;
    287287    private javax.swing.JPanel mainPanel;
     
    325325
    326326    private ConflictsModel conflictModel = new ConflictsModel();
    327     private class ConflictsModel implements ComboBoxModel {
     327    private class ConflictsModel implements ComboBoxModel<Object> {
    328328
    329329        ArrayList<AddressElement> elements = new ArrayList<AddressElement>();
     
    473473            conflPrims.addAll(Reasoner.getInstance().getCandidates(selElem));
    474474            Collections.sort(conflPrims, PrimUtils.comparator);
    475             candField.setModel(new CandidatesModel<OsmPrimitive>(conflPrims));
     475            candField.setModel(new CandidatesModel<Object>(conflPrims));
    476476
    477477        } else if (selected instanceof OsmPrimitive) {
     
    480480            conflElems.addAll(Reasoner.getInstance().getCandidates(selElem));
    481481            Collections.sort(conflElems);
    482             candField.setModel(new CandidatesModel<AddressElement>(conflElems));
     482            candField.setModel(new CandidatesModel<Object>(conflElems));
    483483
    484484        } else {
    485             candField.setModel(new DefaultComboBoxModel());
     485            candField.setModel(new DefaultComboBoxModel<>());
    486486            candZoomButton.setEnabled(false);
    487487            reassignButton.setEnabled(false);
     
    512512    }
    513513
    514     private class CandidatesModel<E> implements ComboBoxModel {
     514    private class CandidatesModel<E> implements ComboBoxModel<E> {
    515515
    516516        Set<ListDataListener> listeners = new HashSet<ListDataListener>();
     
    540540            } else
    541541                reassignButton.setEnabled(false);
    542 
    543 
    544542        }
    545543
     
    552550        }
    553551
    554         public Object getElementAt(int index) {
     552        public E getElementAt(int index) {
    555553            if (index < primitives.size())
    556554                return primitives.get(index);
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java

    r30346 r30532  
    121121
    122122        for (int i=0; i<houseModel.getSize(); i++)
    123             if (houseModel.getHouseAt(i) == house) {
     123            if (houseModel.getElementAt(i) == house) {
    124124                houseList.setSelectedIndex(i);
    125125                houseList.ensureIndexIsVisible(i);
     
    159159        index++; // Initial kick to do at least one move.
    160160        House current;
    161         while ( (current = houseModel.getHouseAt(index)) != null
     161        while ( (current = houseModel.getElementAt(index)) != null
    162162             && Reasoner.getInstance().translate(current) != null)
    163163            index++;
     
    262262        mainPanel = new javax.swing.JPanel();
    263263        jScrollPane1 = new javax.swing.JScrollPane();
    264         houseList = new javax.swing.JList();
     264        houseList = new javax.swing.JList<>();
    265265        keepOddityCheckBox = new javax.swing.JCheckBox();
    266266        relocateButton = new javax.swing.JButton();
    267         streetComboBox = new javax.swing.JComboBox();
     267        streetComboBox = new javax.swing.JComboBox<>();
    268268
    269269        setLayout(new java.awt.GridLayout(1, 0));
    270 
    271         houseList.setModel(new javax.swing.AbstractListModel() {
     270/*
     271        houseList.setModel(new javax.swing.AbstractListModel<String>() {
    272272            String[] strings = { " " };
    273273            @Override
    274274            public int getSize() { return strings.length; }
    275275            @Override
    276             public Object getElementAt(int i) { return strings[i]; }
    277         });
     276            public String getElementAt(int i) { return strings[i]; }
     277        });*/
    278278        houseList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    279279        houseList.setEnabled(false);
     
    349349
    350350    // Variables declaration - do not modify//GEN-BEGIN:variables
    351     private javax.swing.JList houseList;
     351    private javax.swing.JList<House> houseList;
    352352    private javax.swing.JScrollPane jScrollPane1;
    353353    private javax.swing.JCheckBox keepOddityCheckBox;
    354354    private javax.swing.JPanel mainPanel;
    355355    private javax.swing.JButton relocateButton;
    356     private javax.swing.JComboBox streetComboBox;
     356    private javax.swing.JComboBox<ElementWithHouses> streetComboBox;
    357357    // End of variables declaration//GEN-END:variables
    358358
     
    370370    private class StreetListRenderer extends DefaultListCellRenderer {
    371371        @Override
    372         public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
     372        public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
    373373            Component c = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    374374
     
    398398
    399399        @Override
    400         public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
     400        public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
    401401            Component c = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    402402
     
    467467//==============================================================================
    468468
    469     private class StreetListModel extends HalfCookedComboBoxModel {
     469    private class StreetListModel extends HalfCookedComboBoxModel<ElementWithHouses> {
    470470
    471471        private ElementWithHouses selected = null;
     
    499499
    500500        @Override
    501         public Object getElementAt(int index) {
     501        public ElementWithHouses getElementAt(int index) {
    502502            if (parent == null) return null;
    503503
     
    528528//==============================================================================
    529529
    530     private class HouseListModel extends HalfCookedListModel
     530    private class HouseListModel extends HalfCookedListModel<House>
    531531                                 implements ReasonerListener {
    532532
     
    544544        }
    545545
    546         public House getHouseAt(int index) {
     546        @Override
     547        public House getElementAt(int index) {
    547548            if (streetComboBox.getSelectedItem() == null) return null;
    548549            ElementWithHouses selected
     
    555556
    556557        @Override
    557         public Object getElementAt(int index) {
    558             return getHouseAt(index);
    559         }
    560 
    561         @Override
    562558        public void primitiveChanged(OsmPrimitive prim) {}
    563559        @Override
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java

    r29854 r30532  
    6666        initLocationHints();
    6767
    68         DefaultComboBoxModel regions = new DefaultComboBoxModel(Database.getInstance().regions.toArray());
     68        DefaultComboBoxModel<Region> regions = new DefaultComboBoxModel<>(Database.getInstance().regions.toArray(new Region[0]));
    6969        regionHlIndex = reshuffleListItems(regions, hlRegions);
    7070        oblastComboBox.setModel(regions);
     
    173173    * beginning, return number of moved items.
    174174    */
    175 
    176     private int reshuffleListItems(DefaultComboBoxModel list, final ArrayList<AddressElement> hlList) {
     175    private <E> int reshuffleListItems(DefaultComboBoxModel<E> list, final ArrayList<AddressElement> hlList) {
    177176        int curHlIndex = 0;
    178177
    179178        for (int i = 0; i < list.getSize(); i++)
    180179            for (int j = 0; j < hlList.size(); j++) {
    181                 Object t = list.getElementAt(i);
     180                E t = list.getElementAt(i);
    182181                if (t == hlList.get(j)) {
    183182                    list.removeElementAt(i);
     
    199198
    200199        mainPanel = new javax.swing.JPanel();
    201         oblastComboBox = new javax.swing.JComboBox();
    202         suburbComboBox = new javax.swing.JComboBox();
    203         vitociComboBox = new javax.swing.JComboBox();
     200        oblastComboBox = new javax.swing.JComboBox<>();
     201        suburbComboBox = new javax.swing.JComboBox<>();
     202        vitociComboBox = new javax.swing.JComboBox<>();
    204203        obecLabel = new javax.swing.JLabel();
    205204        castObceLabel = new javax.swing.JLabel();
     
    298297        if (oblast == null) return;
    299298
    300         DefaultComboBoxModel vitocis = new DefaultComboBoxModel(oblast.getViToCis().toArray());
     299        DefaultComboBoxModel<ViToCi> vitocis = new DefaultComboBoxModel<>(oblast.getViToCis().toArray(new ViToCi[0]));
    301300        vitociHlIndex = reshuffleListItems(vitocis, hlViToCis);
    302301        vitociComboBox.setModel(vitocis);
     
    312311
    313312        if (obec.getSuburbs().size() > 0) {
    314             Object[] suburbs = new Object[obec.getSuburbs().size() + 1];
     313            ElementWithStreets[] suburbs = new ElementWithStreets[obec.getSuburbs().size() + 1];
    315314            for (int i=0; i<obec.getSuburbs().size(); i++)
    316315                suburbs[i] = obec.getSuburbs().get(i);
    317316            suburbs[obec.getSuburbs().size()] = obec;
    318             DefaultComboBoxModel suburbsList = new DefaultComboBoxModel(suburbs);
     317            DefaultComboBoxModel<ElementWithStreets> suburbsList = new DefaultComboBoxModel<>(suburbs);
    319318            suburbHlIndex = reshuffleListItems(suburbsList, hlSuburbs);
    320319            suburbComboBox.setModel(suburbsList);
    321320            suburbComboBox.setSelectedItem(suburbsList.getElementAt(0));
    322321        } else
    323             suburbComboBox.setModel(new DefaultComboBoxModel());
     322            suburbComboBox.setModel(new DefaultComboBoxModel<ElementWithStreets>());
    324323
    325324        suburbComboBox.setEnabled(suburbComboBox.getModel().getSize() > 1);
     
    353352    private javax.swing.JPanel mainPanel;
    354353    private javax.swing.JLabel obecLabel;
    355     private javax.swing.JComboBox oblastComboBox;
     354    private javax.swing.JComboBox<Region> oblastComboBox;
    356355    private javax.swing.JLabel oblastLabel;
    357     private javax.swing.JComboBox suburbComboBox;
    358     private javax.swing.JComboBox vitociComboBox;
     356    private javax.swing.JComboBox<ElementWithStreets> suburbComboBox;
     357    private javax.swing.JComboBox<ViToCi> vitociComboBox;
    359358    // End of variables declaration//GEN-END:variables
    360359
     
    362361        @Override
    363362        public Component getListCellRendererComponent(
    364                     JList list, Object value, int index,
     363                    JList<?> list, Object value, int index,
    365364                    boolean isSelected, boolean cellHasFocus) {
    366365
     
    383382    private class SuburbRenderer extends AddressElementRenderer {
    384383        @Override
    385         public Component getListCellRendererComponent(JList list, Object value,
     384        public Component getListCellRendererComponent(JList<?> list, Object value,
    386385                          int index, boolean isSelected, boolean cellHasFocus) {
    387386            Component c = super.getListCellRendererComponent(list, value,
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java

    r29727 r30532  
    197197        changeLocationButton = new javax.swing.JButton();
    198198        jScrollPane1 = new javax.swing.JScrollPane();
    199         proposalList = new javax.swing.JList();
    200         matchesComboBox = new javax.swing.JComboBox();
     199        proposalList = new javax.swing.JList<>();
     200        matchesComboBox = new javax.swing.JComboBox<>();
    201201        jLabel6 = new javax.swing.JLabel();
    202202        statusLabel = new javax.swing.JLabel();
     
    236236        jScrollPane1.setViewportView(proposalList);
    237237
    238         matchesComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "" }));
     238        //matchesComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "" }));
    239239        matchesComboBox.addItemListener(new java.awt.event.ItemListener() {
    240240            public void itemStateChanged(java.awt.event.ItemEvent evt) {
     
    307307    private void proposalListKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_proposalListKeyReleased
    308308        if (evt.getKeyCode() == KeyEvent.VK_DELETE) {
    309             for (Object o : proposalList.getSelectedValues())
     309            for (Object o : proposalList.getSelectedValuesList())
    310310                proposalContainer.removeProposal((Proposal) o);
    311311        }
     
    341341    private javax.swing.JTextField locationEdit;
    342342    private javax.swing.JPanel mainPanel;
    343     private javax.swing.JComboBox matchesComboBox;
    344     private javax.swing.JList proposalList;
     343    private javax.swing.JComboBox<AddressElement> matchesComboBox;
     344    private javax.swing.JList<Proposal> proposalList;
    345345    private javax.swing.JLabel statusLabel;
    346346    // End of variables declaration//GEN-END:variables
     
    349349     * Container for all Houses, which match the given 'alternatenumber'.
    350350     */
    351     private class MatchesComboBoxModel extends HalfCookedComboBoxModel {
     351    private class MatchesComboBoxModel extends HalfCookedComboBoxModel<AddressElement> {
    352352
    353353        private List<AddressElement> matches = null;
     
    379379        }
    380380
    381         public Object getElementAt(int index) {
     381        public AddressElement getElementAt(int index) {
    382382            if (matches == null) return null;
    383383            if (index >= matches.size()) return null;
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/StreetEditor.java

    r29854 r30532  
    3737
    3838        nameField.setText(street.getName());
    39         houseList.setModel(new DefaultComboBoxModel(street.getHouses().toArray()));
     39        houseList.setModel(new DefaultComboBoxModel<>(street.getHouses().toArray(new House[0])));
    4040        houseList.setCellRenderer(new UniversalListRenderer());
    4141
     
    7272        jLabel3 = new javax.swing.JLabel();
    7373        jScrollPane1 = new javax.swing.JScrollPane();
    74         houseList = new javax.swing.JList();
     74        houseList = new javax.swing.JList<>();
    7575        parentEditButton = new javax.swing.JButton();
    7676        houseEditButton = new javax.swing.JButton();
     
    163163        assert selectedHouse != null;
    164164        if (EditorFactory.editHouse(selectedHouse))
    165             houseList.setModel(new DefaultComboBoxModel(street.getHouses().toArray()));
     165            houseList.setModel(new DefaultComboBoxModel<>(street.getHouses().toArray(new House[0])));
    166166    }//GEN-LAST:event_houseEditButtonActionPerformed
    167167
     
    175175    // Variables declaration - do not modify//GEN-BEGIN:variables
    176176    private javax.swing.JButton houseEditButton;
    177     private javax.swing.JList houseList;
     177    private javax.swing.JList<House> houseList;
    178178    private javax.swing.JLabel jLabel1;
    179179    private javax.swing.JLabel jLabel2;
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/SuburbEditor.java

    r29854 r30532  
    3939        parentEditButton.setEnabled(EditorFactory.isEditable(parent));
    4040
    41         houseList.setModel(new DefaultComboBoxModel(suburb.getHouses().toArray()));
     41        houseList.setModel(new DefaultComboBoxModel<>(suburb.getHouses().toArray(new House[0])));
    4242        houseList.setCellRenderer(new UniversalListRenderer());
    4343
     
    4646        houseListChanged(null);
    4747
    48         streetList.setModel(new DefaultComboBoxModel(suburb.getStreets().toArray()));
     48        streetList.setModel(new DefaultComboBoxModel<>(suburb.getStreets().toArray(new Street[0])));
    4949        streetList.setCellRenderer(new UniversalListRenderer());
    5050
     
    8181        jLabel3 = new javax.swing.JLabel();
    8282        jScrollPane1 = new javax.swing.JScrollPane();
    83         houseList = new javax.swing.JList();
     83        houseList = new javax.swing.JList<>();
    8484        parentEditButton = new javax.swing.JButton();
    8585        houseEditButton = new javax.swing.JButton();
    8686        jScrollPane2 = new javax.swing.JScrollPane();
    87         streetList = new javax.swing.JList();
     87        streetList = new javax.swing.JList<>();
    8888        streetEditButton = new javax.swing.JButton();
    8989        jLabel4 = new javax.swing.JLabel();
     
    212212        assert selectedHouse != null;
    213213        if (EditorFactory.editHouse(selectedHouse))
    214             houseList.setModel(new DefaultComboBoxModel(suburb.getHouses().toArray()));
     214            houseList.setModel(new DefaultComboBoxModel<>(suburb.getHouses().toArray(new House[0])));
    215215}//GEN-LAST:event_houseEditButtonActionPerformed
    216216
     
    223223        assert selectedStreet != null;
    224224        if (EditorFactory.editStreet(selectedStreet))
    225             streetList.setModel(new DefaultComboBoxModel(suburb.getStreets().toArray()));
     225            streetList.setModel(new DefaultComboBoxModel<>(suburb.getStreets().toArray(new Street[0])));
    226226    }//GEN-LAST:event_streetEditButtonActionPerformed
    227227
     
    229229    // Variables declaration - do not modify//GEN-BEGIN:variables
    230230    private javax.swing.JButton houseEditButton;
    231     private javax.swing.JList houseList;
     231    private javax.swing.JList<House> houseList;
    232232    private javax.swing.JLabel jLabel1;
    233233    private javax.swing.JLabel jLabel2;
     
    242242    private javax.swing.JTextField parentField;
    243243    private javax.swing.JButton streetEditButton;
    244     private javax.swing.JList streetList;
     244    private javax.swing.JList<Street> streetList;
    245245    // End of variables declaration//GEN-END:variables
    246246
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedComboBoxModel.java

    r15585 r30532  
    1616 * @author Radomír Černoch, radomir.cernoch@gmail.com
    1717 */
    18 public abstract class HalfCookedComboBoxModel implements ComboBoxModel {
     18public abstract class HalfCookedComboBoxModel<E> implements ComboBoxModel<E> {
    1919
    2020    List<ListDataListener> listeners = new ArrayList<ListDataListener>();
    2121
     22    @Override
    2223    public void addListDataListener(ListDataListener l) {
    2324        listeners.add(l);
    2425    }
    2526
     27    @Override
    2628    public void removeListDataListener(ListDataListener l) {
    2729        listeners.remove(l);
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/utils/HalfCookedListModel.java

    r15585 r30532  
    1616 * @author Radomír Černoch, radomir.cernoch@gmail.com
    1717 */
    18 public abstract class HalfCookedListModel implements ListModel {
     18public abstract class HalfCookedListModel<E> implements ListModel<E> {
    1919
    2020    List<ListDataListener> listeners = new ArrayList<ListDataListener>();
    2121
     22    @Override
    2223    public void addListDataListener(ListDataListener l) {
    2324        listeners.add(l);
    2425    }
    2526
     27    @Override
    2628    public void removeListDataListener(ListDataListener l) {
    2729        listeners.remove(l);
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ProposalContainer.java

    r15584 r30532  
    2323 * @see Proposal
    2424 */
    25 public class ProposalContainer implements ListModel, Comparable<ProposalContainer> {
    26 
     25public class ProposalContainer implements ListModel<Proposal>, Comparable<ProposalContainer> {
    2726
    2827    /**
     
    6564     * The list of proposals to be applied to encapsulated primitive.
    6665     */
    67     protected List<Proposal> proposals
    68             = new ArrayList<Proposal>();
     66    protected List<Proposal> proposals = new ArrayList<Proposal>();
    6967
    7068    /**
     
    184182    }
    185183
     184    @Override
    186185    public int getSize() {
    187186        return proposals.size();
    188187    }
    189188
    190     public Object getElementAt(int index) {
     189    @Override
     190    public Proposal getElementAt(int index) {
    191191        return proposals.get(index);
    192192    }
    193193
     194    @Override
    194195    public void addListDataListener(ListDataListener l) {
    195196        listeners.add(l);
    196197    }
    197198
     199    @Override
    198200    public void removeListDataListener(ListDataListener l) {
    199201        listeners.remove(l);
    200202    }
    201203
     204    @Override
    202205    public int compareTo(ProposalContainer o) {
    203206        return PrimUtils.comparator.compare(this.target, o.target);
    204207    }
    205 
    206208}
Note: See TracChangeset for help on using the changeset viewer.