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.Color
connectionColor
Color Preference for multiply connected nodesprivate int
connectionNodeSize
Preference: size of multiply connected nodesprivate int
defaultSegmentWidth
Preference: default width for ways segmentsprivate boolean
fillConnectionNode
Preference: should multiply connected nodes be filledprivate boolean
fillSelectedNode
Preference: should selected nodes be filledprivate boolean
fillTaggedNode
Preference: should tagged nodes be filledprivate boolean
fillUnselectedNode
Preference: should unselected nodes be filledprivate java.awt.Color
highlightColor
Color Preference for highlighted objectsprivate java.awt.Color
inactiveColor
Color Preference for inactive objectsstatic MapPaintSettings
INSTANCE
The unique instanceprivate java.awt.Color
nodeColor
Color Preference for nodesprivate boolean
outlineOnly
Preference: should only the data area outline be drawnprivate java.awt.Color
relationSelectedColor
private java.awt.Color
selectedColor
Color Preference for selected objectsprivate int
selectedNodeSize
Preference: size of selected nodesprivate boolean
showDirectionArrow
Preference: should directional arrows be displayedprivate boolean
showHeadArrowOnly
Preference: should only the last arrow of a way be displayedprivate int
showIconsDistance
private int
showNamesDistance
private boolean
showOnewayArrow
Preference: should arrows for oneways be displayedprivate boolean
showOrderNumber
Preference: should the segment numbers of ways be displayedprivate boolean
showOrderNumberOnSelectedWay
Preference: should the segment numbers of ways be displayed on selected wayprivate java.awt.Color
taggedColor
Color Preference for tagged nodesprivate java.awt.Color
taggedConnectionColor
Color Preference for tagged and multiply connected nodesprivate int
taggedNodeSize
Preference: size of tagged nodesprivate int
unselectedNodeSize
Preference: size of unselected nodesprivate boolean
useRealWidth
private int
useStrokesDistance
-
Constructor Summary
Constructors Modifier Constructor Description private
MapPaintSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
getConnectionColor()
Returns color for multiply connected nodesint
getConnectionNodeSize()
Returns the size of multiply connected nodesint
getDefaultSegmentWidth()
Returns default width for ways segmentsjava.awt.Color
getHighlightColor()
Returns color for hightlighted objectsjava.awt.Color
getInactiveColor()
Returns color for inactive objectsjava.awt.Color
getNodeColor()
Returns color for nodesjava.awt.Color
getRelationSelectedColor()
Returns color for selected relationsjava.awt.Color
getRelationSelectedColor(int alpha)
Returns color for selected relations with a given alphajava.awt.Color
getSelectedColor()
Returns color for selected objects (nodes and ways)java.awt.Color
getSelectedColor(int alpha)
Returns color for selected objects (nodes and ways) with a given alphaint
getSelectedNodeSize()
Returns the size of selected nodesint
getShowIconsDistance()
Returns the distance at which icons should be drawnint
getShowNamesDistance()
Returns the distance at which names should be drawnjava.awt.Color
getTaggedColor()
Returns color for tagged nodesjava.awt.Color
getTaggedConnectionColor()
Returns color for tagged and multiply connected nodesint
getTaggedNodeSize()
Returns the size of tagged nodesint
getUnselectedNodeSize()
Returns the size of unselected nodesint
getUseStrokesDistance()
Returns the distance at which strokes should be usedboolean
isFillConnectionNode()
Determines if multiply connected nodes should be filledboolean
isFillSelectedNode()
Determines if selected nodes should be filledboolean
isFillTaggedNode()
Determines if tagged nodes should be filledboolean
isFillUnselectedNode()
Determines if unselected nodes should be filledboolean
isOutlineOnly()
Determines if only the data area outline should be drawnboolean
isShowDirectionArrow()
Determines if directional arrows should be displayedboolean
isShowHeadArrowOnly()
Determines if only the last arrow of a way should be displayedboolean
isShowOnewayArrow()
Determines if arrows for oneways should be displayedboolean
isShowOrderNumber()
Determines if the segment numbers of ways should be displayedboolean
isShowOrderNumberOnSelectedWay()
Determines if the segment numbers of the selected way should be displayedboolean
isUseRealWidth()
Determines if the real width of ways should be usedprivate void
load()
void
preferenceChanged(PreferenceChangeEvent e)
Triggered when a preference entry value changes.void
setShowHeadArrowOnly(boolean showHeadArrowOnly)
Specifies if only the last arrow of a way should be displayedjava.lang.String
toString()
-
-
-
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:PreferenceChangedListener
Triggered when a preference entry value changes.- Specified by:
preferenceChanged
in interfacePreferenceChangedListener
- Parameters:
e
- the preference change event
-
isUseRealWidth
public boolean isUseRealWidth()
Determines if the real width of ways should be used- Returns:
true
if the real width of ways should be used
-
isShowDirectionArrow
public boolean isShowDirectionArrow()
Determines if directional arrows should be displayed- Returns:
true
if directional arrows should be displayed
-
isShowOnewayArrow
public boolean isShowOnewayArrow()
Determines if arrows for oneways should be displayed- Returns:
true
if 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:
true
if 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:
true
if 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
-true
if 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:
true
if 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:
true
if selected nodes should be filled
-
isFillUnselectedNode
public boolean isFillUnselectedNode()
Determines if unselected nodes should be filled- Returns:
true
if unselected nodes should be filled
-
isFillConnectionNode
public boolean isFillConnectionNode()
Determines if multiply connected nodes should be filled- Returns:
true
if multiply connected nodes should be filled
-
isFillTaggedNode
public boolean isFillTaggedNode()
Determines if tagged nodes should be filled- Returns:
true
if tagged nodes should be filled
-
isOutlineOnly
public boolean isOutlineOnly()
Determines if only the data area outline should be drawn- Returns:
true
if only the data area outline should be drawn
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-