com.esri.adf.web.data.symbol
Class WebSimplePolygonSymbol

java.lang.Object
  extended by com.esri.adf.web.data.symbol.WebSymbol
      extended by com.esri.adf.web.data.symbol.WebSimpleLineSymbol
          extended by com.esri.adf.web.data.symbol.WebSimplePolygonSymbol
All Implemented Interfaces:
Serializable

public class WebSimplePolygonSymbol
extends WebSimpleLineSymbol
implements Serializable

WebSimplePolygonSymbol represents a symbol for a polygon feature.

See Also:
Serialized Form

Field Summary
static String BDIAGONAL
          Fill the polygon with backward diagonal lines.
static String CROSS
          Fill the polygon with cross lines.
static String DARKGRAY
           
static String DIAGCROSS
          Fill the polygon with diagonally cross lines.
static String FDIAGONAL
          Fill the polygon with forward diagonal lines.
static String GRAY
           
static String HORIZONTAL
          Fill the polygon with horizontal lines.
static String LIGHTGRAY
           
static String TEXTURE
          Fill the polygon with texture.
static String TRANSPARENT
          Transparent fill polygon.
static String TYPE
           
static String VERTICAL
          Fill the polygon with vertical lines.
 
Fields inherited from class com.esri.adf.web.data.symbol.WebSimpleLineSymbol
BEVEL, BUTT, DASH, DASH_DOT, DASH_DOT_DOT, DOT, MITER, ROUND, SOLID, SQUARE
 
Fields inherited from class com.esri.adf.web.data.symbol.WebSymbol
transparency
 
Constructor Summary
WebSimplePolygonSymbol()
          Constructs a WebSimplePolygonSymbol object by setting default value for width to 1 and color to "0,0,0".
 
Method Summary
 boolean equals(Object obj)
           
 String getBoundaryCapType()
          Deprecated. As of ArcGIS Java Server 9.3, instead use getCapType()
 String getBoundaryColor()
          Deprecated. As of ArcGIS Java Server 9.3, instead use getColor()
 String getBoundaryJoinType()
          Deprecated. As of ArcGIS Java Server 9.3, instead use getJoinType()
 double getBoundaryTransparency()
          Deprecated. As of ArcGIS Java Server 9.3, instead use getTransparency()
 String getBoundaryType()
          Deprecated. As of ArcGIS Java Server 9.3, instead use getLineType()
 int getBoundaryWidth()
          Deprecated. As of ArcGIS Java Server 9.3, instead use getWidth()
 String getCapType()
          Returns the symbol's line cap type.
 String getColor()
          Returns the symbol's line color.
 String getFillColor()
          Returns the symbol's fill color value.
 int getFillInterval()
          Returns the symbol's fill interval value.
 BufferedImage getFillTexture()
          Returns the symbol's fill texture as a buffered image.
 double getFillTransparency()
          Returns the symbol's fill transparency value.
 String getFillType()
          Returns the symbol's fill type value.
 String getJoinType()
          Returns the symbol's line join type.
 String getLineType()
          Returns the symbol's line type.
 double getTransparency()
          Returns the symbol's line transparency value.
 String getType()
          Returns the type of the symbol as "SimplePolygon"
 int getWidth()
          Returns the line width of the symbol.
 int hashCode()
           
 void setBoundaryCapType(String capType)
          Deprecated. As of ArcGIS Java Server 9.3, instead use setCapType(String)
 void setBoundaryColor(String color)
          Deprecated. As of ArcGIS Java Server 9.3, instead use setColor(String)
 void setBoundaryJoinType(String joinType)
          Deprecated. As of ArcGIS Java Server 9.3, instead use setJoinType(String)
 void setBoundaryTransparency(double transparency)
          Deprecated. As of ArcGIS Java Server 9.3, instead use setTransparency(double)
 void setBoundaryType(String lineType)
          Deprecated. As of ArcGIS Java Server 9.3, instead use setLineType(String)
 void setBoundaryWidth(int width)
          Deprecated. As of ArcGIS Java Server 9.3, instead use setWidth(int)
 void setCapType(String capType)
          Sets the symbol's line cap type.
 void setColor(String color)
          Sets the symbol's line color, default line color is "0,0,0"
 void setFillColor(String fillColor)
          Sets the symbol's fill color value, default fill color is "255,255,0"
 void setFillInterval(int fillInterval)
          Sets the distance between lines for hatch fills.
 void setFillTexture(BufferedImage fillTexture)
          Sets the symbol's fill texture as a buffered image.
 void setFillTransparency(double fillTransparency)
          Sets the symbol's fill transparency value.
 void setFillType(String fillType)
          Sets the symbol's fill type value.
 void setJoinType(String joinType)
          Sets the symbol's line join type.
 void setLineType(String type)
          Sets the symbol's line type.
 void setTransparency(double transparency)
          Sets the percentage of line transparency for this symbol, default value is 1.0
 void setWidth(int width)
          Sets the symbols's line width, default line width is 1.
 String toString()
           
 
