Class MapPaintSettings
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings
-
- All Implemented Interfaces:
PreferenceChangedListener
public final class MapPaintSettings extends java.lang.Object implements PreferenceChangedListener
Global mappaint settings.- Since:
- 2675
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.ColorconnectionColorColor Preference for multiply connected nodesprivate intconnectionNodeSizePreference: size of multiply connected nodesprivate intdefaultSegmentWidthPreference: default width for ways segmentsprivate booleanfillConnectionNodePreference: should multiply connected nodes be filledprivate booleanfillSelectedNodePreference: should selected nodes be filledprivate booleanfillTaggedNodePreference: should tagged nodes be filledprivate booleanfillUnselectedNodePreference: should unselected nodes be filledprivate java.awt.ColorhighlightColorColor Preference for highlighted objectsprivate java.awt.ColorinactiveColorColor Preference for inactive objectsstatic MapPaintSettingsINSTANCEThe unique instanceprivate java.awt.ColornodeColorColor Preference for nodesprivate booleanoutlineOnlyPreference: should only the data area outline be drawnprivate java.awt.ColorrelationSelectedColorprivate java.awt.ColorselectedColorColor Preference for selected objectsprivate intselectedNodeSizePreference: size of selected nodesprivate booleanshowDirectionArrowPreference: should directional arrows be displayedprivate booleanshowHeadArrowOnlyPreference: should only the last arrow of a way be displayedprivate intshowIconsDistanceprivate intshowNamesDistanceprivate booleanshowOnewayArrowPreference: should arrows for oneways be displayedprivate booleanshowOrderNumberPreference: should the segment numbers of ways be displayedprivate booleanshowOrderNumberOnSelectedWayPreference: should the segment numbers of ways be displayed on selected wayprivate java.awt.ColortaggedColorColor Preference for tagged nodesprivate java.awt.ColortaggedConnectionColorColor Preference for tagged and multiply connected nodesprivate inttaggedNodeSizePreference: size of tagged nodesprivate intunselectedNodeSizePreference: size of unselected nodesprivate booleanuseRealWidthprivate intuseStrokesDistance
-
Constructor Summary
Constructors Modifier Constructor Description privateMapPaintSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ColorgetConnectionColor()Returns color for multiply connected nodesintgetConnectionNodeSize()Returns the size of multiply connected nodesintgetDefaultSegmentWidth()Returns default width for ways segmentsjava.awt.ColorgetHighlightColor()Returns color for hightlighted objectsjava.awt.ColorgetInactiveColor()Returns color for inactive objectsjava.awt.ColorgetNodeColor()Returns color for nodesjava.awt.ColorgetRelationSelectedColor()Returns color for selected relationsjava.awt.ColorgetRelationSelectedColor(int alpha)Returns color for selected relations with a given alphajava.awt.ColorgetSelectedColor()Returns color for selected objects (nodes and ways)java.awt.ColorgetSelectedColor(int alpha)Returns color for selected objects (nodes and ways) with a given alphaintgetSelectedNodeSize()Returns the size of selected nodesintgetShowIconsDistance()Returns the distance at which icons should be drawnintgetShowNamesDistance()Returns the distance at which names should be drawnjava.awt.ColorgetTaggedColor()Returns color for tagged nodesjava.awt.ColorgetTaggedConnectionColor()Returns color for tagged and multiply connected nodesintgetTaggedNodeSize()Returns the size of tagged nodesintgetUnselectedNodeSize()Returns the size of unselected nodesintgetUseStrokesDistance()Returns the distance at which strokes should be usedbooleanisFillConnectionNode()Determines if multiply connected nodes should be filledbooleanisFillSelectedNode()Determines if selected nodes should be filledbooleanisFillTaggedNode()Determines if tagged nodes should be filledbooleanisFillUnselectedNode()Determines if unselected nodes should be filledbooleanisOutlineOnly()Determines if only the data area outline should be drawnbooleanisShowDirectionArrow()Determines if directional arrows should be displayedbooleanisShowHeadArrowOnly()Determines if only the last arrow of a way should be displayedbooleanisShowOnewayArrow()Determines if arrows for oneways should be displayedbooleanisShowOrderNumber()Determines if the segment numbers of ways should be displayedbooleanisShowOrderNumberOnSelectedWay()Determines if the segment numbers of the selected way should be displayedbooleanisUseRealWidth()Determines if the real width of ways should be usedprivate voidload()voidpreferenceChanged(PreferenceChangeEvent e)Triggered when a preference entry value changes.voidsetShowHeadArrowOnly(boolean showHeadArrowOnly)Specifies if only the last arrow of a way should be displayedjava.lang.StringtoString()
-
-
-
Field Detail
-
INSTANCE
public static final MapPaintSettings INSTANCE
The unique instance
-
useRealWidth
private boolean useRealWidth
-
showDirectionArrow
private boolean showDirectionArrow
Preference: should directional arrows be displayed
-
showOnewayArrow
private boolean showOnewayArrow
Preference: should arrows for oneways be displayed
-
defaultSegmentWidth
private int defaultSegmentWidth
Preference: default width for ways segments
-
showOrderNumber
private boolean showOrderNumber
Preference: should the segment numbers of ways be displayed
-
showOrderNumberOnSelectedWay
private boolean showOrderNumberOnSelectedWay
Preference: should the segment numbers of ways be displayed on selected way
-
showHeadArrowOnly
private boolean showHeadArrowOnly
Preference: should only the last arrow of a way be displayed
-
showNamesDistance
private int showNamesDistance
-
useStrokesDistance
private int useStrokesDistance
-
showIconsDistance
private int showIconsDistance
-
selectedNodeSize
private int selectedNodeSize
Preference: size of selected nodes
-
connectionNodeSize
private int connectionNodeSize
Preference: size of multiply connected nodes
-
unselectedNodeSize
private int unselectedNodeSize
Preference: size of unselected nodes
-
taggedNodeSize
private int taggedNodeSize
Preference: size of tagged nodes
-
fillSelectedNode
private boolean fillSelectedNode
Preference: should selected nodes be filled
-
fillUnselectedNode
private boolean fillUnselectedNode
Preference: should unselected nodes be filled
-
fillTaggedNode
private boolean fillTaggedNode
Preference: should tagged nodes be filled
-
fillConnectionNode
private boolean fillConnectionNode
Preference: should multiply connected nodes be filled
-
outlineOnly
private boolean outlineOnly
Preference: should only the data area outline be drawn
-
selectedColor
private java.awt.Color selectedColor
Color Preference for selected objects
-
relationSelectedColor
private java.awt.Color relationSelectedColor
-
highlightColor
private java.awt.Color highlightColor
Color Preference for highlighted objects
-
inactiveColor
private java.awt.Color inactiveColor
Color Preference for inactive objects
-
nodeColor
private java.awt.Color nodeColor
Color Preference for nodes
-
taggedColor
private java.awt.Color taggedColor
Color Preference for tagged nodes
-
connectionColor
private java.awt.Color connectionColor
Color Preference for multiply connected nodes
-
taggedConnectionColor
private java.awt.Color taggedConnectionColor
Color Preference for tagged and multiply connected nodes
-
-
Constructor Detail
-
MapPaintSettings
private MapPaintSettings()
-
-
Method Detail
-
load
private void load()
-
preferenceChanged
public void preferenceChanged(PreferenceChangeEvent e)
Description copied from interface:PreferenceChangedListenerTriggered when a preference entry value changes.- Specified by:
preferenceChangedin interfacePreferenceChangedListener- Parameters:
e- the preference change event
-
isUseRealWidth
public boolean isUseRealWidth()
Determines if the real width of ways should be used- Returns:
trueif the real width of ways should be used
-
isShowDirectionArrow
public boolean isShowDirectionArrow()
Determines if directional arrows should be displayed- Returns:
trueif directional arrows should be displayed
-
isShowOnewayArrow
public boolean isShowOnewayArrow()
Determines if arrows for oneways should be displayed- Returns:
trueif arrows for oneways should be displayed
-
getSelectedColor
public java.awt.Color getSelectedColor()
Returns color for selected objects (nodes and ways)- Returns:
- color for selected objects
-
getSelectedColor
public java.awt.Color getSelectedColor(int alpha)
Returns color for selected objects (nodes and ways) with a given alpha- Parameters:
alpha- alpha component in the range 0-255- Returns:
- color for selected objects
-
getDefaultSegmentWidth
public int getDefaultSegmentWidth()
Returns default width for ways segments- Returns:
- default width for ways segments
-
getRelationSelectedColor
public java.awt.Color getRelationSelectedColor()
Returns color for selected relations- Returns:
- color for selected relations
-
getRelationSelectedColor
public java.awt.Color getRelationSelectedColor(int alpha)
Returns color for selected relations with a given alpha- Parameters:
alpha- alpha component in the range 0-255- Returns:
- color for selected relations
-
getHighlightColor
public java.awt.Color getHighlightColor()
Returns color for hightlighted objects- Returns:
- color for hightlighted objects
-
getInactiveColor
public java.awt.Color getInactiveColor()
Returns color for inactive objects- Returns:
- color for inactive objects
-
getNodeColor
public java.awt.Color getNodeColor()
Returns color for nodes- Returns:
- color for nodes
-
getTaggedColor
public java.awt.Color getTaggedColor()
Returns color for tagged nodes- Returns:
- color for tagged nodes
-
getConnectionColor
public java.awt.Color getConnectionColor()
Returns color for multiply connected nodes- Returns:
- color for multiply connected nodes
-
getTaggedConnectionColor
public java.awt.Color getTaggedConnectionColor()
Returns color for tagged and multiply connected nodes- Returns:
- color for tagged and multiply connected nodes
-
isShowOrderNumber
public boolean isShowOrderNumber()
Determines if the segment numbers of ways should be displayed- Returns:
trueif the segment numbers of ways should be displayed
-
isShowOrderNumberOnSelectedWay
public boolean isShowOrderNumberOnSelectedWay()
Determines if the segment numbers of the selected way should be displayed- Returns:
trueif the segment numbers of the selected way should be displayed
-
setShowHeadArrowOnly
public void setShowHeadArrowOnly(boolean showHeadArrowOnly)
Specifies if only the last arrow of a way should be displayed- Parameters:
showHeadArrowOnly-trueif only the last arrow of a way should be displayed
-
isShowHeadArrowOnly
public boolean isShowHeadArrowOnly()
Determines if only the last arrow of a way should be displayed- Returns:
trueif only the last arrow of a way should be displayed
-
getShowNamesDistance
public int getShowNamesDistance()
Returns the distance at which names should be drawn- Returns:
- the distance at which names should be drawn
-
getUseStrokesDistance
public int getUseStrokesDistance()
Returns the distance at which strokes should be used- Returns:
- the distance at which strokes should be used
-
getShowIconsDistance
public int getShowIconsDistance()
Returns the distance at which icons should be drawn- Returns:
- the distance at which icons should be drawn
-
getSelectedNodeSize
public int getSelectedNodeSize()
Returns the size of selected nodes- Returns:
- the size of selected nodes
-
getConnectionNodeSize
public int getConnectionNodeSize()
Returns the size of multiply connected nodes- Returns:
- the size of multiply connected nodes
-
getUnselectedNodeSize
public int getUnselectedNodeSize()
Returns the size of unselected nodes- Returns:
- the size of unselected nodes
-
getTaggedNodeSize
public int getTaggedNodeSize()
Returns the size of tagged nodes- Returns:
- the size of tagged nodes
-
isFillSelectedNode
public boolean isFillSelectedNode()
Determines if selected nodes should be filled- Returns:
trueif selected nodes should be filled
-
isFillUnselectedNode
public boolean isFillUnselectedNode()
Determines if unselected nodes should be filled- Returns:
trueif unselected nodes should be filled
-
isFillConnectionNode
public boolean isFillConnectionNode()
Determines if multiply connected nodes should be filled- Returns:
trueif multiply connected nodes should be filled
-
isFillTaggedNode
public boolean isFillTaggedNode()
Determines if tagged nodes should be filled- Returns:
trueif tagged nodes should be filled
-
isOutlineOnly
public boolean isOutlineOnly()
Determines if only the data area outline should be drawn- Returns:
trueif only the data area outline should be drawn
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-