Ignore:
Timestamp:
2018-04-23T02:05:41+02:00 (19 months ago)
Author:
Don-vip
Message:

use of IPrimitive interface

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java

    r13368 r13662  
    77import java.util.Objects;
    88
    9 import org.openstreetmap.josm.data.osm.OsmPrimitive;
     9import org.openstreetmap.josm.data.osm.IPrimitive;
    1010import org.openstreetmap.josm.data.osm.Relation;
    1111import org.openstreetmap.josm.data.osm.Way;
     
    120120
    121121    @Override
    122     public void paintPrimitive(OsmPrimitive osm, MapPaintSettings paintSettings, StyledMapRenderer painter,
     122    public void paintPrimitive(IPrimitive osm, MapPaintSettings paintSettings, StyledMapRenderer painter,
    123123            boolean selected, boolean outermember, boolean member) {
    124124        Color myColor = color;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaIconElement.java

    r12756 r13662  
    44import java.util.Objects;
    55
    6 import org.openstreetmap.josm.data.osm.OsmPrimitive;
     6import org.openstreetmap.josm.data.osm.IPrimitive;
    77import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
    88import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer;
     
    4343
    4444    @Override
    45     public void paintPrimitive(OsmPrimitive osm, MapPaintSettings paintSettings, StyledMapRenderer painter,
     45    public void paintPrimitive(IPrimitive osm, MapPaintSettings paintSettings, StyledMapRenderer painter,
    4646            boolean selected, boolean outermember, boolean member) {
    4747        if (painter.isShowIcons()) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/BoxTextElement.java

    r12476 r13662  
    77import java.util.Objects;
    88
     9import org.openstreetmap.josm.data.osm.IPrimitive;
    910import org.openstreetmap.josm.data.osm.Node;
    10 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1111import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
    1212import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
     
    282282
    283283    @Override
    284     public void paintPrimitive(OsmPrimitive osm, MapPaintSettings settings, StyledMapRenderer painter,
     284    public void paintPrimitive(IPrimitive osm, MapPaintSettings settings, StyledMapRenderer painter,
    285285            boolean selected, boolean outermember, boolean member) {
    286286        if (osm instanceof Node) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java

    r13013 r13662  
    88import java.util.Optional;
    99
     10import org.openstreetmap.josm.data.osm.IPrimitive;
    1011import org.openstreetmap.josm.data.osm.Node;
    11 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1212import org.openstreetmap.josm.data.osm.Way;
    1313import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
     
    110110
    111111    @Override
    112     public void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
     112    public void paintPrimitive(IPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
    113113            boolean selected, boolean outermember, boolean member) {
    114114        /* show direction arrows, if draw.segment.relevant_directions_only is not set,
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java

    r12846 r13662  
    1010import java.util.stream.IntStream;
    1111
     12import org.openstreetmap.josm.data.osm.IPrimitive;
    1213import org.openstreetmap.josm.data.osm.Node;
    13 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1414import org.openstreetmap.josm.data.osm.Relation;
    1515import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
     
    267267
    268268    @Override
    269     public void paintPrimitive(OsmPrimitive primitive, MapPaintSettings settings, StyledMapRenderer painter,
     269    public void paintPrimitive(IPrimitive primitive, MapPaintSettings settings, StyledMapRenderer painter,
    270270            boolean selected, boolean outermember, boolean member) {
    271271        if (primitive instanceof Node) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/RepeatImageElement.java

    r12303 r13662  
    44import java.util.Objects;
    55
    6 import org.openstreetmap.josm.data.osm.OsmPrimitive;
     6import org.openstreetmap.josm.data.osm.IPrimitive;
    77import org.openstreetmap.josm.data.osm.Way;
    88import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
     
    120120
    121121    @Override
    122     public void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
     122    public void paintPrimitive(IPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
    123123            boolean selected, boolean outermember, boolean member) {
    124124        if (primitive instanceof Way) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/StyleElement.java

    r12846 r13662  
    77import java.util.Objects;
    88
     9import org.openstreetmap.josm.data.osm.IPrimitive;
    910import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1011import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
     
    8889     * @param outermember true, if primitive is not selected and outer member of a selected multipolygon relation
    8990     * @param member true, if primitive is not selected and member of a selected relation
    90      */
    91     public abstract void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
     91     * @since 13662 (signature)
     92     */
     93    public abstract void paintPrimitive(IPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
    9294            boolean selected, boolean outermember, boolean member);
    9395
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/TextElement.java

    r12476 r13662  
    44import java.util.Objects;
    55
    6 import org.openstreetmap.josm.data.osm.OsmPrimitive;
     6import org.openstreetmap.josm.data.osm.IPrimitive;
    77import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
    88import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
     
    8888
    8989    @Override
    90     public void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
     90    public void paintPrimitive(IPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
    9191            boolean selected, boolean outermember, boolean member) {
    9292        painter.drawText(primitive, text, getLabelPositionStrategy());
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/TextLabel.java

    r12476 r13662  
    77import java.util.Objects;
    88
     9import org.openstreetmap.josm.data.osm.IPrimitive;
    910import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1011import org.openstreetmap.josm.gui.mappaint.Cascade;
     
    184185     * derived for {@code osm}
    185186     */
    186     public String getString(OsmPrimitive osm) {
     187    public String getString(IPrimitive osm) {
    187188        if (labelCompositionStrategy == null) return null;
    188189        return labelCompositionStrategy.compose(osm);
Note: See TracChangeset for help on using the changeset viewer.