Ignore:
Timestamp:
2017-03-05T00:23:56+01:00 (7 years ago)
Author:
michael2402
Message:

Add Javadoc to icon drawing functions. Fix AreaElement#equals/hashCode.

File:
1 edited

Legend:

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

    r11670 r11674  
    3333 */
    3434public class NodeElement extends StyleElement {
     35    /**
     36     * The image that is used to display this node. May be <code>null</code>
     37     */
    3538    public final MapImage mapImage;
     39    /**
     40     * The angle that is used to rotate {@link #mapImage}. May be <code>null</code> to indicate no rotation.
     41     */
    3642    public final RotationAngle mapImageAngle;
    3743    /**
     
    6369    }
    6470
     71    /**
     72     * Creates a new node element for the given Environment
     73     * @param env The environment
     74     * @return The node element style or <code>null</code> if the node should not be painted.
     75     */
    6576    public static NodeElement create(Environment env) {
    6677        return create(env, 4f, false);
     
    90101     * @param env The environment
    91102     * @return The angle
     103     * @since 11670
    92104     */
    93105    public static RotationAngle createRotationAngle(Environment env) {
     
    115127    }
    116128
     129    /**
     130     * Create a map icon for the environment using the default keys.
     131     * @param env The environment to read the icon form
     132     * @return The icon or <code>null</code> if no icon is defined
     133     * @since 11670
     134     */
    117135    public static MapImage createIcon(final Environment env) {
    118136        return createIcon(env, ICON_KEYS);
    119137    }
    120138
     139    /**
     140     * Create a map icon for the environment.
     141     * @param env The environment to read the icon form
     142     * @param keys The keys, indexed by the ICON_..._IDX constants.
     143     * @return The icon or <code>null</code> if no icon is defined
     144     */
    121145    public static MapImage createIcon(final Environment env, final String ... keys) {
    122146        CheckParameterUtil.ensureParameterNotNull(env, "env");
     
    168192    }
    169193
     194    /**
     195     * Create a symbol for the environment
     196     * @param env The environment to read the icon form
     197     * @return The symbol.
     198     */
    170199    private static Symbol createSymbol(Environment env) {
    171200        Cascade c = env.mc.getCascade(env.layer);
     
    303332    }
    304333
     334    /**
     335     * Gets the selection box for this element.
     336     * @return The selection box as {@link BoxProvider} object.
     337     */
    305338    public BoxProvider getBoxProvider() {
    306339        if (mapImage != null)
Note: See TracChangeset for help on using the changeset viewer.