Package ca.spatial.mapview.symbol
Class SimpleLineSymbol
java.lang.Object
java.util.Observable
ca.spatial.mapview.symbol.Symbol
ca.spatial.mapview.symbol.SimpleLineSymbol
- All Implemented Interfaces:
PaintType
,Visibility
,Cloneable
,Observer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
static int
static String[]
static int
static int
static int
static int
static int
static int
static String[]
static int
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleLineSymbol(Paint paint, double lineWidth)
SimpleLineSymbol(Paint paint, BasicStroke stroke, double minScale, double maxScale, AlphaComposite alpha)
-
Method Summary
Modifier and TypeMethodDescriptionclone()
double
double
int
getColor()
Get the color for this symbol.getCustomizer(boolean scaledSymbol)
Get a GUI component that can be used to customize this symbolstatic Stroke
getDefaultStrokeForType(int type)
Get the fill color used for this symbolGet the line color used for this symbolint
double
Get the line width used for this symbolgetPaint()
Get the paint of this objectint
int
getType()
boolean
hasArrow()
boolean
isClear()
Test if the symbol is clearboolean
isPlainLineSymbol(boolean testColor)
boolean
isVisible(double scale)
Test if the symbol would be visible at this scalesetArrow(int style, double length, double angle)
void
setArrowAngle(double angle)
void
setArrowLength(double length)
void
setArrowStyle(int style)
void
Set the color for this symbol.void
setFillColor(Color color)
Set the fill color for this symbolvoid
setLineColor(Color color)
Set the line color for this symbolsetLineStyle(int type)
void
setLineWidth(double width)
Set the line width for this symbolvoid
Set the paint of this objectvoid
symbolize(Graphics2D g, Shape shape, double scale, int id, boolean isScaled)
toString()
Methods inherited from class ca.spatial.mapview.symbol.Symbol
clone, getAlpha, getColor, getColorSet, getDefault, getDefault, getDefaultSelectedSymbol, getMaxScale, getMinScale, getRandomColor, getTypeForName, getUnclassified, isActive, isLocked, isStandardVisibility, random, setActive, setAlpha, setLocked, setMaxScale, setMinScale, setVisibility, symbolize, update
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
-
Field Details
-
ARROW_NONE
public static final int ARROW_NONE- See Also:
- Constant Field Values
-
ARROW_FORWARD
public static final int ARROW_FORWARD- See Also:
- Constant Field Values
-
ARROW_REVERSE
public static final int ARROW_REVERSE- See Also:
- Constant Field Values
-
ARROW_BOTH
public static final int ARROW_BOTH- See Also:
- Constant Field Values
-
ARROW_NAMES
-
LINE_SOLID
public static final int LINE_SOLID- See Also:
- Constant Field Values
-
LINE_DASHED
public static final int LINE_DASHED- See Also:
- Constant Field Values
-
LINE_DOTTED
public static final int LINE_DOTTED- See Also:
- Constant Field Values
-
LINE_DOTDASH
public static final int LINE_DOTDASH- See Also:
- Constant Field Values
-
LINE_DOTDOTDASH
public static final int LINE_DOTDOTDASH- See Also:
- Constant Field Values
-
LINE_NAMES
-
-
Constructor Details
-
SimpleLineSymbol
public SimpleLineSymbol() -
SimpleLineSymbol
-
SimpleLineSymbol
public SimpleLineSymbol(Paint paint, BasicStroke stroke, double minScale, double maxScale, AlphaComposite alpha)
-
-
Method Details
-
getType
public int getType() -
toString
-
clone
-
isPlainLineSymbol
public boolean isPlainLineSymbol(boolean testColor) -
isClear
public boolean isClear()Description copied from class:Symbol
Test if the symbol is clear -
setFillColor
Description copied from class:Symbol
Set the fill color for this symbol- Specified by:
setFillColor
in classSymbol
-
getFillColor
Description copied from class:Symbol
Get the fill color used for this symbol- Specified by:
getFillColor
in classSymbol
-
getColor
Description copied from class:Symbol
Get the color for this symbol. The action that happens depends on the type of symbol:- for a polygon symbol get the fill color, or if null get the outline color
- for a line symbol get the line color
- for a point symbol get the marker color
-
setColor
Description copied from class:Symbol
Set the color for this symbol. The action that happens depends on the type of symbol:- for a polygon symbol set the fill color, or if null set the outline color
- for a line symbol set the line color
- for a point symbol set the marker color
-
setLineColor
Description copied from class:Symbol
Set the line color for this symbol- Specified by:
setLineColor
in classSymbol
-
getLineColor
Description copied from class:Symbol
Get the line color used for this symbol- Specified by:
getLineColor
in classSymbol
-
setLineWidth
public void setLineWidth(double width)Description copied from class:Symbol
Set the line width for this symbol- Specified by:
setLineWidth
in classSymbol
-
getLineWidth
public double getLineWidth()Description copied from class:Symbol
Get the line width used for this symbol- Specified by:
getLineWidth
in classSymbol
-
setLineStyle
-
getLineStyle
public int getLineStyle() -
makeStroke
-
setPaint
Description copied from interface:PaintType
Set the paint of this object -
getPaint
Description copied from interface:PaintType
Get the paint of this object -
getPaintType
public int getPaintType() -
getDefaultStrokeForType
-
hasArrow
public boolean hasArrow() -
setArrowStyle
public void setArrowStyle(int style) -
getArrowStyle
public int getArrowStyle() -
setArrowLength
public void setArrowLength(double length) -
getArrowLength
public double getArrowLength() -
setArrowAngle
public void setArrowAngle(double angle) -
getArrowAngle
public double getArrowAngle() -
setArrow
-
isVisible
public boolean isVisible(double scale)Description copied from class:Symbol
Test if the symbol would be visible at this scale -
symbolize
-
getCustomizer
Description copied from class:Symbol
Get a GUI component that can be used to customize this symbol- Specified by:
getCustomizer
in classSymbol
-