com.moximedia.aims
Class AimsCalloutTextObject

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

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

Implementation of an callout text object which can be placed in an Acetate layer of a map.

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
AimsCalloutTextObject()
          Creates a new callout text object with no arguments.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this object.
 int getAcetateObjectType()
          Gets the acetate object type.
 AimsEnvelope getExtent()
          Gets the extent of the object.
 java.lang.Object getObjectTag()
          Gets the object tag.
 AimsPoint getPoint()
          Gets the point object associated with this object.
 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.
 AimsPoint getShape()
          Gets the shape geometry of the object.
 int getUnits()
          Returns an enumerated value indicating the type of units, either AimsAcetateObject.ACETATE_OBJECT_UNITS_DATABASE or AimsAcetateObject.ACETATE_OBJECT_UNITS_PIXEL.
 java.lang.String getUnitsString()
          Returns a string indicating the type of units, either "database" or "pixel".
 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 setArrowPosition(AimsPoint pt)
          Sets the point associated with this object.
 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 setFontName(java.lang.String name)
          Sets the font name.
 void setFontSize(int size)
          Sets the font size.
 void setInset(double left, double bottom, double right, double top)
          Sets the spacing between the text and the sides of the box.
 void setLabel(java.lang.String label)
          Sets the label for the callout text object.
 void setLabelColor(AimsColor color)
          Sets the color of the label.
 void setLabelOffset(AimsPoint pt)
          Sets the point associated with this object.
 void setMaxScale(double scale, AimsMap map)
          Sets the maximum scale that this object will be displayed.
 void setMaxScaleFactor(double unitsPerPixel)
          Sets the maximum scale factor that this object will be displayed.
 void setMinScale(double scale, AimsMap map)
          Sets the minimum scale that this object will be displayed.
 void setMinScaleFactor(double unitsPerPixel)
          Sets the minimum scale factor that this object will be displayed.
 void setObjectTag(java.lang.Object tag)
          Sets an object tag for this object.
 void setPolygonSymbol(AimsSimplePolygonSymbol symbol)
          Sets the symbol used for drawing the callout box.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the value of a property (programmer defined).
 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 setting.
 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 toAxlString(AimsEnvironment env, AimsMap map)
          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

AimsCalloutTextObject

public AimsCalloutTextObject()
Creates a new callout text object with no arguments.

Method Detail

setInset

public void setInset(double left,
                     double bottom,
                     double right,
                     double top)
Sets the spacing between the text and the sides of the box.

Parameters:
left - The left side spacing, in pixels.
bottom - The bottom side spacing, in pixels.
right - The right side spacing, in pixels.
top - The top side spacing, in pixels.

setLabel

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

Parameters:
label - The text to appear in the callout.

setLabelColor

public void setLabelColor(AimsColor color)
Sets the color of the label.

Parameters:
color - An AimsColor object.

setFontName

public void setFontName(java.lang.String name)
Sets the font name.

Parameters:
name - The name of the font.

setFontSize

public void setFontSize(int size)
Sets the font size.

Parameters:
size - The font size, in points.

setPolygonSymbol

public void setPolygonSymbol(AimsSimplePolygonSymbol symbol)
Sets the symbol used for drawing the callout box.

Parameters:
symbol - The symbol used to draw the callout box.

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
Parameters:
tag - A programmer defined element to associate with this object.

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 AimsCalloutTextObject before use.

setMinScale

public void setMinScale(double scale,
                        AimsMap map)
Sets the minimum scale that this object will be displayed.

Parameters:
scale - The scale.
map - The map object to use to calculate scale.

setMinScaleFactor

public void setMinScaleFactor(double unitsPerPixel)
Sets the minimum scale factor that this object will be displayed.

Parameters:
unitsPerPixel - The scale factor.

setMaxScale

public void setMaxScale(double scale,
                        AimsMap map)
Sets the maximum scale that this object will be displayed.

Parameters:
scale - The scale.
map - The map object to use to calculate scale.

setMaxScaleFactor

public void setMaxScaleFactor(double unitsPerPixel)
Sets the maximum scale factor that this object will be displayed.

Parameters:
unitsPerPixel - The scale factor.

getPoint

public AimsPoint getPoint()
Gets the point object associated with this object.

Returns:
The point.

getExtent

public AimsEnvelope getExtent()
Gets the extent of the object.

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

setArrowPosition

public void setArrowPosition(AimsPoint pt)
Sets the point associated with this object.

Parameters:
pt - The point.

setLabelOffset

public void setLabelOffset(AimsPoint pt)
Sets the point associated with this object.

Parameters:
pt - The point.

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 setting. 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.

toAxlString

public java.lang.String toAxlString(AimsEnvironment env,
                                    AimsMap map)
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.

Parameters:
env - The environment object containing coordinate separators.
map - The map object that this object belongs to.
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_CALLOUTTEXT.

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.

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()
Returns an enumerated value indicating the type of units, either AimsAcetateObject.ACETATE_OBJECT_UNITS_DATABASE or AimsAcetateObject.ACETATE_OBJECT_UNITS_PIXEL.

Specified by:
getUnits in interface AimsAcetateObject
Returns:
The units enumeration value.

getUnitsString

public java.lang.String getUnitsString()
Returns a string indicating the type of units, either "database" or "pixel".

Returns:
The units string.

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.

getShape

public AimsPoint getShape()
Gets the shape geometry of the object.

Returns:
A geometry object representing the shape.

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.


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.