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

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

public class WebTrueTypeMarkerSymbol
extends WebSymbol
implements Serializable

WebTrueTypeMarkerSymbol is a class used to symbolize point features.

See Also:
Serialized Form

Field Summary
static String BOLD
          Bold font style
static String BOLDITALIC
          Bold italic font style
static int BOTTOM
          Bottom text position
static int CENTER
          Center text position
static int CIRCLE
          Circle marker type
static int CROSS
          Cross marker type
static String ITALIC
          Italic font style
static int LEFT
          Left text position
static int NONE
          None marker type
static String OUTLINE
          Outline font style
static String REGULAR
          Regular font style
static int RIGHT
          Right text position
static int SQUARE
          Square marker type
static int STAR
          Start marker type
static int TOP
          Top text position
static int TRIANGLE
          Triangle marker type
static String TYPE
           
static String UNDERLINE
          Underline font style
 
Fields inherited from class com.esri.adf.web.data.symbol.WebSymbol
transparency
 
Constructor Summary
WebTrueTypeMarkerSymbol()
          Constructs an instance of WebTrueTypeMarkerSymbol.
 
Method Summary
 void addTextValue(String text)
          Adds text values which are displayed with the symbol.
 boolean equals(Object obj)
           
 int getCharacterIndex()
          Returns the WebTrueTypeMarkerSymbol's character value.
 String getFontColor()
          Returns the WebTrueTypeMarkerSymbol's font color value.
 String getFontName()
          Returns the WebTrueTypeMarkerSymbol's font name.
 int getFontSize()
          Returns the WebTrueTypeMarkerSymbol's font size value.
 String getFontStyle()
          Returns the WebTrueTypeMarkerSymbol's font style value.
 String getGlowingColor()
          Returns the WebTrueTypeMarkerSymbol's glowing color value.
 double getMarkerAngle()
          Returns the marker angle.
 String getMarkerColor()
          Returns the marker color.
 int getMarkerType()
          Returns the marker type.
 String getOutlineColor()
          Returns the WebTrueTypeMarkerSymbol's outline color value.
 String getShadowColor()
          Returns the WebTrueTypeMarkerSymbol's shadow color value.
 double getTextAngle()
          Returns the angle of the text
 int getTextPosition()
          Returns text position.
 List<String> getTextValues()
          Returns the text values.
 String getType()
          Returns the type of the symbol as "TrueTypeMarker"
 int getWidth()
          Returns the width of the marker.
 double getXOffset()
          Returns the x-axis offset.
 double getYOffset()
          Returns the y-axis offset.
 int hashCode()
           
 void setAngle(double angle)
          Sets the marker and the text angle values, default values are 0.
 void setCharacterIndex(int characterIndex)
          Sets the WebTrueTypeMarkerSymbol's character value.
 void setFontColor(String fontColor)
          Sets the WebTrueTypeMarkerSymbol's font color value.
 void setFontName(String fontName)
          Sets the WebTrueTypeMarkerSymbol's font name.
 void setFontSize(int fontSize)
          Sets the WebTrueTypeMarkerSymbol's font size value.
 void setFontStyle(String fontStyle)
          Sets the WebTrueTypeMarkerSymbol's font style value.
 void setGlowingColor(String glowingColor)
          Sets the WebTrueTypeMarkerSymbol's glowing color value.
 void setMarkerAngle(double markerAngle)
          sets the marker angle value, default value is 0.
 void setMarkerColor(String markerColor)
          Sets the marker color.
 void setMarkerType(int markerType)
          Sets the WebTrueTypeMarkerSymbol's marker type value.
 void setOutlineColor(String outlineColor)
          Sets the WebTrueTypeMarkerSymbol's outline color value.
 void setShadowColor(String shadowColor)
          Sets the WebTrueTypeMarkerSymbol's shadow color value.
 void setTextAngle(double textAngle)
          Sets the text angle value, default value is 0.
 void setTextPosition(int textPosition)
          Sets Text position.
 void setTextValues(List<String> textValues)
          Sets the text values to be displayed within the marker.
 void setWidth(int width)
          Sets the width of the marker.
 void setXOffset(double xOffset)
          Sets the symbol x-axis offset.
 void setYOffset(double yOffset)
          Sets the symbol y-axis offset.
 String toString()
           
 
