Class Symbol
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.styleelement.Symbol
-
public class Symbol extends java.lang.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 java.awt.Color
fillColor
The color to fill the interior of the shape.int
size
The width and height of this symboljava.awt.Stroke
stroke
The stroke to use for the outlinejava.awt.Color
strokeColor
The color to draw the stroke withprivate SymbolShape
symbolShape
-
Constructor Summary
Constructors Constructor Description Symbol(SymbolShape symbol, int size, java.awt.Stroke stroke, java.awt.Color strokeColor, java.awt.Color fillColor)
Create a new symbol
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Shape
buildShapeAround(double x, double y)
Builds the shape for this symbolboolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
symbolShape
private final SymbolShape symbolShape
-
size
public final int size
The width and height of this symbol
-
stroke
public final java.awt.Stroke stroke
The stroke to use for the outline
-
strokeColor
public final java.awt.Color strokeColor
The color to draw the stroke with
-
fillColor
public final java.awt.Color fillColor
The color to fill the interior of the shape.
-
-
Constructor Detail
-
Symbol
public Symbol(SymbolShape symbol, int size, java.awt.Stroke stroke, java.awt.Color strokeColor, java.awt.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
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
buildShapeAround
public java.awt.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.
-
-