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.ColorfillColorThe color to fill the interior of the shape.intsizeThe width and height of this symboljava.awt.StrokestrokeThe stroke to use for the outlinejava.awt.ColorstrokeColorThe color to draw the stroke withprivate SymbolShapesymbolShape
-
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.ShapebuildShapeAround(double x, double y)Builds the shape for this symbolbooleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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.
-
-