Ignore:
Timestamp:
2018-03-25T18:53:04+02:00 (21 months ago)
Author:
Don-vip
Message:

introduce PrimitiveRenderer to replace OsmPrimitivRenderer (now deprecated). Change NameFormatter API to support IPrimitive instead of OsmPrimitive. Enhances interfaces in consequence.

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/PurgeAction.java

    r13434 r13564  
    3030import org.openstreetmap.josm.command.PurgeCommand;
    3131import org.openstreetmap.josm.data.osm.DataSet;
     32import org.openstreetmap.josm.data.osm.IPrimitive;
    3233import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3334import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
    3435import org.openstreetmap.josm.gui.MainApplication;
    35 import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
     36import org.openstreetmap.josm.gui.PrimitiveRenderer;
    3637import org.openstreetmap.josm.gui.help.HelpUtil;
    3738import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    7677
    7778    /** force selection to be active for all entries */
    78     static class SelectionForcedOsmPrimitivRenderer extends OsmPrimitivRenderer {
     79    static class SelectionForcedPrimitiveRenderer extends PrimitiveRenderer {
    7980        @Override
    80         public Component getListCellRendererComponent(JList<? extends OsmPrimitive> list,
    81                 OsmPrimitive value, int index, boolean isSelected, boolean cellHasFocus) {
     81        public Component getListCellRendererComponent(JList<? extends IPrimitive> list,
     82                IPrimitive value, int index, boolean isSelected, boolean cellHasFocus) {
    8283            return super.getListCellRendererComponent(list, value, index, true, false);
    8384        }
     
    151152            JList<OsmPrimitive> list = new JList<>(toPurgeAdditionally.toArray(new OsmPrimitive[0]));
    152153            /* force selection to be active for all entries */
    153             list.setCellRenderer(new SelectionForcedOsmPrimitivRenderer());
     154            list.setCellRenderer(new SelectionForcedPrimitiveRenderer());
    154155            JScrollPane scroll = new JScrollPane(list);
    155156            scroll.setPreferredSize(new Dimension(250, 300));
  • trunk/src/org/openstreetmap/josm/actions/upload/RelationUploadOrderHook.java

    r12678 r13564  
    2121import org.openstreetmap.josm.data.osm.Relation;
    2222import org.openstreetmap.josm.gui.ExtendedDialog;
    23 import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
     23import org.openstreetmap.josm.gui.PrimitiveRenderer;
    2424import org.openstreetmap.josm.gui.util.WindowGeometry;
    2525
     
    5555        }
    5656        JTable tbl = new JTable(model);
    57         OsmPrimitivRenderer renderer = new OsmPrimitivRenderer();
     57        PrimitiveRenderer renderer = new PrimitiveRenderer();
    5858        tbl.getColumnModel().getColumn(0).setCellRenderer(renderer);
    5959        tbl.getColumnModel().getColumn(1).setCellRenderer(renderer);
Note: See TracChangeset for help on using the changeset viewer.