com.moximedia.aims
Class AimsTextObject

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

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

Implementation of ArcIMS TextObject for acetate layers. An AimsTextObject contains a label, text symbol, and locational information for user specified map text.

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
AimsTextObject()
          Creates new AimsText with no arguments
AimsTextObject(java.lang.String label)
          Creates new AimsTextObject with a label
AimsTextObject(java.lang.String label, double x, double y)
          Creates new AimsTextObject with a label and coordinates
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this object.
 int getAcetateObjectType()
          Gets the acetate object type.
 java.lang.String getLabel()
          Gets the label text for 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.
 AimsTextMarkerSymbol getSymbol()
          Gets the text symbol for the object
 int getUnits()
           
 java.lang.String getUnitsString()
           
 double getX()
           
 double getY()
           
 boolean hasProperties()
          Returns an indicator of whether the object has programmer defined properties.
 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 setLabel(java.lang.String label)
          Sets the label text for the object
 void setLocation(double x, double y)
          Sets the location coordinate for the 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 setProperty(java.lang.String name, java.lang.String value)
          Sets the value of a property (programmer defined).
 void setSymbol(AimsTextMarkerSymbol symbol)
          Sets the text 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 string describing this object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AimsTextObject

public AimsTextObject()
Creates new AimsText with no arguments


AimsTextObject

public AimsTextObject(java.lang.String label)
Creates new AimsTextObject with a label

Parameters:
label - The text label for the object

AimsTextObject

public AimsTextObject(java.lang.String label,
                      double x,
                      double y)
Creates new AimsTextObject with a label and coordinates

Parameters:
label - The text label for the object
x - The X position of the AimsTextObject
y - The Y position of the AimsTextObject
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 object.

Specified by:
clone in interface AimsAcetateObject
Returns:
An object that is a copy of this object. Note that the returned value is a java.lang.Object that must be cast to an AimsTextObject before use.

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)

setMinScaleFactor

public void setMinScaleFactor(double unitsPerPixel)

setMaxScale

public void setMaxScale(double scale,
                        AimsMap map)

setMaxScaleFactor

public void setMaxScaleFactor(double unitsPerPixel)

setLocation

public void setLocation(double x,
                        double y)
Sets the location coordinate for the object

Parameters:
x - The X position of the AimsTextObject
y - The Y position of the AimsTextObject

getX

public double getX()

getY

public double getY()

getLabel

public java.lang.String getLabel()
Gets the label text for the object

Returns:
The text label for the object

setLabel

public void setLabel(java.lang.String label)
Sets the label text for the object

Parameters:
label - The text label for the object

getSymbol

public AimsTextMarkerSymbol getSymbol()
Gets the text symbol for the object

Returns:
The text symbol for the object

setSymbol

public void setSymbol(AimsTextMarkerSymbol symbol)
Sets the text symbol for the object

Parameters:
symbol - The text symbol (AimsSimpleTextSymbol) for the object

toString

public java.lang.String toString()
Returns a string describing this object.

Returns:
A text description of this 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_TEXT.

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.