ecologylab.xml.library.geom
Class Ellipse2DDoubleState

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.xml.ElementState
          extended by ecologylab.xml.library.geom.RectangularShape
              extended by ecologylab.xml.library.geom.Ellipse2DDoubleState
All Implemented Interfaces:
OptimizationTypes, XMLTranslationExceptionTypes, java.awt.Shape

public class Ellipse2DDoubleState
extends RectangularShape

Encapsulates a Ellipse2D.Double for use in translating to/from XML. ***WARNING!!!*** Performing transformations (such as setFrame()) on the result of shape() will cause this object to become out of synch with its underlying Ellipse2D.Double object. While this will have no bad ramifications for this, it MAY have ramifications for what you INTENDED to do. Essentially, changes to the returned Shape will NOT be reflected in the XML produced by this. If other transformation methods are required, either notify me, or implement them yourself. :D Accessor methods (such as contains()) on the result of getEllipse() are fine.

Author:
Zachary O. Toups (toupsz@cs.tamu.edu)

Nested Class Summary
 
Nested classes/interfaces inherited from class ecologylab.xml.ElementState
ElementState.ClassToCollectionMap, ElementState.DeclarationStyle, ElementState.xml_attribute, ElementState.xml_class, ElementState.xml_classes, ElementState.xml_collection, ElementState.xml_leaf, ElementState.xml_map, ElementState.xml_nested, ElementState.xml_tag
 
Field Summary
protected  java.awt.geom.Ellipse2D.Double shape
           
 
Fields inherited from class ecologylab.xml.library.geom.RectangularShape
h, w, x, y
 
Fields inherited from class ecologylab.xml.ElementState
CDATA, ESTIMATE_CHARS_PER_FIELD, FLOATING_PRECISION_OFF, MARSHALLING_PARAMS, NORMAL, UTF16, UTF16_LE, UTF8, XML_FILE_HEADER
 
Fields inherited from interface ecologylab.xml.OptimizationTypes
BAD_FIELD, COLLECTION_ELEMENT, COLLECTION_SCALAR, IGNORED_ATTRIBUTE, IGNORED_ELEMENT, LEAF_NODE_VALUE, MAP_ELEMENT, MAP_SCALAR, NAME_SPACE_ATTRIBUTE, NAME_SPACE_LEAF_NODE, NAME_SPACE_MASK, NAME_SPACE_NESTED_ELEMENT, NAMESPACE_IGNORED_ELEMENT, NAMESPACE_TRIAL_ELEMENT, OTHER_NESTED_ELEMENT, REGULAR_ATTRIBUTE, REGULAR_NESTED_ELEMENT, ROOT, UNSET_TYPE, XMLNS_ATTRIBUTE, XMLNS_IGNORED
 
Fields inherited from interface ecologylab.xml.XMLTranslationExceptionTypes
FILE_NOT_FOUND, IO_EXCEPTION, NULL_PURL, UNKNOWN
 
Constructor Summary
Ellipse2DDoubleState()
           
Ellipse2DDoubleState(double x, double y, double width, double height)
           
 
Method Summary
 boolean contains(double x, double y)
           
 boolean contains(double x, double y, double w, double h)
           
 boolean contains(java.awt.geom.Point2D p)
           
 boolean contains(java.awt.geom.Rectangle2D r)
           
 java.awt.Rectangle getBounds()
           
 java.awt.geom.Rectangle2D getBounds2D()
           
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
           
 java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
           
 boolean intersects(double x, double y, double w, double h)
           
 boolean intersects(java.awt.geom.Rectangle2D r)
           
 java.awt.geom.Ellipse2D.Double shape()
          Returns an Ellipse2D object represented by this.
 
Methods inherited from class ecologylab.xml.library.geom.RectangularShape
getHeight, getWidth, getX, getY, setFrame
 
Methods inherited from class ecologylab.xml.ElementState
addNestedElement, addNestedElement, appendTextNodeString, buildDOM, buildDOM, buildDOM, buildDOM, buildDOM, buildDOMFromXMLCharSequence, buildDOMFromXMLString, checkAnnotation, convertNameStyles, createChildHook, fieldToXMLOptimizations, floatingPrecision, getCollection, getElementStateById, getMap, getNestedNameSpace, getTextNodeString, leafElementFieldNames, lookupNestedNameSpace, optimizations, parent, postTranslationProcessingHook, preTranslationProcessingHook, recycle, setDeclarationStyle, setFieldUsingTypeRegistry, setFloatingPrecision, setParent, setUseDOMForTranslateTo, translateFromXML, translateFromXML, translateFromXML, translateFromXML, translateFromXML, translateFromXMLCharSequence, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOM, translateFromXMLDOMCharSequence, translateFromXMLDOMCharSequence, translateFromXMLRootNode, translateFromXMLSAX, translateFromXMLSAX, translateFromXMLSAX, translateFromXMLSAX, translateFromXMLSAX, translateToDOM, translateToXML, translateToXML, translateToXML, translateToXML, writePrettyXML, writePrettyXML, writePrettyXML
 
Methods inherited from class ecologylab.generic.Debug
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

shape

protected java.awt.geom.Ellipse2D.Double shape
Constructor Detail

Ellipse2DDoubleState

public Ellipse2DDoubleState()

Ellipse2DDoubleState

public Ellipse2DDoubleState(double x,
                            double y,
                            double width,
                            double height)
Method Detail

shape

public java.awt.geom.Ellipse2D.Double shape()
Returns an Ellipse2D object represented by this.

Specified by:
shape in class RectangularShape

contains

public boolean contains(java.awt.geom.Point2D p)

contains

public boolean contains(java.awt.geom.Rectangle2D r)

contains

public boolean contains(double x,
                        double y)

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)

getBounds

public java.awt.Rectangle getBounds()

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()

getPathIterator

public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)

getPathIterator

public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at,
                                                  double flatness)

intersects

public boolean intersects(java.awt.geom.Rectangle2D r)

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)