com.moximedia.aims
Class AimsPolylineObject

java.lang.Object
  extended bycom.moximedia.aims.AimsPolylineObject
All Implemented Interfaces:
AimsAcetateObject, java.lang.Cloneable, java.io.Serializable

public class AimsPolylineObject
extends java.lang.Object
implements AimsAcetateObject, java.io.Serializable, java.lang.Cloneable

Implementation of ArcIMS POLYLINE object that can be put in an acetate layer of a map (version 4.0 and above). For regular uses of polylines, use AimsPolyline instead.

Author:
Doug Cates - www.moximedia.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.moximedia.aims.AimsAcetateObject
ACETATE_OBJECT_TYPE_CALLOUTTEXT, ACETATE_OBJECT_TYPE_ENVELOPE, ACETATE_OBJECT_TYPE_LABELLEDPOINT, ACETATE_OBJECT_TYPE_LINE, ACETATE_OBJECT_TYPE_NORTHARROW, ACETATE_OBJECT_TYPE_POINT, ACETATE_OBJECT_TYPE_POLYGON, ACETATE_OBJECT_TYPE_POLYLINE, ACETATE_OBJECT_TYPE_SCALEBAR, ACETATE_OBJECT_TYPE_TEXT, ACETATE_OBJECT_UNITS_DATABASE, ACETATE_OBJECT_UNITS_PIXEL
 
Constructor Summary
AimsPolylineObject()
          Creates new AimsPolylineObject
AimsPolylineObject(AimsPoints pts)
          Creates new AimsPolylineObject from a points object
AimsPolylineObject(AimsPolyline polyline)
          Creates new AimsPolylineObject from a polyline
 
Method Summary
 java.lang.Object clone()
           
 void densify(double distance)
          Densifies the points in the shape by a distance.
 void generalize(double distance)
          Generalizes the points in the shape by a distance.
 int getAcetateObjectType()
          Gets the acetate object type.
 AimsEnvelope getExtent()
          Returns the extent of the object, or null if the polyline has no points.
 java.lang.Object getObjectTag()
          Gets the object tag.
 java.lang.String getProperty(java.lang.String name)
          Gets the value of a property.
 java.util.Set getPropertyNames()
          Returns a Set containing the property names.
 AimsPolyline getShape()
          Returns the polyline shape associated with this object.
 int getUnits()
           
 java.lang.String getUnitsString()
           
 boolean hasProperties()
          Returns an indicator of whether the object has programmer defined properties.
 boolean intersects(AimsShapeObject shape)
          Returns an indicator whether this object intersects the specified geometry.
 void offsetBy(AimsPoint offset)
          Offsets the points in the polyline by the x and y in a point.
 void setAxlAttribute(java.lang.String tag, java.lang.String name, java.lang.String value)
          Sets one of the attributes of this object using a string value.
 void setCoordsys(AimsCoordsys coordsys)
          Sets the coordsys for this object.
 void setMaxScale(double scale, AimsMap map)
           
 void setMaxScaleFactor(double unitsPerPixel)
           
 void setMinScale(double scale, AimsMap map)
           
 void setMinScaleFactor(double unitsPerPixel)
           
 void setObjectTag(java.lang.Object tag)
          Sets an object tag for this object.
 void setPoints(AimsPoints points)
          Sets the points of the polyline object.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the value of a property (programmer defined).
 void setShape(AimsPolyline shape)
          Sets the polyline shape associated with this object.
 void setSymbol(AimsHashLineSymbol sym)
          Sets the symbol for the object.
 void setSymbol(AimsRasterMarkerSymbol sym)
          Sets the symbol for the object.
 void setSymbol(AimsSimpleLineSymbol sym)
          Sets the symbol for the object.
 void setSymbol(AimsSimpleMarkerSymbol sym)
          Sets the symbol for the object.
 void setSymbol(AimsTrueTypeMarkerSymbol sym)
          Sets the symbol for the object.
 void setUnits(int units)
          Sets the units of the acetate object.
 void setUnits(java.lang.String units)
          Sets the units of the acetate object.
 java.lang.String toAxlString()
          Returns the AXL string to refresh this object, using the default environment coordinate separators.
 java.lang.String toAxlString(AimsEnvironment env)
          Returns the AXL string to refresh this object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AimsPolylineObject

public AimsPolylineObject()
Creates new AimsPolylineObject


AimsPolylineObject

public AimsPolylineObject(AimsPolyline polyline)
Creates new AimsPolylineObject from a polyline

Parameters:
polyline - The polyline to use for this object.

AimsPolylineObject

public AimsPolylineObject(AimsPoints pts)
Creates new AimsPolylineObject from a points object

Parameters:
pts - The pts to use for this object.
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String name)
Gets the value of a property.

Specified by:
getProperty in interface AimsAcetateObject
Parameters:
name - The property name
Returns:
The property value, or null.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets the value of a property (programmer defined).

Specified by:
setProperty in interface AimsAcetateObject
Parameters:
name - The property name
value - The property value.

getPropertyNames

public java.util.Set getPropertyNames()
Returns a Set containing the property names.

