Changeset 8616 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2015-07-24T13:25:37+02:00 (9 years ago)
Author:
bastiK
Message:

applied #11714 - StyledMapRenderer javadoc (patch by michael2402)

Location:
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java

    r8540 r8616  
    8888     * @param p2 Second point of the way segment.
    8989     * @param orderNumber The number of the segment in the way.
     90     * @param clr The color to use for drawing the text.
    9091     */
    9192    protected void drawOrderNumber(Point p1, Point p2, int orderNumber, Color clr) {
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r8614 r8616  
    258258     * (This can be changed with a setting in the advanced preferences.)
    259259     *
     260     * @param font The font to check.
    260261     * @return false by default, but depends on the value of the advanced
    261262     * preference glyph-bug=false|true|auto, where auto is the automatic detection
     
    291292    private Color highlightColorTransparent;
    292293
     294    /**
     295     * Flags used to store the primitive state along with the style. This is the normal style.
     296     * <p>
     297     * Not used in any public interfaces.
     298     */
    293299    private static final int FLAG_NORMAL = 0;
     300    /**
     301     * A primitive with {@link OsmPrimitive#isDisabled()}
     302     */
    294303    private static final int FLAG_DISABLED = 1;
     304    /**
     305     * A primitive with {@link OsmPrimitive#isMemberOfSelected()}
     306     */
    295307    private static final int FLAG_MEMBER_OF_SELECTED = 2;
     308    /**
     309     * A primitive with {@link OsmPrimitive#isSelected()}
     310     */
    296311    private static final int FLAG_SELECTED = 4;
     312    /**
     313     * A primitive with {@link OsmPrimitive#isOuterMemberOfSelected()}
     314     */
    297315    private static final int FLAG_OUTERMEMBER_OF_SELECTED = 8;
    298316
     
    537555    }
    538556
     557    /**
     558     * Draws a multipolygon area.
     559     * @param r The multipolygon relation
     560     * @param color The color to fill the area with.
     561     * @param fillImage The image to fill the area with. Overrides color.
     562     * @param disabled If this should be drawn with a special disabled style.
     563     * @param text The text to write on the area.
     564     */
    539565    public void drawArea(Relation r, Color color, MapImage fillImage, boolean disabled, TextElement text) {
    540566        Multipolygon multipolygon = MultipolygonCache.getInstance().get(nc, r);
     
    552578    }
    553579
     580    /**
     581     * Draws an area defined by a way. They way does not need to be closed, but it should.
     582     * @param w The way.
     583     * @param color The color to fill the area with.
     584     * @param fillImage The image to fill the area with. Overrides color.
     585     * @param disabled If this should be drawn with a special disabled style.
     586     * @param text The text to write on the area.
     587     */
    554588    public void drawArea(Way w, Color color, MapImage fillImage, boolean disabled, TextElement text) {
    555589        drawArea(w, getPath(w), color, fillImage, disabled, text);
     
    619653     * @param way the way
    620654     * @param pattern the image
     655     * @param disabled If this should be drawn with a special disabled style.
    621656     * @param offset offset from the way
    622657     * @param spacing spacing between two images
     
    847882     * Draw a number of the order of the two consecutive nodes within the
    848883     * parents way
     884     *
     885     * @param n1 First node of the way segment.
     886     * @param n2 Second node of the way segment.
     887     * @param orderNumber The number of the segment in the way.
     888     * @param clr The color to use for drawing the text.
    849889     */
    850890    public void drawOrderNumber(Node n1, Node n2, int orderNumber, Color clr) {
    851891        Point p1 = nc.getPoint(n1);
    852892        Point p2 = nc.getPoint(n2);
    853         StyledMapRenderer.this.drawOrderNumber(p1, p2, orderNumber, clr);
     893        drawOrderNumber(p1, p2, orderNumber, clr);
    854894    }
    855895
     
    10681108    }
    10691109
     1110    /**
     1111     * Draws a text along a given way.
     1112     * @param way The way to draw the text on.
     1113     * @param text The text definition (font/.../text content) to draw.
     1114     */
    10701115    public void drawTextOnPath(Way way, TextElement text) {
    10711116        if (way == null || text == null)
     
    12371282
    12381283    /**
    1239      * draw way
     1284     * draw way. This method allows for two draw styles (line using color, dashes using dashedColor) to be passed.
     1285     * @param way The way to draw
     1286     * @param color The base color to draw the way in
     1287     * @param line The line style to use. This is drawn using color.
     1288     * @param dashes The dash style to use. This is drawn using dashedColor. <code>null</code> if unused.
     1289     * @param dashedColor The color of the dashes.
     1290     * @param offset
    12401291     * @param showOrientation show arrows that indicate the technical orientation of
    12411292     *              the way (defined by order of nodes)
     1293     * @param showHeadArrowOnly True if only the arrow at the end of the line but not those on the segments should be displayed.
    12421294     * @param showOneway show symbols that indicate the direction of the feature,
    12431295     *              e.g. oneway street or waterway
     
    13671419    }
    13681420
     1421    /**
     1422     * Gets the "circum". This is the distance on the map in meters that 100 screen pixels represent.
     1423     * @return The "circum"
     1424     */
    13691425    public double getCircum() {
    13701426        return circum;
Note: See TracChangeset for help on using the changeset viewer.