Methods inherited from class com.esri.adf.web.data.symbol.WebSymbol
getAngle, isAntialiasing, setAngle, setAntialiasing
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
See Also:
Constant Field Values

BDIAGONAL

public static final String BDIAGONAL
Fill the polygon with backward diagonal lines.

See Also:
Constant Field Values

FDIAGONAL

public static final String FDIAGONAL
Fill the polygon with forward diagonal lines.

See Also:
Constant Field Values

CROSS

public static final String CROSS
Fill the polygon with cross lines.

See Also:
Constant Field Values

DIAGCROSS

public static final String DIAGCROSS
Fill the polygon with diagonally cross lines.

See Also:
Constant Field Values

HORIZONTAL

public static final String HORIZONTAL
Fill the polygon with horizontal lines.

See Also:
Constant Field Values

VERTICAL

public static final String VERTICAL
Fill the polygon with vertical lines.

See Also:
Constant Field Values

GRAY

public static final String GRAY
See Also:
Constant Field Values

LIGHTGRAY

public static final String LIGHTGRAY
See Also:
Constant Field Values

DARKGRAY

public static final String DARKGRAY
See Also:
Constant Field Values

TRANSPARENT

public static final String TRANSPARENT
Transparent fill polygon.

See Also:
Constant Field Values

TEXTURE

public static final String TEXTURE
Fill the polygon with texture.

See Also:
Constant Field Values
Constructor Detail

WebSimplePolygonSymbol

public WebSimplePolygonSymbol()
Constructs a WebSimplePolygonSymbol object by setting default value for width to 1 and color to "0,0,0".

Method Detail

getType

public String getType()
Returns the type of the symbol as "SimplePolygon"

Overrides:
getType in class WebSimpleLineSymbol
Returns:
the string representation of symbol type TYPE

setTransparency

public void setTransparency(double transparency)
Sets the percentage of line transparency for this symbol, default value is 1.0
 For example,
   symbol.setTransparency(0.5);
 

Overrides:
setTransparency in class WebSymbol
Parameters:
transparency - the transparency value. 1.0 is 0 percent transparent and 0.0 is 100 percent transparent
See Also:
getTransparency()

getTransparency

public double getTransparency()
Returns the symbol's line transparency value.
 For example,
     double transparency = symbol.getTransparency();
 

Overrides:
getTransparency in class WebSymbol
Returns:
the transparency value for the line
See Also:
setTransparency(double)

setWidth

public void setWidth(int width)
Sets the symbols's line width, default line width is 1.
 For Example,
   simplePolygon.setWidth(5);
 

Overrides:
setWidth in class WebSimpleLineSymbol
Parameters:
width - the width of the line
See Also:
getWidth()

getWidth

public int getWidth()
Returns the line width of the symbol.

Overrides:
getWidth in class WebSimpleLineSymbol
Returns:
the line width of the symbol
See Also:
setWidth(int)

setColor

public void setColor(String color)
Sets the symbol's line color, default line color is "0,0,0"
 For Example,
   simplePolygon.setColor("0,255,255");
 

Overrides:
setColor in class WebSimpleLineSymbol
Parameters:
color - the symbol's line color
See Also:
getColor()

getColor

public String getColor()
Returns the symbol's line color.

Overrides:
getColor in class WebSimpleLineSymbol
Returns:
the symbol's line color
See Also:
setColor(String)

setLineType

public void setLineType(String type)
Sets the symbol's line type.
 For Example,
   simplePolygon.setLineType(WebSimplePolygonSymbol.DASH_DOT);
 

The default style is WebSimpleLineSymbol.SOLID

Overrides:
setLineType in class WebSimpleLineSymbol
Parameters:
type - the symbol's line type, possible values are solid, dash, dot, dash_dot or dash_dot_dot
See Also:
getLineType()

