com.davisor.graphics
Class IndirectAnnotatedSerializableShape

java.lang.Object
  extended bycom.davisor.core.Wrapper
      extended bycom.davisor.graphics.IndirectAnnotatedShape
          extended bycom.davisor.graphics.IndirectAnnotatedSerializableShape
All Implemented Interfaces:
com.davisor.core.Annotated, AnnotatedSerializableShape, AnnotatedShape, com.davisor.core.Dupable, java.io.Serializable, java.awt.Shape

public class IndirectAnnotatedSerializableShape
extends IndirectAnnotatedShape
implements AnnotatedSerializableShape

IndirectAnnotatedSerializableShape implements a simple wrapper that assosiates annotation attribute information to a serializable Shape. Shape serialization is carried out with BetterPath class instances that are used to replace other, unserializable shapes as neccessary.

Since:
JDK1.3
See Also:
makeSerializable(java.awt.Shape), BetterPath, Serialized Form

Field Summary
 
Fields inherited from class com.davisor.graphics.IndirectAnnotatedShape
M_channelIndex, M_contextIndex, M_elementIndex, M_id, M_properties
 
Fields inherited from class com.davisor.core.Wrapper
M_object
 
Constructor Summary
IndirectAnnotatedSerializableShape(IndirectAnnotatedSerializableShape iass)
          Deep copy constructor.
IndirectAnnotatedSerializableShape(IndirectAnnotatedShape ias)
          Creates a serializable version of an indirect annotated shape.
IndirectAnnotatedSerializableShape(java.awt.Shape shape, com.davisor.core.Annotated annotation)
          Creates a new indirect annotated serialized shape.
IndirectAnnotatedSerializableShape(java.awt.Shape shape, java.util.Properties properties, long elementIndex, int channelIndex, short contextIndex)
          Creates a new indirect annotated serializable shape.
IndirectAnnotatedSerializableShape(java.awt.Shape shape, java.util.Properties properties, long elementIndex, int channelIndex, short contextIndex, java.lang.String id)
          Deprecated. explicit identity strings are obsolete
 
Method Summary
 com.davisor.core.Dupable dup()
          Makes a deep copy of this object.
static java.awt.Shape makeSerializable(java.awt.Shape shape)
          Makes a shape serializable.
 
Methods inherited from class com.davisor.graphics.IndirectAnnotatedShape
contains, contains, contains, contains, equals, getAddress, getBounds, getBounds2D, getChannelIndex, getContextIndex, getDescription, getElementIndex, getID, getPathIterator, getPathIterator, getProperties, getProperty, getShape, getTarget, hashCode, intersects, intersects, toString
 
Methods inherited from class com.davisor.core.Wrapper
getObject, isNull
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.davisor.core.Annotated
getAddress, getChannelIndex, getContextIndex, getDescription, getElementIndex, getID, getProperties, getProperty, getTarget
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, intersects, intersects
 

Constructor Detail

IndirectAnnotatedSerializableShape

public IndirectAnnotatedSerializableShape(IndirectAnnotatedSerializableShape iass)
Deep copy constructor.

Parameters:
iass - indirect annotated serializable shape to be copied
See Also:
dup(), Dupable

IndirectAnnotatedSerializableShape

public IndirectAnnotatedSerializableShape(IndirectAnnotatedShape ias)
Creates a serializable version of an indirect annotated shape.

Parameters:
ias - indirect annotated shape to be copied

IndirectAnnotatedSerializableShape

public IndirectAnnotatedSerializableShape(java.awt.Shape shape,
                                          com.davisor.core.Annotated annotation)
Creates a new indirect annotated serialized shape.

Parameters:
shape - shape to be annotated
annotation - annotation information the shape is to be annotated with
See Also:
makeSerializable(java.awt.Shape)

IndirectAnnotatedSerializableShape

public IndirectAnnotatedSerializableShape(java.awt.Shape shape,
                                          java.util.Properties properties,
                                          long elementIndex,
                                          int channelIndex,
                                          short contextIndex)
Creates a new indirect annotated serializable shape.

Parameters:
shape - shape to be annotated
properties - annotation attributes (may be null)
elementIndex - annotation element index
channelIndex - annotation channel index
contextIndex - annotation context index
See Also:
makeSerializable(java.awt.Shape)

IndirectAnnotatedSerializableShape

public IndirectAnnotatedSerializableShape(java.awt.Shape shape,
                                          java.util.Properties properties,
                                          long elementIndex,
                                          int channelIndex,
                                          short contextIndex,
                                          java.lang.String id)
Deprecated. explicit identity strings are obsolete

Creates a new indirect annotated serializable shape.

Parameters:
shape - shape to be annotated
properties - annotation attributes (may be null)
elementIndex - annotation element index
channelIndex - annotation channel index
contextIndex - annotation context index
id - shape identity (may be null)
See Also:
makeSerializable(java.awt.Shape)
Method Detail

dup

public com.davisor.core.Dupable dup()
                             throws com.davisor.core.DupNotSupportedError
Makes a deep copy of this object.

Specified by:
dup in interface com.davisor.core.Dupable
Overrides:
dup in class IndirectAnnotatedShape
Throws:
com.davisor.core.DupNotSupportedError - if the object can not be deep-copied.

makeSerializable

public static java.awt.Shape makeSerializable(java.awt.Shape shape)
Makes a shape serializable. If the given shape is null, null is returned. If the shape is serializable, it is returned unmodified. Otherwise a serializable BetterPath instance instance is created from given shape and returned.

Parameters:
shape - shape to be ensured to be serializable
See Also:
BetterPath


Copyright © 2001-2004 Davisor Oy. All Rights Reserved.