edu.uci.ics.jung.visualization.graphics
Class LayeredImage
java.lang.Object
edu.uci.ics.jung.visualization.graphics.Image
edu.uci.ics.jung.visualization.graphics.LayeredImage
- All Implemented Interfaces:
- ImageDrawDelegate
public class LayeredImage
- extends Image
- implements ImageDrawDelegate
An icon that is made up of a collection of Icons.
They are rendered in layers starting with the first
Icon added (from the constructor).
- Author:
- Tom Nelson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LayeredImage
public LayeredImage(Image image)
getBaseImage
public Image getBaseImage()
draw
public void draw(GraphicsContext g,
int x,
int y)
- Overrides:
draw in class Image
add
public void add(Image image)
remove
public boolean remove(Image image)
getGraphicsContext
public GraphicsContext getGraphicsContext()
- Specified by:
getGraphicsContext in class Image
getHeight
public int getHeight()
- Specified by:
getHeight in class Image
getScaledInstance
public Image getScaledInstance(int width,
int height,
int hints)
- Description copied from class:
Image
- Creates a scaled version of this image.
A new
Image object is returned which will render
the image at the specified width and
height by default. The new Image object
may be loaded asynchronously even if the original source image
has already been loaded completely.
If either width
or height is a negative number then a value is
substituted to maintain the aspect ratio of the original image
dimensions. If both width and height
are negative, then the original image dimensions are used.
- Specified by:
getScaledInstance in class Image
- Parameters:
width - the width to which to scale the image.height - the height to which to scale the image.hints - flags to indicate the type of algorithm to use
for image resampling.
- Returns:
- a scaled version of the image.
- See Also:
Image.SCALE_DEFAULT,
Image.SCALE_FAST,
Image.SCALE_SMOOTH,
Image.SCALE_REPLICATE,
Image.SCALE_AREA_AVERAGING
getWidth
public int getWidth()
- Specified by:
getWidth in class Image
Copyright © 2007. All Rights Reserved.