edu.umd.cs.jazz.component
Class ZPath

java.lang.Object
  |
  +--edu.umd.cs.jazz.ZSceneGraphObject
        |
        +--edu.umd.cs.jazz.ZVisualComponent
              |
              +--edu.umd.cs.jazz.component.ZBasicVisualComponent
                    |
                    +--edu.umd.cs.jazz.component.ZShape
                          |
                          +--edu.umd.cs.jazz.component.ZPath
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, ZAppearance, ZFillColor, ZFillPaint, ZPenColor, ZPenPaint, ZSerializable, ZStroke

public class ZPath
extends ZShape

ZPath is a graphic object that represents combination of lines and curves that can be specified GeneralPath. Please see java.awt.geon.GeneralPath for detail

Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.

Author:
Benjamin B. Bederson
, Jesse Grosjean
See Also:
Serialized Form

Field Summary
protected  java.awt.geom.GeneralPath path
           
 
Fields inherited from class edu.umd.cs.jazz.component.ZBasicVisualComponent
absPenWidth, DEFAULT_ABS_PEN_WIDTH, DEFAULT_FILL_PAINT, DEFAULT_PEN_PAINT, DEFAULT_PEN_WIDTH, DEFAULT_STROKE, fillPaint, penPaint, penWidth, stroke
 
Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject
bounds, inTransaction, invalidBounds, invalidVolatileBounds, listenerList, volatileBounds, volatileBounds_DEFAULT
 
Constructor Summary
ZPath()
          Constructs a new Path
ZPath(java.awt.geom.GeneralPath path)
          Constructs a new Path
 
Method Summary
protected  java.lang.Object duplicateObject()
          Returns a clone of this object.
 double getHeight()
          Return height of rectangle.
 java.awt.geom.GeneralPath getPath()
          Return the path.
 java.awt.geom.Rectangle2D getRect()
          Return rectangle.
 java.awt.Shape getShape()
          Return the shape.
 double getWidth()
          Return width of rectangle.
 double getX()
          Return x-coord of rectangle.
 double getY()
          Return y-coord of rectangle.
 void setPath(java.awt.geom.GeneralPath aPath)
          Set the path.
 void setState(java.lang.String fieldType, java.lang.String fieldName, java.lang.Object fieldValue)
          Set some state of this object as it gets read back in.
 void writeObject(ZObjectOutputStream out)
          Write out all of this object's state.
 
Methods inherited from class edu.umd.cs.jazz.component.ZShape
computeBounds, getFrame, getStrokeTransformForAbsPenWidth, pick, pickStroke, render
 
Methods inherited from class edu.umd.cs.jazz.component.ZBasicVisualComponent
getAbsPenWidth, getFillColor, getFillPaint, getPenColor, getPenPaint, getPenWidth, getPenWidthForCurrentContext, getStroke, setAbsPenWidth, setFillColor, setFillPaint, setPenColor, setPenPaint, setPenWidth, setStroke
 
Methods inherited from class edu.umd.cs.jazz.ZVisualComponent
addParent, getNumParents, getParents, getParentsReference, getRoot, paint, pickBounds, removeParent, repaint, repaint, trimToSize, updateBounds, updateObjectReferences, updateVolatility, writeObjectRecurse
 
Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject
addClientProperty, addMouseListener, addMouseMotionListener, clone, computeVolatileBounds, dump, endTransaction, fireEvent, fireMouseEvent, getBounds, getBoundsReference, getClientProperty, getHandles, getListenerList, getVolatileBounds, hasLisenerOfType, hasListenerOfType, hasMouseListener, markInTransaction, markNotInTransaction, processMouseEvent, putClientProperty, removeEventListener, removeMouseListener, removeMouseMotionListener, reshape, setBounds, setVolatileBounds, startTransaction
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

path

protected transient java.awt.geom.GeneralPath path
Constructor Detail

ZPath

public ZPath()
Constructs a new Path


ZPath

public ZPath(java.awt.geom.GeneralPath path)
Constructs a new Path

Method Detail

setPath

public void setPath(java.awt.geom.GeneralPath aPath)
Set the path.


duplicateObject

protected java.lang.Object duplicateObject()
Returns a clone of this object.

Overrides:
duplicateObject in class ZBasicVisualComponent
See Also:
ZSceneGraphObject.duplicateObject()

getX

public double getX()
Return x-coord of rectangle.

Overrides:
getX in class ZShape
Returns:
x-coord.

getY

public double getY()
Return y-coord of rectangle.

Overrides:
getY in class ZShape
Returns:
y-coord.

getWidth

public double getWidth()
Return width of rectangle.

Overrides:
getWidth in class ZShape
Returns:
width.

getHeight

public double getHeight()
Return height of rectangle.

Overrides:
getHeight in class ZShape
Returns:
height.

getRect

public java.awt.geom.Rectangle2D getRect()
Return rectangle.

Returns:
rectangle.

getShape

public java.awt.Shape getShape()
Return the shape.

Specified by:
getShape in class ZShape
Returns:
the Shape.

getPath

public java.awt.geom.GeneralPath getPath()
Return the path.

Returns:
the GeneralPath.

writeObject

public void writeObject(ZObjectOutputStream out)
                 throws java.io.IOException
Write out all of this object's state.

Specified by:
writeObject in interface ZSerializable
Overrides:
writeObject in class ZBasicVisualComponent
Parameters:
out - The stream that this object writes into
java.io.IOException

setState

public void setState(java.lang.String fieldType,
                     java.lang.String fieldName,
                     java.lang.Object fieldValue)
Set some state of this object as it gets read back in. After the object is created with its default no-arg constructor, this method will be called on the object once for each bit of state that was written out through calls to ZObjectOutputStream.writeState() within the writeObject method.

Specified by:
setState in interface ZSerializable
Overrides:
setState in class ZBasicVisualComponent
Parameters:
fieldType - The fully qualified type of the field
fieldName - The name of the field
fieldValue - The value of the field


Copyright 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.