Ignore:
Timestamp:
2016-01-03T15:50:53+01:00 (10 years ago)
Author:
bastiK
Message:

move ElemStyle classes to new package, rename to (Style)Element

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement
Files:
1 added
1 moved

Legend:

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

    r9275 r9278  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.gui.mappaint;
     2package org.openstreetmap.josm.gui.mappaint.styleelement;
    33
    44import java.awt.Color;
     
    1212import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
    1313import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer;
     14import org.openstreetmap.josm.gui.mappaint.Cascade;
     15import org.openstreetmap.josm.gui.mappaint.Environment;
     16import org.openstreetmap.josm.gui.mappaint.Keyword;
    1417import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference;
    1518import org.openstreetmap.josm.tools.CheckParameterUtil;
    1619import org.openstreetmap.josm.tools.Utils;
    1720
    18 public class AreaElemStyle extends ElemStyle {
     21public class AreaElement extends StyleElement {
    1922
    2023    /**
     
    2427    public Color color;
    2528    public MapImage fillImage;
    26     public TextElement text;
     29    public TextLabel text;
    2730    public Float extent;
    2831    public Float extentThreshold;
    2932
    30     protected AreaElemStyle(Cascade c, Color color, MapImage fillImage, Float extent, Float extentThreshold, TextElement text) {
     33    protected AreaElement(Cascade c, Color color, MapImage fillImage, Float extent, Float extentThreshold, TextLabel text) {
    3134        super(c, 1f);
    3235        CheckParameterUtil.ensureParameterNotNull(color);
     
    3841    }
    3942
    40     public static AreaElemStyle create(final Environment env) {
     43    public static AreaElement create(final Environment env) {
    4144        final Cascade c = env.mc.getCascade(env.layer);
    4245        MapImage fillImage = null;
     
    7679        }
    7780
    78         TextElement text = null;
     81        TextLabel text = null;
    7982        Keyword textPos = c.get(TEXT_POSITION, null, Keyword.class);
    8083        if (textPos == null || "center".equals(textPos.val)) {
    81             text = TextElement.create(env, PaintColors.AREA_TEXT.get(), true);
     84            text = TextLabel.create(env, PaintColors.AREA_TEXT.get(), true);
    8285        }
    8386
     
    8689
    8790        if (color != null)
    88             return new AreaElemStyle(c, color, fillImage, extent, extentThreshold, text);
     91            return new AreaElement(c, color, fillImage, extent, extentThreshold, text);
    8992        else
    9093            return null;
     
    118121        if (!super.equals(obj))
    119122            return false;
    120         AreaElemStyle other = (AreaElemStyle) obj;
     123        AreaElement other = (AreaElement) obj;
    121124        // we should get the same image object due to caching
    122125        if (!Objects.equals(fillImage, other.fillImage))
Note: See TracChangeset for help on using the changeset viewer.