Documentation Archive Developer
Search
[an error occurred while processing this directive] PATH  Documentation > WebObjects 4.5 > EOInterface Reference

Table of Contents

EOImageView


Inherits from:
javax.swing.JComponent java.awt.Container : java.awt.Component ; Object
Package:
com.apple.client.eointerface


Class Description


The EOImageView class is used to display images (java.awt.Image objects) in Java Client applications.
Note: This class doesn't exist in the com.apple.yellow.eointerface package.




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)



Method Types


Accessing the image
image
setImage
Configuring scaling behavior
setImageScaling
imageScaling
setScalingHints
scalingHints
Painting
imageUpdate
paint
setBorder
setBounds


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 g)

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 border)

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".



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




Table of Contents