|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Image | +--com.klg.jclass.page.EPSImage
EPSImage encapsulates the input of an EPS image, plus display attributes.
Field Summary | |
protected BufferedReader |
inputSource
The file or buffer stream which contains the data of the image |
protected JCUnit.Dimension |
size
The dimensions at which the EPS is to be displayed |
Fields inherited from class java.awt.Image |
SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty |
Constructor Summary | |
EPSImage(BufferedReader input)
Create an EPS image object given the input source |
Method Summary | |
void |
flush()
Flushes all resources used by this Image object. |
Graphics |
getGraphics()
Creates a graphics context for drawing to an off-screen image. |
int |
getHeight(ImageObserver observer)
Determines the height of the image. |
BufferedReader |
getInputSource()
Return the input source for this image |
Object |
getProperty(String name,
ImageObserver observer)
Gets a property of this image by name. |
Image |
getScaledInstance(int width,
int height,
int hints)
Creates a scaled version of this image. |
JCUnit.Dimension |
getSize()
Get the display size of the EPS image |
ImageProducer |
getSource()
Gets the object that produces the pixels for the image. |
int |
getWidth(ImageObserver observer)
Determines the width of the image. |
void |
setSize(JCUnit.Dimension size)
Specify the dimensions of the image |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JCUnit.Dimension size
protected BufferedReader inputSource
Constructor Detail |
public EPSImage(BufferedReader input)
Method Detail |
public int getWidth(ImageObserver observer)
-1
and the specified
ImageObserver
object is notified later.
getWidth
in class Image
observer
- an object waiting for the image to be loaded.
-1
if the width is not yet known.Image.getHeight(java.awt.image.ImageObserver)
,
ImageObserver
public int getHeight(ImageObserver observer)
-1
and the specified
ImageObserver
object is notified later.
getHeight
in class Image
observer
- an object waiting for the image to be loaded.
-1
if the height is not yet known.Image.getWidth(java.awt.image.ImageObserver)
,
ImageObserver
public ImageProducer getSource()
getSource
in class Image
ImageProducer
public Graphics getGraphics()
getGraphics
in class Image
Graphics
,
Component.createImage(int, int)
public Object getProperty(String name, ImageObserver observer)
Individual property names are defined by the various image
formats. If a property is not defined for a particular image, this
method returns the UndefinedProperty
object.
If the properties for this image are not yet known, this method
returns null
, and the ImageObserver
object is notified later.
The property name "comment"
should be used to store
an optional comment which can be presented to the application as a
description of the image, its source, or its author.
getProperty
in class Image
name
- a property name.observer
- an object waiting for this image to be loaded.
ImageObserver
,
Image.UndefinedProperty
public Image getScaledInstance(int width, int height, int hints)
Image
object is returned which by default renders
the image at the specified width
and
height
. The new Image
object
may be loaded asynchronously even if the original source image
has already been loaded completely. If either the width
or height
is a negative number then a value is
substituted to maintain the aspect ratio of the image's original
dimensions.
getScaledInstance
in class Image
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.
Image.SCALE_DEFAULT
,
Image.SCALE_FAST
,
Image.SCALE_SMOOTH
,
Image.SCALE_REPLICATE
,
Image.SCALE_AREA_AVERAGING
public void flush()
flush
in class Image
public JCUnit.Dimension getSize()
public void setSize(JCUnit.Dimension size)
size
- The output size of the imagepublic BufferedReader getInputSource()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |