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.
 Color getColor()
          Returns the color of the line.
 float getWidth()
          Returns the line width in pixels.
 int hashCode()
           
 void setAlpha(int alpha)
          Sets the symbol transparency.
 void setColor(Color color)
          Sets the color of the line.
 void setWidth(float width)
          Sets the line width in pixels.
 
Methods inherited from class java.lang.Object
clone, finalize, 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 Color 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(Color 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()

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.