Methods inherited from class com.esri.adf.web.data.symbol.WebSymbol
getAngle, getTransparency, isAntialiasing, setAntialiasing, setTransparency
 
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

REGULAR

public static final String REGULAR
Regular font style

See Also:
Constant Field Values

BOLD

public static final String BOLD
Bold font style

See Also:
Constant Field Values

ITALIC

public static final String ITALIC
Italic font style

See Also:
Constant Field Values

UNDERLINE

public static final String UNDERLINE
Underline font style

See Also:
Constant Field Values

OUTLINE

public static final String OUTLINE
Outline font style

See Also:
Constant Field Values

BOLDITALIC

public static final String BOLDITALIC
Bold italic font style

See Also:
Constant Field Values

NONE

public static final int NONE
None marker type

See Also:
Constant Field Values

CIRCLE

public static final int CIRCLE
Circle marker type

See Also:
Constant Field Values

SQUARE

public static final int SQUARE
Square marker type

See Also:
Constant Field Values

TRIANGLE

public static final int TRIANGLE
Triangle marker type

See Also:
Constant Field Values

CROSS

public static final int CROSS
Cross marker type

See Also:
Constant Field Values

STAR

public static final int STAR
Start marker type

See Also:
Constant Field Values

TOP

public static final int TOP
Top text position

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
Bottom text position

See Also:
Constant Field Values

LEFT

public static final int LEFT
Left text position

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Right text position

See Also:
Constant Field Values

CENTER

public static final int CENTER
Center text position

See Also:
Constant Field Values
Constructor Detail

WebTrueTypeMarkerSymbol

public WebTrueTypeMarkerSymbol()
Constructs an instance of WebTrueTypeMarkerSymbol.
 WebTrueTypeMarkerSymbol trueType = new WebTrueTypeMarkerSymbol();
 

Method Detail

setAngle

public void setAngle(double angle)
Sets the marker and the text angle values, default values are 0.

Overrides:
setAngle in class WebSymbol
Parameters:
angle - the symbol angle value in degrees. The angle of the symbol is calculated in a clockwise direction

getType

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

Specified by:
getType in class WebSymbol
Returns:
the string representation of symbol type TYPE

setWidth

public void setWidth(int width)
Sets the width of the marker. Default width size is 15. Use setFontSize(int) to set the text font size.

Overrides:
setWidth in class WebSymbol
Parameters:
width - the width of the marker

getWidth

public int getWidth()
Returns the width of the marker.

Overrides:
getWidth in class WebSymbol
Returns:
the width of the marker

setCharacterIndex

public void setCharacterIndex(int characterIndex)
Sets the WebTrueTypeMarkerSymbol's character value. For example setting character index 107 for ARIAL font name will print the character "k"
 For Example,
  WebTrueTypeMarkerSymbol trueType = new WebTrueTypeMarkerSymbol();
  trueType.setAngle(45.0);
  trueType.setAntialiasing(true);
  trueType.setFontName("ESRI North");
  trueType.setFontStyle(WebTrueTypeMarkerSymbol.BOLD);
  trueType.setFontColor("0,0,255");
  trueType.setFontSize(100);
  trueType.setCharacterIndex(51);
 

Parameters:
characterIndex - the font character value
See Also:
getCharacterIndex()

getCharacterIndex

public int getCharacterIndex()
Returns the WebTrueTypeMarkerSymbol's character value.
 For Example,
     int character = trueType.getCharacterIndex();
 

Returns:
the font character index
See Also:
setCharacterIndex(int)

setFontName

public void setFontName(String fontName)
Sets the WebTrueTypeMarkerSymbol's font name.
 For Example,
   trueType.setFont("Arial");
 

Parameters:
fontName - the font value.
See Also:
getFontName()

getFontName

public String getFontName()
Returns the WebTrueTypeMarkerSymbol's font name.
 For Example,
   String font = trueType.getFontName();
 

