Class Symbol
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.styleelement.Symbol
-
public class Symbol extends Object
The definition of a symbol that should be rendered at the node position.- Since:
- 10827 Extracted from
NodeElement
-
-
Field Summary
Fields Modifier and Type Field Description Color
fillColor
The color to fill the interior of the shape.int
size
The width and height of this symbolStroke
stroke
The stroke to use for the outlineColor
strokeColor
The color to draw the stroke withprivate SymbolShape
symbolShape
-
Constructor Summary
Constructors Constructor Description Symbol(SymbolShape symbol, int size, Stroke stroke, Color strokeColor, Color fillColor)
Create a new symbol
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Shape
buildShapeAround(double x, double y)
Builds the shape for this symbolboolean
equals(Object obj)
int
hashCode()
String
toString()
-
-
-
Field Detail
-
symbolShape
private final SymbolShape symbolShape
-
size
public final int size
The width and height of this symbol
-
strokeColor
public final Color strokeColor
The color to draw the stroke with
-
-
Constructor Detail
-
Symbol
public Symbol(SymbolShape symbol, int size, Stroke stroke, Color strokeColor, Color fillColor)
Create a new symbol- Parameters:
symbol
- The symbol typesize
- The overall size of the symbol, both width and height are the samestroke
- The stroke to use for the outlinestrokeColor
- The color to draw the stroke withfillColor
- The color to fill the interior of the shape.
-
-
Method Detail
-
buildShapeAround
public Shape buildShapeAround(double x, double y)
Builds the shape for this symbol- Parameters:
x
- The center x coordinatey
- The center y coordinate- Returns:
- The symbol shape.
-
-