Specified by:
getPropertyNames in interface AimsAcetateObject
Returns:
The set containing the names, or null.

hasProperties

public boolean hasProperties()
Returns an indicator of whether the object has programmer defined properties.

Specified by:
hasProperties in interface AimsAcetateObject
Returns:
True if properties exist, otherwise false.

setObjectTag

public void setObjectTag(java.lang.Object tag)
Sets an object tag for this object.

Specified by:
setObjectTag in interface AimsAcetateObject

getObjectTag

public java.lang.Object getObjectTag()
Gets the object tag.

Specified by:
getObjectTag in interface AimsAcetateObject
Returns:
The object tag, or null if there isn't one set.

getShape

public AimsPolyline getShape()
Returns the polyline shape associated with this object.

Returns:
The polyline shape.

setShape

public void setShape(AimsPolyline shape)
Sets the polyline shape associated with this object.

Parameters:
shape - The polyline shape.

setCoordsys

public void setCoordsys(AimsCoordsys coordsys)
Sets the coordsys for this object.

Parameters:
coordsys - The coordsys for this object.

getExtent

public AimsEnvelope getExtent()
Returns the extent of the object, or null if the polyline has no points.

Specified by:
getExtent in interface AimsAcetateObject
Returns:
An AimsEnvelope containing the extent. Note: Returns null if this object uses pixels for units.

densify

public void densify(double distance)
Densifies the points in the shape by a distance.

Parameters:
distance - The densify distance.

generalize

public void generalize(double distance)
Generalizes the points in the shape by a distance.

Parameters:
distance - The generalize distance.

offsetBy

public void offsetBy(AimsPoint offset)
Offsets the points in the polyline by the x and y in a point.

Parameters:
offset - An AimsPoint object containing the offset.

setMinScale

public void setMinScale(double scale,
                        AimsMap map)

setMinScaleFactor

public void setMinScaleFactor(double unitsPerPixel)

setMaxScale

public void setMaxScale(double scale,
                        AimsMap map)

setMaxScaleFactor

public void setMaxScaleFactor(double unitsPerPixel)

setPoints

public void setPoints(AimsPoints points)
Sets the points of the polyline object.

Parameters:
points - An AimsPoints object containing the polyline points.

setSymbol

public void setSymbol(AimsHashLineSymbol sym)
Sets the symbol for the object.


setSymbol

public void setSymbol(AimsRasterMarkerSymbol sym)
Sets the symbol for the object.


setSymbol

public void setSymbol(AimsSimpleLineSymbol sym)
Sets the symbol for the object.


setSymbol

public void setSymbol(AimsSimpleMarkerSymbol sym)
Sets the symbol for the object.


setSymbol

public void setSymbol(AimsTrueTypeMarkerSymbol sym)
Sets the symbol for the object.


toAxlString

public java.lang.String toAxlString()
Returns the AXL string to refresh this object, using the default environment coordinate separators. This method is not typically used by the application programmer.

Specified by:
toAxlString in interface AimsAcetateObject
Returns:
The AXL string to refresh this object.

toAxlString

public java.lang.String toAxlString(AimsEnvironment env)
Returns the AXL string to refresh this object. This method is not typically used by the application programmer.

Specified by:
toAxlString in interface AimsAcetateObject
Returns:
The AXL string to refresh this object.

clone

public java.lang.Object clone()
Specified by:
clone in interface AimsAcetateObject

getAcetateObjectType

public int getAcetateObjectType()
Gets the acetate object type.

Specified by:
getAcetateObjectType in interface AimsAcetateObject
Returns:
AimsAcetateObject.ACETATE_OBJECT_TYPE_POLYLINE.

setUnits

public void setUnits(java.lang.String units)
Sets the units of the acetate object. Valid values are "pixel" and "database".

Parameters:
units - The units of the acetate object. Valid values are "pixel" and "database".

setUnits

public void setUnits(int units)
Sets the units of the acetate object.

Specified by:
setUnits in interface AimsAcetateObject
Parameters:
units - The units of the acetate object. Valid values are AimsAcetateObject.ACETATE_OBJECT_UNITS_DATABASE or AimsAcetateObject.ACETATE_OBJECT_UNITS_PIXEL.

getUnits

public int getUnits()
Specified by:
getUnits in interface AimsAcetateObject

getUnitsString

public java.lang.String getUnitsString()

setAxlAttribute

public void setAxlAttribute(java.lang.String tag,
                            java.lang.String name,
                            java.lang.String value)
Sets one of the attributes of this object using a string value. This method should only be called from the SAX event handler.

Parameters:
tag - The AXL element tag containing this attribute.
name - The AXL attribute name.
value - The AXL attribute value.

intersects

public boolean intersects(AimsShapeObject shape)
Returns an indicator whether this object intersects the specified geometry.

Specified by:
intersects in interface AimsAcetateObject
Parameters:
shape - The geometry to test.
Returns:
True if intersects, otherwise false. Note: always returns false for pixel based objects.


Internet Mapping Framework for ArcIMS Java Object Model API (v5.1.00)
Copyright © 2006 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.