es.prodevelop.gvsig.mobile.fmap.symbol
Class FSymbol

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.fmap.symbol.FSymbol

public class FSymbol
extends java.lang.Object

Simplified symbol object.

Author:
jldominguez

Field Summary
static FSymbol MEASURE_SYMBOL
          Symbol uised for the polyline shown during measurements
static FSymbol SELECTION_SYMBOL
          Symbol used for selected features
static java.awt.Color[] validColor
          Array of good taste colors (from Brewer)
 
Constructor Summary
FSymbol()
          Constructor with default values.
FSymbol(java.awt.Color bc, java.awt.Color fc, boolean _filled, int strokeW)
          Constructor
 
Method Summary
static FSymbol createRandomSymbol(boolean filled)
          creates random symbol
 java.awt.Color getBorderColor()
           
static FSymbol getDefaultSymbol()
           
 java.awt.Color getFillColor()
           
static FSymbol getMeasureSymbol()
           
static java.awt.Color getRandomColor()
           
 int getStrokeWidth()
           
static FSymbol getSymbolForSelection()
           
 boolean isFilled()
           
 void setBorderColor(java.awt.Color color)
          Gets the border color
 void setFillColor(java.awt.Color color)
          Sets the fill color
 void setFilled(boolean f)
          Sets the filled property
 void setStrokeWidth(int w)
          Sets the stroke width
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECTION_SYMBOL

public static final FSymbol SELECTION_SYMBOL
Symbol used for selected features


MEASURE_SYMBOL

public static final FSymbol MEASURE_SYMBOL
Symbol uised for the polyline shown during measurements


validColor

public static java.awt.Color[] validColor
Array of good taste colors (from Brewer)

Constructor Detail

FSymbol

public FSymbol(java.awt.Color bc,
               java.awt.Color fc,
               boolean _filled,
               int strokeW)
Constructor

Parameters:
bc - border color
fc - fill color
_filled - wherher the polygon has to be filled
strokeW - stroke width

FSymbol

public FSymbol()
Constructor with default values.

Method Detail

getSymbolForSelection

public static FSymbol getSymbolForSelection()
Returns:
the selection symbol

getMeasureSymbol

public static FSymbol getMeasureSymbol()
Returns:
the measurement symbol

getDefaultSymbol

public static FSymbol getDefaultSymbol()
Returns:
the default symbol object

isFilled

public boolean isFilled()
Returns:
whether this symbol is filled

setFilled

public void setFilled(boolean f)
Sets the filled property

Parameters:
f - the new filled property

getBorderColor

public java.awt.Color getBorderColor()
Returns:
the border color

setBorderColor

public void setBorderColor(java.awt.Color color)
Gets the border color

Parameters:
color - the new border color

getFillColor

public java.awt.Color getFillColor()
Returns:
the fill color

setFillColor

public void setFillColor(java.awt.Color color)
Sets the fill color

Parameters:
color - the new fill color

getStrokeWidth

public int getStrokeWidth()
Returns:
the stroke width

setStrokeWidth

public void setStrokeWidth(int w)
Sets the stroke width

Parameters:
w - the new stroke width

getRandomColor

public static java.awt.Color getRandomColor()
Returns:
a randomly chosen color (among good colors)

createRandomSymbol

public static FSymbol createRandomSymbol(boolean filled)
creates random symbol

Parameters:
filled - whether it has to be filled or not
Returns:
a random symbol (stroke width = 1)