com.esri.aims.mtier.model.acetate
Class Polygon

java.lang.Object
  extended by com.esri.aims.mtier.model.acetate.Object
      extended by com.esri.aims.mtier.model.acetate.Polygon
All Implemented Interfaces:
AcetateElement, Shape, Serializable

public class Polygon
extends Object
implements Shape, Serializable

Renders a polygon as an acetate layer, or defines a polygon for use with a FeatureLayer's Filter object. The Polygon object extends the Object class from the acetate package.

See Also:
Serialized Form

Constructor Summary
Polygon()
          Constructs an instance of a Polygon object.
 
Method Summary
 void addRing(Ring obj)
          Adds the given Ring object to this collection.
 void clearRings()
          Clears all Ring objects from this collection.
 String getID()
          Returns the ID associated with this Polygon.
 String getName()
          Returns the name string associated with this Polygon object.
 Ring getRing(int index)
          Returns a Ring object by index from this collection.
 int getRingsCount()
          Returns the count of Ring objects in this collection.
 Symbol getSymbol()
          Returns the symbol object associated with this Polygon object.
 String getType()
          Returns the name string that defines the type of this acetate object.
 void removeRing(int index)
          Removes a Ring object by index from this collection.
 void setID(String value)
          Sets the given ID for this Polygon object.
 void setName(String value)
          Sets the given name string for this Polygon object.
 void setSymbol(Object object)
          Sets the given symbol object to the Polygon object for rendering.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon()
Constructs an instance of a Polygon object. Example: Polygon polygon = new Polygon();

Method Detail

getType

public String getType()
Returns the name string that defines the type of this acetate object.

Specified by:
getType in interface Shape
Specified by:
getType in class Object
Returns:
String

setID

public void setID(String value)
Sets the given ID for this Polygon object. Example: polygon.setID("polygon-1");

Parameters:
value - the ID value.
See Also:
getID()

getID

public String getID()
Returns the ID associated with this Polygon. Example: String id = polygon.getID();

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

setName

public void setName(String value)
Sets the given name string for this Polygon object. Example: polygon.setName("polygon");

Parameters:
value - the name value.
See Also:
getName()

getName

public String getName()
Returns the name string associated with this Polygon object. Example: String name = polygon.getName();

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

setSymbol

public void setSymbol(Object object)
Sets the given symbol object to the Polygon object for rendering. Example:
 SimplePolygonSymbol simplePolygon = new SimplePolygonSymbol();
 simplePolygon.setFillColor("255,0,0");
 polygon.setSymbol(simplePolygon);
 

Parameters:
object - the symbol object.
See Also:
getSymbol()

getSymbol

public Symbol getSymbol()
Returns the symbol object associated with this Polygon object. Example:
 SimplePolygonSymbol simplePolygon = (SimplePolygonSymbol)polygon.getSymbol();
 

Returns:
Object
See Also:
setSymbol(java.lang.Object)

addRing

public void addRing(Ring obj)
Adds the given Ring object to this collection. Example:
 Ring ring = new Ring();
 Point pnt = new Point();
 pnt.setX(-125.00);
 pnt.setY(45.0);
 Points points = new Points();
 points.addPointObject(pnt);
 ring.setPoints(points);
 polygon.addRing(ring);
 

Parameters:
obj - the Ring object to add.
See Also:
getRing(int), removeRing(int), clearRings()

getRing

public Ring getRing(int index)
Returns a Ring object by index from this collection. Example: Ring ring = polygon.getRing(0);

Parameters:
index - the item in the collection.
Returns:
Ring
See Also:
addRing(com.esri.aims.mtier.model.acetate.Ring)

removeRing

public void removeRing(int index)
Removes a Ring object by index from this collection. Example: polygon.removeRing(0);

Parameters:
index - the item to remove.
See Also:
addRing(com.esri.aims.mtier.model.acetate.Ring), clearRings()

getRingsCount

public int getRingsCount()
Returns the count of Ring objects in this collection. Example: int ringCount = polygon.getRingsCount();

Returns:
int

clearRings

public void clearRings()
Clears all Ring objects from this collection. Example: polygon.clearRings();

See Also:
removeRing(int), addRing(com.esri.aims.mtier.model.acetate.Ring)