|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.awt
Class Image

java.lang.Objectjava.awt.Image
- public abstract class Image
- extends java.lang.Object
This is the abstract superclass of all image objects in Java.
- Since:
- 1.0
| Field Summary | |
static int |
SCALE_AREA_AVERAGING
Constant indicating that the area averaging scaling algorithm should be used. |
static int |
SCALE_DEFAULT
Constant indicating that the default scaling algorithm should be used. |
static int |
SCALE_FAST
Constant indicating that a fast scaling algorithm should be used. |
static int |
SCALE_REPLICATE
Constant indicating that the ReplicateScaleFilter class
algorithm should be used for scaling. |
static int |
SCALE_SMOOTH
Constant indicating that a smooth scaling algorithm should be used. |
static java.lang.Object |
UndefinedProperty
This variable is returned whenever a property that is not defined is requested. |
| Constructor Summary | |
Image()
A default constructor for subclasses. |
|
| Method Summary | |
abstract void |
flush()
Flushes (that is, destroys) any resources used for this image. |
abstract Graphics |
getGraphics()
Returns a graphics context object for drawing an off-screen object. |
abstract int |
getHeight(java.awt.image.ImageObserver observer)
Returns the height of the image, or -1 if it is unknown. |
abstract java.lang.Object |
getProperty(java.lang.String name,
java.awt.image.ImageObserver observer)
This method requests a named property for an object. |
Image |
getScaledInstance(int width,
int height,
int flags)
Scales the image to the requested dimension. |
abstract java.awt.image.ImageProducer |
getSource()
Returns the image producer object for this object. |
abstract int |
getWidth(java.awt.image.ImageObserver observer)
Returns the width of the image, or -1 if it is unknown. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
UndefinedProperty
public static final java.lang.Object UndefinedProperty
- This variable is returned whenever a property that is not defined
is requested.
SCALE_DEFAULT
public static final int SCALE_DEFAULT
- Constant indicating that the default scaling algorithm should be used.
- Since:
- 1.1
- See Also:
- Constant Field Values
SCALE_FAST
public static final int SCALE_FAST
- Constant indicating that a fast scaling algorithm should be used.
- Since:
- 1.1
- See Also:
- Constant Field Values
SCALE_SMOOTH
public static final int SCALE_SMOOTH
- Constant indicating that a smooth scaling algorithm should be used.
- Since:
- 1.1
- See Also:
- Constant Field Values
SCALE_REPLICATE
public static final int SCALE_REPLICATE
- Constant indicating that the
ReplicateScaleFilterclass algorithm should be used for scaling.- Since:
- 1.1
- See Also:
- java.awt.image.ReplicateScaleFilter, Constant Field Values
SCALE_AREA_AVERAGING
public static final int SCALE_AREA_AVERAGING
- Constant indicating that the area averaging scaling algorithm should be
used.
- Since:
- 1.1
- See Also:
- java.awt.image.AreaAveragingScaleFilter, Constant Field Values
| Constructor Detail |
Image
public Image()
- A default constructor for subclasses.
| Method Detail |
getWidth
public abstract int getWidth(java.awt.image.ImageObserver observer)
- Returns the width of the image, or -1 if it is unknown. If the
image width is unknown, the observer object will be notified when
the value is known.
getHeight
public abstract int getHeight(java.awt.image.ImageObserver observer)
- Returns the height of the image, or -1 if it is unknown. If the
image height is unknown, the observer object will be notified when
the value is known.
getSource
public abstract java.awt.image.ImageProducer getSource()
- Returns the image producer object for this object. The producer is the
object which generates pixels for this image.
getGraphics
public abstract Graphics getGraphics()
- Returns a graphics context object for drawing an off-screen object.
This method is only valid for off-screen objects.
getProperty
public abstract java.lang.Object getProperty(java.lang.String name, java.awt.image.ImageObserver observer)
- This method requests a named property for an object. The value of the
property is returned. The value
UndefinedPropertyis returned if there is no property with the specified name. The valuenullis returned if the properties for the object are not yet known. In this case, the specified image observer is notified when the properties are known.
getScaledInstance
public Image getScaledInstance(int width, int height, int flags)
- Scales the image to the requested dimension. A new Image with asynchronous
loading will be produced according to the hints of the algorithm
requested. If either the width or height is non-positive, it is adjusted
to preserve the original aspect ratio.
If an illegal value of
flagsis passed, the default algorithm is used.- Since:
- 1.1
flush
public abstract void flush()
- Flushes (that is, destroys) any resources used for this image. This
includes the actual image data.
|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
java.awt.Image