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


Ignore:
Timestamp:
2015-10-29T18:56:35+01:00 (9 years ago)
Author:
Don-vip
Message:

update javadoc

File:
1 edited

Legend:

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

    r8325 r8968  
    88import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
    99
     10/**
     11 * Global mappaint settings.
     12 * @since 2675
     13 */
    1014public final class MapPaintSettings implements PreferenceChangedListener {
    1115
     16    /** The unique instance **/
    1217    public static final MapPaintSettings INSTANCE = new MapPaintSettings();
    1318
     
    1722    /** Preference: should arrows for oneways be displayed */
    1823    private boolean showOnewayArrow;
     24    /** Preference: default width for ways segments */
    1925    private int defaultSegmentWidth;
    2026    /** Preference: should the segment numbers of ways be displayed */
     
    4147    /** Preference: should multiply connected nodes be filled */
    4248    private boolean fillConnectionNode;
     49    /** Preference: should only the data area outline be drawn */
    4350    private boolean outlineOnly;
    4451    /** Color Preference for selected objects */
     
    8289        }
    8390
    84 
    8591        showOrderNumber = Main.pref.getBoolean("draw.segment.order_number", false);
    8692        showHeadArrowOnly = Main.pref.getBoolean("draw.segment.head_only", false);
     
    100106
    101107        outlineOnly = Main.pref.getBoolean("draw.data.area_outline_only", false);
    102 
    103108    }
    104109
     
    108113    }
    109114
     115    /**
     116     * Determines if the real width of ways should be used
     117     * @return {@code true} if the real width of ways should be used
     118     */
    110119    public boolean isUseRealWidth() {
    111120        return useRealWidth;
    112121    }
    113122
     123    /**
     124     * Determines if directional arrows should be displayed
     125     * @return {@code true} if directional arrows should be displayed
     126     */
    114127    public boolean isShowDirectionArrow() {
    115128        return showDirectionArrow;
    116129    }
    117130
     131    /**
     132     * Determines if arrows for oneways should be displayed
     133     * @return {@code true} if arrows for oneways should be displayed
     134     */
    118135    public boolean isShowOnewayArrow() {
    119136        return showOnewayArrow;
    120137    }
    121138
     139    /**
     140     * Returns color for selected objects (nodes and ways)
     141     * @return color for selected objects
     142     */
    122143    public Color getSelectedColor() {
    123144        return selectedColor;
    124145    }
    125146
     147    /**
     148     * Returns color for selected objects (nodes and ways) with a given alpha
     149     * @param alpha alpha component in the range 0-255
     150     * @return color for selected objects
     151     */
     152    public Color getSelectedColor(int alpha) {
     153        return new Color(selectedColor.getRGB() & 0x00ffffff | (alpha << 24), true);
     154    }
     155
     156    /**
     157     * Returns default width for ways segments
     158     * @return default width for ways segments
     159     */
    126160    public int getDefaultSegmentWidth() {
    127161        return defaultSegmentWidth;
    128162    }
    129163
    130     public Color getSelectedColor(int alpha) {
    131         return new Color(selectedColor.getRGB() & 0x00ffffff | (alpha << 24), true);
    132     }
    133 
     164    /**
     165     * Returns color for selected relations
     166     * @return color for selected relations
     167     */
    134168    public Color getRelationSelectedColor() {
    135169        return relationSelectedColor;
    136170    }
    137171
     172    /**
     173     * Returns color for selected relations with a given alpha
     174     * @param alpha alpha component in the range 0-255
     175     * @return color for selected relations
     176     */
    138177    public Color getRelationSelectedColor(int alpha) {
    139178        return new Color(relationSelectedColor.getRGB() & 0x00ffffff | (alpha << 24), true);
    140179    }
    141180
     181    /**
     182     * Returns color for hightlighted objects
     183     * @return color for hightlighted objects
     184     */
    142185    public Color getHighlightColor() {
    143186        return highlightColor;
    144187    }
    145188
     189    /**
     190     * Returns color for inactive objects
     191     * @return color for inactive objects
     192     */
    146193    public Color getInactiveColor() {
    147194        return inactiveColor;
    148195    }
    149196
     197    /**
     198     * Returns color for nodes
     199     * @return color for nodes
     200     */
    150201    public Color getNodeColor() {
    151202        return nodeColor;
    152203    }
    153204
     205    /**
     206     * Returns color for tagged nodes
     207     * @return color for tagged nodes
     208     */
    154209    public Color getTaggedColor() {
    155210        return taggedColor;
    156211    }
    157212
     213    /**
     214     * Returns color for multiply connected nodes
     215     * @return color for multiply connected nodes
     216     */
    158217    public Color getConnectionColor() {
    159218        return connectionColor;
    160219    }
    161220
     221    /**
     222     * Returns color for tagged and multiply connected nodes
     223     * @return color for tagged and multiply connected nodes
     224     */
    162225    public Color getTaggedConnectionColor() {
    163226        return taggedConnectionColor;
    164227    }
    165228
     229    /**
     230     * Determines if the segment numbers of ways should be displayed
     231     * @return {@code true} if the segment numbers of ways should be displayed
     232     */
    166233    public boolean isShowOrderNumber() {
    167234        return showOrderNumber;
    168235    }
    169236
     237    /**
     238     * Specifies if only the last arrow of a way should be displayed
     239     * @param showHeadArrowOnly {@code true} if only the last arrow of a way should be displayed
     240     */
    170241    public void setShowHeadArrowOnly(boolean showHeadArrowOnly) {
    171242        this.showHeadArrowOnly = showHeadArrowOnly;
    172243    }
    173244
     245    /**
     246     * Determines if only the last arrow of a way should be displayed
     247     * @return {@code true} if only the last arrow of a way should be displayed
     248     */
    174249    public boolean isShowHeadArrowOnly() {
    175250        return showHeadArrowOnly;
    176251    }
    177252
     253    /**
     254     * Returns the distance at which names should be drawn
     255     * @return the distance at which names should be drawn
     256     */
    178257    public int getShowNamesDistance() {
    179258        return showNamesDistance;
    180259    }
    181260
     261    /**
     262     * Returns the distance at which strokes should be used
     263     * @return the distance at which strokes should be used
     264     */
    182265    public int getUseStrokesDistance() {
    183266        return useStrokesDistance;
    184267    }
    185268
     269    /**
     270     * Returns the distance at which icons should be drawn
     271     * @return the distance at which icons should be drawn
     272     */
    186273    public int getShowIconsDistance() {
    187274        return showIconsDistance;
    188275    }
    189276
     277    /**
     278     * Returns the size of selected nodes
     279     * @return the size of selected nodes
     280     */
    190281    public int getSelectedNodeSize() {
    191282        return selectedNodeSize;
    192283    }
    193284
     285    /**
     286     * Returns the size of multiply connected nodes
     287     * @return the size of multiply connected nodes
     288     */
    194289    public int getConnectionNodeSize() {
    195290        return connectionNodeSize;
    196291    }
    197292
     293    /**
     294     * Returns the size of unselected nodes
     295     * @return the size of unselected nodes
     296     */
    198297    public int getUnselectedNodeSize() {
    199298        return unselectedNodeSize;
    200299    }
    201300
     301    /**
     302     * Returns the size of tagged nodes
     303     * @return the size of tagged nodes
     304     */
    202305    public int getTaggedNodeSize() {
    203306        return taggedNodeSize;
    204307    }
    205308
     309    /**
     310     * Determines if selected nodes should be filled
     311     * @return {@code true} if selected nodes should be filled
     312     */
    206313    public boolean isFillSelectedNode() {
    207314        return fillSelectedNode;
    208315    }
    209316
     317    /**
     318     * Determines if unselected nodes should be filled
     319     * @return {@code true} if unselected nodes should be filled
     320     */
    210321    public boolean isFillUnselectedNode() {
    211322        return fillUnselectedNode;
    212323    }
    213324
     325    /**
     326     * Determines if multiply connected nodes should be filled
     327     * @return {@code true} if multiply connected nodes should be filled
     328     */
    214329    public boolean isFillConnectionNode() {
    215330        return fillConnectionNode;
    216331    }
    217332
     333    /**
     334     * Determines if tagged nodes should be filled
     335     * @return {@code true} if tagged nodes should be filled
     336     */
    218337    public boolean isFillTaggedNode() {
    219338        return fillTaggedNode;
    220339    }
    221340
     341    /**
     342     * Determines if only the data area outline should be drawn
     343     * @return {@code true} if only the data area outline should be drawn
     344     */
    222345    public boolean isOutlineOnly() {
    223346        return outlineOnly;
Note: See TracChangeset for help on using the changeset viewer.