public class Symbol extends java.lang.Object
NodeElement
Modifier and Type | Field and Description |
---|---|
java.awt.Color |
fillColor
The color to fill the interiour of the shape.
|
int |
size
The width and height of this symbol
|
java.awt.Stroke |
stroke
The stroke to use for the outline
|
java.awt.Color |
strokeColor
The color to draw the stroke with
|
private SymbolShape |
symbolShape |
Constructor and Description |
---|
Symbol(SymbolShape symbol,
int size,
java.awt.Stroke stroke,
java.awt.Color strokeColor,
java.awt.Color fillColor)
Create a new symbol
|
Modifier and Type | Method and Description |
---|---|
java.awt.Shape |
buildShapeAround(double x,
double y)
Builds the shape for this symbol
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.lang.String |
toString() |
private final SymbolShape symbolShape
public final int size
public final java.awt.Stroke stroke
public final java.awt.Color strokeColor
public final java.awt.Color fillColor
public Symbol(SymbolShape symbol, int size, java.awt.Stroke stroke, java.awt.Color strokeColor, java.awt.Color fillColor)
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 interiour of the shape.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.awt.Shape buildShapeAround(double x, double y)
x
- The center x coordinatey
- The center y coordinate