com.vinculumtech.carrierwave.source
Class SourcedImageGraph

java.lang.Object
  extended bycom.vinculumtech.carrierwave.image.ImageGraph
      extended bycom.vinculumtech.carrierwave.source.SourcedImageGraph
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RespectiveImageGraph

public class SourcedImageGraph
extends ImageGraph

The SourcedImageGraph class is a subclass of ImageGraph where that will delegate requests for an Image instance to an instance of an ImageSource class, if they are not already 'local' to the SourcedImageGraph instance.
Use the getImage( Icon icon ) method to 'boot strap' a given instance of a SourcedImageGraph class.

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/carrierwave/source/SourcedImageGraph.java#7 $
See Also:
Serialized Form

Constructor Summary
protected SourcedImageGraph()
           
  SourcedImageGraph(ImageSource imageSource)
           
protected SourcedImageGraph(ImageSource imageSource, ImageGraph imageGraph)
           
 
Method Summary
 Image getImage(Icon icon)
          Retrieves an Image instance identified by the given Icon instance from the ImageSource instance if the Image instance is not already available through the getImageLocal() method.
 ImageSource getImageSource()
           
 void setImageSource(ImageSource imageSource)
           
protected  java.lang.Object writeReplace()
          Used the becomeImageGraph() method on the superclass.
 
Methods inherited from class com.vinculumtech.carrierwave.image.ImageGraph
acceptImage, addImagesFrom, addImagesTo, addOriginImage, associateImage, associateImageGraphs, becomeImageGraph, clear, clearOriginImages, containsImage, decrementImage, disassociateImage, disassociateImage, getIcons, getImageLocal, getImageMap, getImages, getImagesPrivate, getOriginImage, getOriginImages, getOriginsPrivate, hasManyOriginImages, incrementImage, isDurable, isStrict, makeDurable, makeOriginImage, makeOriginImages, makeStrict, putImage, reassociateImage, removeImage, removeOrigin, setDurable, setIsStrict, setThisOnAll, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourcedImageGraph

protected SourcedImageGraph()

SourcedImageGraph

protected SourcedImageGraph(ImageSource imageSource,
                            ImageGraph imageGraph)

SourcedImageGraph

public SourcedImageGraph(ImageSource imageSource)
Method Detail

getImageSource

public ImageSource getImageSource()

setImageSource

public void setImageSource(ImageSource imageSource)

getImage

public Image getImage(Icon icon)
Retrieves an Image instance identified by the given Icon instance from the ImageSource instance if the Image instance is not already available through the getImageLocal() method.

Overrides:
getImage in class ImageGraph
Parameters:
icon -
Returns:
the Image instance identified by the given Icon instance

writeReplace

protected java.lang.Object writeReplace()
                                 throws java.io.ObjectStreamException
Used the becomeImageGraph() method on the superclass.

Returns:
Throws:
java.io.ObjectStreamException


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.