Documentation Archive Developer
Search
PATH Documentation > WebObjects

Table of Contents

EOImageView


Inherits from:
javax.swing.JComponent : java.awt.Container : java.awt.Component : Object
Implements:
java.io.Serializable
java.awt.image.ImageObserver
java.awt.MenuContainer
Package:
com.webobjects.eointerface.swing


Class Description


The EOImageView class is used to display images (java.awt.Image objects) in Swing applications.




Constants


EOImageView defines the following int constants to specify the scaling behavior of an EOImageView:


Constant Scaling Behavior
ScaleNone No scaling
ScaleProportionally Scales in proportion to the image size
ScaleToFit Scales to fit the portion of the user interface the image view occupies
ScaleProportionallyIfTooLarge Scales in proportion to the image size, but only if the image is too large to fit its portion of the user interface (the image view never scales the image to be larger)



Interfaces Implemented


java.io.Serializable
java.awt.image.ImageObserver
imageUpdate
java.awt.MenuContainer


Method Types


All methods
EOImageView
image
imageScaling
paint
scalingHints
setBorder
setBounds
setImage
setImageScaling
setScalingHints


Constructors



EOImageView

public EOImageView()

Description forthcoming.


Instance Methods



image

public java.awt.Image image()

Returns the receiver's image.

imageScaling

public int imageScaling()

Returns the type of scaling the receiver uses. The return value is one of:

imageUpdate

public boolean imageUpdate( java.awt.Image image, int flags, int x, int y, int width, int height)

See the method description for imageUpdate in Sun's JComponent class documentation.

paint

public void paint(java.awt.Graphics aGraphics)

See the method description for setBorder in Sun's JComponent class documentation.

scalingHints

public int scalingHints()

Returns the receiver's scaling hints-a constant identifying the algorithm the receiver uses to scale its image.

setBorder

public void setBorder(javax.swing.border.Border aBorder)

See the method description for setBorder in Sun's JComponent class documentation.

setBounds

public void setBounds( int x, int y, int width, int height)

See the method description for setBounds in Sun's Component class documentation.

setImage

public void setImage(java.awt.Image image)

Sets the receiver's image to image and repaints (only if image is different from the receiver's old image).

setImageScaling

public void setImageScaling(int imageScaling)

Sets the scaling behavior of the receiver; that is, identifies the circumstances under which the receiver scales. The imageScaling argument should be one of the following constants (defined in EOImageView):

The default scaling behavior is ScaleProportionallyIfTooLarge. For more information on these constants, see "Constants" (page 22).



setScalingHints

public void setScalingHints(int scalingHints)

Sets the algorithm the receiver uses to scale it's image.The scalingHints argument should be one of the following constants (defined in java.awt.Image):

The default is SCALE_SMOOTH. For more information on the algorithms identified by these constants, see Sun's Image class documentation.



© 2001 Apple Computer, Inc. (Last Published April 21, 2001)


Table of Contents