Returns:
the font name
See Also:
setFontName(java.lang.String)

setFontSize

public void setFontSize(int fontSize)
Sets the WebTrueTypeMarkerSymbol's font size value.
 For Example,
   trueType.setFontSize(15);
 

Parameters:
fontSize - the font size value, default value is 12
See Also:
getFontSize()

getFontSize

public int getFontSize()
Returns the WebTrueTypeMarkerSymbol's font size value.

Returns:
the font size
See Also:
setFontSize(int)

setFontStyle

public void setFontStyle(String fontStyle)
Sets the WebTrueTypeMarkerSymbol's font style value.
 For Example,
   trueType.setFontStyle(WebTrueTypeMarkerSymbol.BOLD);
 

Parameters:
fontStyle - the font style value, possible values are REGULAR(DEFAULT), BOLD, ITALIC, UNDERLINE, OUTLINE or BOLDITALIC
See Also:
getFontStyle()

getFontStyle

public String getFontStyle()
Returns the WebTrueTypeMarkerSymbol's font style value.
 For Example,
   String fontStyle = trueType.getFontStyle();
 

Returns:
the font style
See Also:
setFontStyle(java.lang.String)

setFontColor

public void setFontColor(String fontColor)
Sets the WebTrueTypeMarkerSymbol's font color value.
 For Example,
   trueType.setFontColor("100,0,0");
 

Parameters:
fontColor - the font color, default value is "0,0,0"
See Also:
getFontColor()

getFontColor

public String getFontColor()
Returns the WebTrueTypeMarkerSymbol's font color value.
 For Example,
   String fontColor = trueType.getFontColor();
 

Returns:
the font color
See Also:
setFontColor(java.lang.String)

setOutlineColor

public void setOutlineColor(String outlineColor)
Sets the WebTrueTypeMarkerSymbol's outline color value.
 For Example,
   trueType.setOutlineColor("45,0,0");
 

Parameters:
outlineColor - the outline color value.
See Also:
getOutlineColor()

getOutlineColor

public String getOutlineColor()
Returns the WebTrueTypeMarkerSymbol's outline color value.
 For Example,
   String outline = trueType.getOutlineColor();
 

Returns:
the outline color for this symbol
See Also:
setOutlineColor(java.lang.String)

setShadowColor

public void setShadowColor(String shadowColor)
Sets the WebTrueTypeMarkerSymbol's shadow color value.
 For Example,
   trueType.setShadowColor("85,0,0");
 

Parameters:
shadowColor - the shadow color value.
See Also:
getShadowColor()

getShadowColor

public String getShadowColor()
Returns the WebTrueTypeMarkerSymbol's shadow color value.

Returns:
the shadow color for this symbol
See Also:
setShadowColor(java.lang.String)

setGlowingColor

public void setGlowingColor(String glowingColor)
Sets the WebTrueTypeMarkerSymbol's glowing color value.
 For Example,
   trueType.setGlowingColor("100,0,0");
 

Parameters:
glowingColor - the glowing color value.
See Also:
getGlowingColor()

getGlowingColor

public String getGlowingColor()
Returns the WebTrueTypeMarkerSymbol's glowing color value.
 For Example,
   String glowing = trueType.getGlowing();
 

Returns:
String
See Also:
setGlowingColor(java.lang.String)

setTextPosition

public void setTextPosition(int textPosition)
Sets Text position. Default will be WebTrueTypeMarkerSymbol.CENTER. Draws text on WebTrueTypeMarkerSymbol.TOP or WebTrueTypeMarkerSymbol.LEFT or WebTrueTypeMarkerSymbol.BOTTOM or WebTrueTypeMarkerSymbol.RIGHT of marker symbol.

Parameters:
textPosition - the position of the text within marker, possible values are TOP, BOTTOM, LEFT, RIGHT or CENTER(DEFAULT)

getTextPosition

public int getTextPosition()
Returns text position. BOTTOM

Returns:
the text position

addTextValue

public void addTextValue(String text)
Adds text values which are displayed with the symbol. If the symbol is used with a WebPoint, only the first text value is displayed and the rest are ignored. If the symbol is used with a WebMultiPoint, each vertex is displayed with one text value. If there are extra text values, they will be ignored. If there are extra vertices, they will not be labeled.