getLineType

public String getLineType()
Returns the symbol's line type.

Overrides:
getLineType in class WebSimpleLineSymbol
Returns:
the symbol's line type
See Also:
setLineType(String)

setCapType

public void setCapType(String capType)
Sets the symbol's line cap type.
 For Example,
   simplePolygon.setCapType(WebSimplePolygonSymbol.ROUND);
 

The default cap type is WebSimpleLineSymbol.BUTT

Overrides:
setCapType in class WebSimpleLineSymbol
Parameters:
capType - the symbol's line cap type, possible values are round, square or butt
See Also:
getCapType()

getCapType

public String getCapType()
Returns the symbol's line cap type.

Overrides:
getCapType in class WebSimpleLineSymbol
Returns:
the symbol's line cap type
See Also:
setCapType(String)

setJoinType

public void setJoinType(String joinType)
Sets the symbol's line join type.
 For Example,
   simplePolygon.setCapType(WebSimplePolygonSymbol.MITER);
 

The default join type is WebSimpleLineSymbol.ROUND

Overrides:
setJoinType in class WebSimpleLineSymbol
Parameters:
joinType - the symbol's line join type, possible values are round, miter or bevel
See Also:
getJoinType()

getJoinType

public String getJoinType()
Returns the symbol's line join type.

Overrides:
getJoinType in class WebSimpleLineSymbol
Returns:
the symbol's line join type
See Also:
setJoinType(String)

setFillTransparency

public void setFillTransparency(double fillTransparency)
Sets the symbol's fill transparency value.
 For example,
   simplePolygon.setFillTransparency(0.5);
 

Parameters:
fillTransparency - the fill transparency value, default value is 1.0
See Also:
getFillTransparency()

getFillTransparency

public double getFillTransparency()
Returns the symbol's fill transparency value.
 For example,
   double fillTransparency = simplePolygon.getFillTransparency();
 

Returns:
the fill transparency value
See Also:
setFillTransparency(double)

setFillColor

public void setFillColor(String fillColor)
Sets the symbol's fill color value, default fill color is "255,255,0"
 For example,
   simplePolygon.setFillColor("0,255,255");
 

Parameters:
fillColor - the polygon symbol fill color value
See Also:
getFillColor()

getFillColor

public String getFillColor()
Returns the symbol's fill color value.
 For example,
   String fillColor = simplePolygon.getFillColor();
 

Returns:
the polygon fill color
See Also:
setFillColor(java.lang.String)

setFillType

public void setFillType(String fillType)
Sets the symbol's fill type value.
 For example,
   simplePolygon.setFillType(WebSimplePolygonSymbol.CROSS);
 

The default value is WebSimpleLineSymbol.SOLID

Parameters:
fillType - the fill type value, possible values are solid, bdiagonal, fdiagonal, cross, diagcross, horizontal, vertical, gray, lightgray, darkgray, texture or transparent
See Also:
getFillType()

getFillType

public String getFillType()
Returns the symbol's fill type value.
 For example,
   String fillType = simplePolygon.getFillType();
 

Returns:
the fill type
See Also:
setFillType(java.lang.String)

setFillInterval

public void setFillInterval(int fillInterval)
Sets the distance between lines for hatch fills. This property is not used if the symbol type is TEXTURE.
 For example,
   simplePolygon.setFillInterval(5);
 

Parameters:
fillInterval - the fill interval value, default value is 6. fillInterval should be greater than 0 and less than the width of the symbol's extent.
See Also:
getFillInterval()

getFillInterval

public int getFillInterval()
Returns the symbol's fill interval value.
 For Example,
   long fillInterval = simplePolygon.getFillInterval();
 

Returns:
the fill interval value of the polygon symbol
See Also:
setFillInterval(int)

setFillTexture

public void setFillTexture(BufferedImage fillTexture)
Sets the symbol's fill texture as a buffered image.
 For Example,
   simplePolygon.setFillType(WebSimplePolygonSymbol.TEXTURE);
   simplePolygon.setFillTexture(javax.imageio.ImageIO.read(new java.net.URL("http://www.esri.com/graphics/orangearrow_small.gif")));
   simplePolygon.setFillTransparency(0.5);
   GraphicsUtil.exportSymbol(simplePolygon, 100, 100);
 

Parameters:
fillTexture - the buffered image used for filling the polygon symbol

getFillTexture

public BufferedImage getFillTexture()
Returns the symbol's fill texture as a buffered image.

