com.esri.core.symbol
Class LineSymbol

java.lang.Object
  extended by com.esri.core.symbol.LineSymbol
All Implemented Interfaces:
Symbol, Serializable
Direct Known Subclasses:
SimpleLineSymbol

public abstract class LineSymbol
extends Object
implements Symbol

Base class for line symbols. Use its subclasses (for example: SimpleLineSymbol) directly to draw lines on the graphics layer.

See Also:
Serialized Form

Constructor Summary
LineSymbol()
          Instantiates an empty object of LineSymbol.
LineSymbol(org.codehaus.jackson.JsonNode node)
          Instantiates an object of LineSymbol from a JsonNode.
 
Method Summary
 boolean equals(Object obj)
           
 int getAlpha()
          Helper to getColor() that just returns the color's alpha value.
 int getColor()
          Returns the color of the line.
 float getWidth()
          Returns the line width in pixels.
 int hashCode()
           
 boolean isAntiAlias()
          AntiAliasing smoothes out the edges of what is being drawn, but is has no impact on the interior of the shape.
 void setAlpha(int alpha)
          Sets the symbol transparency.
 void setAntiAlias(boolean antiAlias)
          AntiAliasing smooths out the edges of what is being drawn, but is has no impact on the interior of the shape.
 void setColor(int color)
          Sets the color of the line.
 void setWidth(float width)
          Sets the line width in pixels.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.core.symbol.Symbol
copy, toJson
 

Constructor Detail

LineSymbol

public LineSymbol(org.codehaus.jackson.JsonNode node)
           throws Exception
Instantiates an object of LineSymbol from a JsonNode.

Parameters:
node - the LineSymbol node.
Throws:
Exception

LineSymbol

public LineSymbol()
Instantiates an empty object of LineSymbol.

Method Detail

getColor

public int getColor()
Returns the color of the line. The color is a 32bit value containing alpha as well as RGB. This 32bit value is not pre-multiplied, meaning that its alpha can be any value, regardless of the values of RGB. See the Color class for more details.

Returns:
the color in RGB color value.

setColor

public void setColor(int color)
Sets the color of the line. The color is a 32bit value containing alpha as well as RGB. This 32bit value is not pre-multiplied, meaning that its alpha can be any value, regardless of the values of RGB. See the Color class for more details.

Parameters:
color - the color in ARGB color value.

getWidth

public float getWidth()
Returns the line width in pixels.

Returns:
Returns the line width in pixels.

setWidth

public void setWidth(float width)
Sets the line width in pixels.

Parameters:
width - the line width in pixels.

getAlpha

public int getAlpha()
Helper to getColor() that just returns the color's alpha value. This is the same as calling getColor() >>> 24. It always returns a value between 0 (completely transparent) and 255 (completely opaque).

Returns:
the alpha component of the symbol's color.

setAlpha

public void setAlpha(int alpha)
Sets the symbol transparency.

Parameters:
alpha - the alpha component of the symbol's color.
See Also:
getAlpha()

isAntiAlias

public boolean isAntiAlias()
AntiAliasing smoothes out the edges of what is being drawn, but is has no impact on the interior of the shape.


setAntiAlias

public void setAntiAlias(boolean antiAlias)
AntiAliasing smooths out the edges of what is being drawn, but is has no impact on the interior of the shape.

Parameters:
antiAlias - set to true to enable the AntiAliasing, or false otherwise.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2012. All Rights Reserved.