Parameters:
text - the values

setTextValues

public void setTextValues(List<String> textValues)
Sets the text values to be displayed within the marker.
 For Example,
 
  WebMultiPoint points = new WebMultiPoint();
  points.addPoint(new WebPoint(100, 100));
  points.addPoint(new WebPoint(400, 100));
  points.addPoint(new WebPoint(400, 400));
  points.addPoint(new WebPoint(100, 400));
 
  WebTrueTypeMarkerSymbol trueType = new WebTrueTypeMarkerSymbol();
  trueType.setAngle(45.0);
  trueType.setAntialiasing(true);
  trueType.setWidth(100);
 
  trueType.setFontName("Arial");
  trueType.setFontStyle(WebTrueTypeMarkerSymbol.BOLDITALIC);
  trueType.setFontColor("255,255,255");
  trueType.setFontSize(30);
 
  trueType.setMarkerType(WebTrueTypeMarkerSymbol.SQUARE);
  trueType.setMarkerColor("0,0,255");
  ArrayList<String> text = new ArrayList<String>(4);
  text.add("One");
  text.add("Two");
  text.add("Three");
  text.add("Four");
  trueType.setTextValues(text);
 

Parameters:
textValues - the text values

getTextValues

public List<String> getTextValues()
Returns the text values.

Returns:
the text values

setTextAngle

public void setTextAngle(double textAngle)
Sets the text angle value, default value is 0.

Parameters:
textAngle - text angle value in degrees. The angle of the symbol is calculated in a clockwise direction

getTextAngle

public double getTextAngle()
Returns the angle of the text

Returns:
text angle

setMarkerType

public void setMarkerType(int markerType)
Sets the WebTrueTypeMarkerSymbol's marker type value.
 For Example,
  WebTrueTypeMarkerSymbol trueType = new WebTrueTypeMarkerSymbol();
  trueType.setAngle(45.0);
  trueType.setWidth(100);
 
  trueType.setFontName("Arial");
  trueType.setFontStyle(WebTrueTypeMarkerSymbol.BOLDITALIC);
  trueType.setFontColor("255,255,255");
  trueType.setFontSize(30);
 
  trueType.setMarkerType(WebTrueTypeMarkerSymbol.SQUARE);
  trueType.setMarkerColor("0,0,255");
  trueType.addTextValue("ESRI");
 

The default marker type is WebTrueTypeMarkerSymbol.NONE

Parameters:
markerType - the marker type, possible values are NONE(DEFAULT), CIRCLE, SQUARE, TRIANGLE, CROSS or STAR
See Also:
getMarkerType()

getMarkerType

public int getMarkerType()
Returns the marker type.

Returns:
the marker type
See Also:
setMarkerType(int)

setMarkerColor

public void setMarkerColor(String markerColor)
Sets the marker color.
 For Example,
   trueType.setMarkerColor("0,0,255");
 

Parameters:
markerColor - the marker color, default value is "0,0,0"

getMarkerColor

public String getMarkerColor()
Returns the marker color.

Returns:
the marker color

setMarkerAngle

public void setMarkerAngle(double markerAngle)
sets the marker angle value, default value is 0.

Parameters:
markerAngle - angle of the marker

getMarkerAngle

public double getMarkerAngle()
Returns the marker angle.

Returns:
angle of the marker

setXOffset

public void setXOffset(double xOffset)
Sets the symbol x-axis offset.

Parameters:
xOffset - the x-axis offset.

getXOffset

public double getXOffset()
Returns the x-axis offset.

Returns:
the x-axis offset.

setYOffset

public void setYOffset(double yOffset)
Sets the symbol y-axis offset.

Parameters:
yOffset - the y-axis offset.

getYOffset

public double getYOffset()
Returns the y-axis offset.

Returns:
the y-axis offset.

toString

public String toString()
Overrides:
toString in class WebSymbol

hashCode

public int hashCode()
Overrides:
hashCode in class WebSymbol

equals

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