Returns:
the buffered image used for filling the polygon symbol

setBoundaryWidth

@Deprecated
public void setBoundaryWidth(int width)
Deprecated. As of ArcGIS Java Server 9.3, instead use setWidth(int)

Sets the symbol's line width.
 For Example,
   simplePolygon.setWidth(5);
 

Parameters:
width - the line width, default line width is 1.
See Also:
getWidth()

getBoundaryWidth

@Deprecated
public int getBoundaryWidth()
Deprecated. As of ArcGIS Java Server 9.3, instead use getWidth()

Returns the symbol's line width value.
 For Example,
   long width = simplePolygon.getWidth();
 

Returns:
the line width of the symbol
See Also:
setWidth(int)

setBoundaryColor

@Deprecated
public void setBoundaryColor(String color)
Deprecated. As of ArcGIS Java Server 9.3, instead use setColor(String)

Sets the symbol's line color value.
 For Example,
   simplePolygon.setColor("100,0,0");
 

Parameters:
color - the line color, default line color is "0,0,0"
See Also:
getColor()

getBoundaryColor

@Deprecated
public String getBoundaryColor()
Deprecated. As of ArcGIS Java Server 9.3, instead use getColor()

Returns the symbol's line color value.
 For Example,
   String lineColor = simplePolygon.getColor();
 

Returns:
the line color of the polygon symbol
See Also:
setColor(String)

setBoundaryType

@Deprecated
public void setBoundaryType(String lineType)
Deprecated. As of ArcGIS Java Server 9.3, instead use setLineType(String)

Sets the symbol's line style value.
 For Example,
   simplePolygon.setLineType(WebSimplePolygonSymbol.DASH_DOT);
 

Parameters:
lineType - the line type value, possible values are solid(DEFAULT), dash, dot, dash_dot or dash_dot_dot
See Also:
getLineType()

getBoundaryType

@Deprecated
public String getBoundaryType()
Deprecated. As of ArcGIS Java Server 9.3, instead use getLineType()

Returns the symbol's line style value.

Returns:
the line style
See Also:
setLineType(String)

setBoundaryCapType

@Deprecated
public void setBoundaryCapType(String capType)
Deprecated. As of ArcGIS Java Server 9.3, instead use setCapType(String)

Sets the symbol's line cap type value.
 For Example,
   simplePolygon.setCapType("WebSimplePolygonSymbol.ROUND");
 

Parameters:
capType - the line cap type value, possible values are round, square or butt(DEFAULT)
See Also:
getCapType()

getBoundaryCapType

@Deprecated
public String getBoundaryCapType()
Deprecated. As of ArcGIS Java Server 9.3, instead use getCapType()

Returns the symbol's line cap type value.

Returns:
the line end style
See Also:
setCapType(String)

setBoundaryJoinType

@Deprecated
public void setBoundaryJoinType(String joinType)
Deprecated. As of ArcGIS Java Server 9.3, instead use setJoinType(String)

Sets the symbol's line join type.
 For Example,
   simplePolygon.setJoinType(WebSimplePolygonSymbol.BEVEL);
 

Parameters:
joinType - the line join type value, possible values are round(DEFAULT), miter or bevel
See Also:
getJoinType()

getBoundaryJoinType

@Deprecated
public String getBoundaryJoinType()
Deprecated. As of ArcGIS Java Server 9.3, instead use getJoinType()

Returns the symbol's line join type value.

Returns:
the line join style
See Also:
setJoinType(String)

setBoundaryTransparency

@Deprecated
public void setBoundaryTransparency(double transparency)
Deprecated. As of ArcGIS Java Server 9.3, instead use setTransparency(double)

Sets the symbol's line transparency value.
 For Example,
   simplePolygon.setTransparency(0.5);
 

Parameters:
transparency - the line transparency value, the default value is 1.0
See Also:
getTransparency()

getBoundaryTransparency

@Deprecated
public double getBoundaryTransparency()
Deprecated. As of ArcGIS Java Server 9.3, instead use getTransparency()

Returns the symbol's line transparency value.

Returns:
the line transparency value
See Also:
setTransparency(double)

toString

public String toString()
Overrides:
toString in class WebSimpleLineSymbol

hashCode

public int hashCode()
Overrides:
hashCode in class WebSimpleLineSymbol

equals

public boolean equals(Object obj)
Overrides:
equals in class WebSimpleLineSymbol