com.moximedia.aims
Class AimsEnvelopeObject

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

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

Implementation of an ArcIMS envelope object which can be placed in an Acetate layer of a map. The AimsEnvelopeObject contains a symbol so that it can be placed on an acetate layer. If you need an Envelope for non-acetate purposes, use an AimsEnvelope instead.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.moximedia.aims.AimsAcetateObject
ACETATE_OBJECT_TYPE_ENVELOPE, 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
AimsEnvelopeObject()
          Creates a new AimsEnvelopeObject with no arguments.
AimsEnvelopeObject(AimsEnvelope env)
          Creates a new AimsEnvelopeObject with an existing envelope argument.
AimsEnvelopeObject(double x1, double y1, double x2, double y2)
          Creates an AimsEnvelopeObject using the minimum and maximum coordinates.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this envelope.
 int getAcetateObjectType()
          Gets the acetate object type.
 AimsEnvelope getEnvelope()
          Gets the envelope of the object.
 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.
 int getUnits()
           
 java.lang.String getUnitsString()
           
 boolean hasProperties()
          Returns an indicator of whether the object has programmer defined properties.
 void offsetBy(AimsPoint offset)
          Offsets the points in the line by the x and y in a point.
 void setCoordsys(AimsCoordsys coordsys)
          Sets the coordsys for this object.
 void setEnvelope(AimsEnvelope env)
          Sets the envelope of the object.
 void setMaxScale(double scale, AimsMap map)
          Sets the value of attribute maxScale
 void setMaxScaleFactor(double unitsPerPixel)
          Sets the value of attribute maxScaleFactor
 void setMinScale(double scale, AimsMap map)
          Sets the value of attribute minScale
 void setMinScaleFactor(double unitsPerPixel)
          Sets the value of attribute minScaleFactor
 void setObjectTag(java.lang.Object tag)
          Sets an object tag for this object.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the value of a property (programmer defined).
 void setSymbol(AimsGradientFillSymbol sym)
          Sets the symbol for the object.
 void setSymbol(AimsHashLineSymbol sym)
          Sets the symbol for the object.
 void setSymbol(AimsRasterFillSymbol 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(AimsSimplePolygonSymbol 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, using the coordinate separators in the specified environnment setting.
 java.lang.String toString()
          Returns a text representation of of this object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AimsEnvelopeObject

public AimsEnvelopeObject()
Creates a new AimsEnvelopeObject with no arguments.


AimsEnvelopeObject

public AimsEnvelopeObject(double x1,
                          double y1,
                          double x2,
                          double y2)
Creates an AimsEnvelopeObject using the minimum and maximum coordinates. Note that the minimum and maximums will be swapped if they are in the wrong positions, so you don't have to worry about this in your code.

Parameters:
x1 - The minimum X coordinate value
y1 - The minimum Y coordinate value
x2 - The maximum X coordinate value
y2 - The maximum Y coordinate value

AimsEnvelopeObject

public AimsEnvelopeObject(AimsEnvelope env)
Creates a new AimsEnvelopeObject with an existing envelope argument.

Parameters:
env - An envelope to set the envelope of 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.

clone

public java.lang.Object clone()
Creates a copy of this envelope.

Specified by:
clone in interface AimsAcetateObject
Returns:
An object that is a copy of this envelope. The object must be cast to an AimsEnvelopeObject before use.

offsetBy

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

Parameters:
offset - An AimsPoint object containing the offset.

setCoordsys

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

Parameters:
coordsys - The coordsys for this object.

setMinScale

public void setMinScale(double scale,
                        AimsMap map)
Sets the value of attribute minScale

Parameters:
scale - The map scale.
map - The map used to calculate the scale factor.

setMinScaleFactor

public void setMinScaleFactor(double unitsPerPixel)
Sets the value of attribute minScaleFactor

Parameters:
unitsPerPixel - The value of minScaleFactor.

setMaxScale

public void setMaxScale(double scale,
                        AimsMap map)
Sets the value of attribute maxScale

Parameters:
scale - The map scale.
map - The map used to calculate the scale factor.

setMaxScaleFactor

public void setMaxScaleFactor(double unitsPerPixel)
Sets the value of attribute maxScaleFactor

Parameters:
unitsPerPixel - The value of maxScaleFactor.

getEnvelope

public AimsEnvelope getEnvelope()
Gets the envelope of the object.

Returns:
An AimsEnvelope object

setEnvelope

public void setEnvelope(AimsEnvelope env)
Sets the envelope of the object.

Parameters:
env - An AimsEnvelope object

setSymbol

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

Parameters:
sym - The the symbol for the object.

setSymbol

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

Parameters:
sym - The the symbol for the object.

setSymbol

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

Parameters:
sym - The the symbol for the object.

setSymbol

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

Parameters:
sym - The the symbol for the object.

setSymbol

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

Parameters:
sym - The the symbol for the object.

setSymbol

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

Parameters:
sym - The the symbol for the object.

setSymbol

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

Parameters:
sym - The the symbol for the object.

setSymbol

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

Parameters:
sym - The the symbol for the object.

toString

public java.lang.String toString()
Returns a text representation of of this object.

Returns:
A string describing 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, using the coordinate separators in the specified environnment setting. This method is not typically used by the application programmer.

Specified by:
toAxlString in interface AimsAcetateObject
Parameters:
env - The environment object containing coordinate separators.
Returns:
The AXL string to refresh this object.

getAcetateObjectType

public int getAcetateObjectType()
Gets the acetate object type.

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

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()