sk.uniba.euromath.gene.image
Class ImageRefImpl

java.lang.Object
  extended by sk.uniba.euromath.gene.image.ImageRefImpl
All Implemented Interfaces:
ImageRef

public final class ImageRefImpl
extends Object
implements ImageRef

Implements the ImageRef interface.

Author:
Martin Vysny

Field Summary
 String id
          A temporary solution to transfer ID of source.
 
Constructor Summary
ImageRefImpl(Graphics2D graphics)
          Constructs instance having both image and rendered image null.
ImageRefImpl(Graphics2D graphics, Image image, RenderedImage renderedImage)
          Constructs an instance.
 
Method Summary
 Graphics2D asGraphics()
          Returns the graphics aspect of the image.
 Image asImage()
          Returns the Image aspect of the image.
 RenderedImage asRenderedImage()
          Returns the RenderedImage aspect of the image.
 void dispose()
          Disposes of the image.
 String getId()
          A temporary solution to transfer ID of source.
 void setId(String id)
          A temporary solution to transfer ID of source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public String id
A temporary solution to transfer ID of source. Returns ID of root node R: all nodes that are rendered in this image are descendants or same nodes as R.

Constructor Detail

ImageRefImpl

public ImageRefImpl(Graphics2D graphics)
Constructs instance having both image and rendered image null.

Parameters:
graphics - the graphics aspect.

ImageRefImpl

public ImageRefImpl(Graphics2D graphics,
                    Image image,
                    RenderedImage renderedImage)
Constructs an instance.

Parameters:
graphics - the graphics aspect.
image - the image aspect.
renderedImage - the rendered image aspect.
Method Detail

asGraphics

public Graphics2D asGraphics()
Description copied from interface: ImageRef
Returns the graphics aspect of the image. It must never be null.

Specified by:
asGraphics in interface ImageRef
Returns:
Graphics instance.

asImage

public Image asImage()
Description copied from interface: ImageRef
Returns the Image aspect of the image. May be null.

Specified by:
asImage in interface ImageRef
Returns:
Image instance.

asRenderedImage

public RenderedImage asRenderedImage()
Description copied from interface: ImageRef
Returns the RenderedImage aspect of the image. May be null.

Specified by:
asRenderedImage in interface ImageRef
Returns:
RenderedImage instance.

dispose

public void dispose()
Description copied from interface: ImageRef
Disposes of the image. The image must not be used after deleting.

Specified by:
dispose in interface ImageRef

getId

public String getId()
Description copied from interface: ImageRef
A temporary solution to transfer ID of source. Returns ID of root node R: all nodes that are rendered in this image are descendants or same nodes as R.

Specified by:
getId in interface ImageRef
Returns:
ID of root node.

setId

public void setId(String id)
Description copied from interface: ImageRef
A temporary solution to transfer ID of source. Sets ID of root node R: all nodes that are rendered in this image are descendants or same nodes as R.

Specified by:
setId in interface ImageRef
Parameters:
id - the id of root node.


Copyright 2003-2003-2006 null. All Rights Reserved.