com.moximedia.ows.acetate
Class AcetateEnvelope

java.lang.Object
  extended bycom.moximedia.ows.acetate.AcetateEnvelope
All Implemented Interfaces:
AcetateObject, java.lang.Cloneable, java.io.Serializable

public class AcetateEnvelope
extends java.lang.Object
implements AcetateObject, java.io.Serializable, java.lang.Cloneable

A graphic object that can be drawn onto an acetate layer of an IMF map. TODO: Add pattern symbolization.

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

Constructor Summary
AcetateEnvelope()
          Creates new AcetateEnvelope.
AcetateEnvelope(double x1, double y1, double x2, double y2)
          Creates new AcetateEnvelope using four double values
AcetateEnvelope(Envelope env)
          Creates new AcetateEnvelope using an envelope.
 
Method Summary
 java.lang.Object clone()
          Creates a clone of this object.
 void draw(java.awt.Graphics2D graphics, java.awt.geom.AffineTransform pageTransform, java.util.Locale locale)
          Draws the graphic on the specified graphics device.
 AcetateEnvelope getCopy()
          Creates a copy of this object.
 java.lang.String getName()
          Gets the progammer specified name for this object.
 java.lang.Object getObjectTag()
          Gets the object tag.
 int getObjectType()
          Gets the object type enumerator.
 java.lang.String getProperty(java.lang.String name)
          Gets the value of a property.
 java.lang.String[] getPropertyNames()
          Returns a Set containing the property names.
 Geometry getShape()
          Gets the geometry of this object.
 boolean hasProperties()
          Returns an indicator of whether the object has programmer defined properties.
 boolean isNamed(java.lang.String name)
          Returns an indicator of whether this object is named the same as the parameter.
 void setEnvelope(double x1, double y1, double x2, double y2)
          Sets the rectangle to be drawn.
 void setEnvelope(Envelope env)
          Sets the rectangle to be drawn.
 void setFillColor(java.awt.Color color)
          Sets the fill color of this object.
 void setName(java.lang.String name)
          Sets a name for this object.
 void setObjectTag(java.lang.Object tag)
          Sets an object tag for this object.
 void setOutlineColor(java.awt.Color color)
          Sets the outline color of this object.
 void setOutlineWidth(float width)
          Sets the line width of the outline.
 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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcetateEnvelope

public AcetateEnvelope()
Creates new AcetateEnvelope.


AcetateEnvelope

public AcetateEnvelope(Envelope env)
Creates new AcetateEnvelope using an envelope.

Parameters:
env - The envelope.

AcetateEnvelope

public AcetateEnvelope(double x1,
                       double y1,
                       double x2,
                       double y2)
Creates new AcetateEnvelope using four double values

Parameters:
x1 - The minimum X value.
y1 - The minimum Y value.
x2 - The maximum X value.
y2 - The maximum Y value.
Method Detail

clone

public java.lang.Object clone()
Creates a clone of this object. Must be cast back to the correct object type before using.

Specified by:
clone in interface AcetateObject
Returns:
The clone of this object.

getCopy

public AcetateEnvelope getCopy()
Creates a copy of this object.

Returns:
The copy of this object.

draw

public void draw(java.awt.Graphics2D graphics,
                 java.awt.geom.AffineTransform pageTransform,
                 java.util.Locale locale)
Draws the graphic on the specified graphics device.

Specified by:
draw in interface AcetateObject
Parameters:
graphics - The graphics.
pageTransform - The page to map coordinate transformation matrix.
locale - The locale, null OK, not used by this routine.

setEnvelope

public void setEnvelope(Envelope env)
Sets the rectangle to be drawn.

Parameters:
env - The rectangle.

setEnvelope

public void setEnvelope(double x1,
                        double y1,
                        double x2,
                        double y2)
Sets the rectangle to be drawn.

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.

setFillColor

public void setFillColor(java.awt.Color color)
Sets the fill color of this object. For transparent fills, use null.

Parameters:
color - The fill color.

isNamed

public boolean isNamed(java.lang.String name)
Returns an indicator of whether this object is named the same as the parameter.

Specified by:
isNamed in interface AcetateObject
Parameters:
name - The name.
Returns:
True if the name is the same, otherwise false.

setName

public void setName(java.lang.String name)
Sets a name for this object.

Parameters:
name - A programmer specified name for this object.

getName

public java.lang.String getName()
Gets the progammer specified name for this object.

Specified by:
getName in interface AcetateObject
Returns:
The name, or "unnamed" if there isn't one set.

setObjectTag

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

Specified by:
setObjectTag in interface AcetateObject
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 AcetateObject
Returns:
The object tag, or null if there isn't one set.

getObjectType

public int getObjectType()
Gets the object type enumerator.

Specified by:
getObjectType in interface AcetateObject
Returns:
AcetateObjectType.ACETATE_OBJECT_TYPE_ENVELOPE.

setOutlineColor

public void setOutlineColor(java.awt.Color color)
Sets the outline color of this object. For no outline, use null.

Parameters:
color - The outline color.

setOutlineWidth

public void setOutlineWidth(float width)
Sets the line width of the outline.

Parameters:
width - The line width.

getProperty

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

Specified by:
getProperty in interface AcetateObject
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 AcetateObject
Parameters:
name - The property name
value - The property value.

getPropertyNames

public java.lang.String[] getPropertyNames()
Returns a Set containing the property names.

Specified by:
getPropertyNames in interface AcetateObject
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 AcetateObject
Returns:
True if properties exist, otherwise false.

getShape

public Geometry getShape()
Gets the geometry of this object.

Specified by:
getShape in interface AcetateObject
Returns:
The geometry.

setUnits

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

Parameters:
units - The units of the acetate object, either AcetateObjectUnitsType.ACETATE_OBJECT_UNITS_PIXEL or AcetateObjectUnitsType.ACETATE_OBJECT_UNITS_DATABASE


Internet Mapping Framework for OpenGIS Java Object Model API (v1.3.007)
Copyright © 2005 Moxi Media Inc. and Province of British Columbia. All Rights Reserved.