All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.samples.media.ImageViewer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----com.ibm.beans.samples.media.ImageViewer

public class ImageViewer
extends Applet
implements Serializable, MouseListener, ActionListener

The ImageViewer bean is a simple viewer for gif and jpg images. It also supports animation, via the animated gif file format. An image can be selected by double-clicking on the bean. The ImageViewer also offers a pop-up menu (accessed via the secondary mouse button), with options for loading a new image (via a standard file dialog), or printing the current image. Note that interaction with the bean via the mouse is only enabled if the allowMouseInteraction property is set to true. The image can also be set by wiring something in another bean to the setFileName method of this bean. This bean is also an applet - see ImageViewer.html for a sample invocation.


Constructor Index

 o ImageViewer()
 o ImageViewer(String)

Method Index

 o actionPerformed(ActionEvent)
 o chooseImageFile()
 o destroy()
 o getAllowMouseInteraction()
 o getFileName()
 o getMinimumSize()
 o getPreferredSize()
 o getStretchImage()
 o init()
 o loadIcon(boolean)
 o loadImage()
 o main(String[])
 o mouseClicked(MouseEvent)
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)
 o paint(Graphics)
 o printImage()
 o setAllowMouseInteraction(boolean)
 o setFileName(String)
 o setStretchImage(boolean)
 o start()
 o stop()

Constructors

 o ImageViewer
 public ImageViewer()
 o ImageViewer
 public ImageViewer(String imageFileName)

Methods

 o init
 public void init()
Overrides:
init in class Applet
 o destroy
 public void destroy()
Overrides:
destroy in class Applet
 o start
 public void start()
Overrides:
start in class Applet
 o stop
 public void stop()
Overrides:
stop in class Applet
 o loadIcon
 public Image loadIcon(boolean large)
 o chooseImageFile
 public String chooseImageFile()
 o loadImage
 public void loadImage()
 o printImage
 public void printImage()
 o actionPerformed
 public void actionPerformed(ActionEvent evt)
 o mouseClicked
 public void mouseClicked(MouseEvent evt)
 o mouseReleased
 public void mouseReleased(MouseEvent evt)
 o mousePressed
 public void mousePressed(MouseEvent evt)
 o mouseEntered
 public void mouseEntered(MouseEvent evt)
 o mouseExited
 public void mouseExited(MouseEvent evt)
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Container
 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Container
 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Container
 o getFileName
 public String getFileName()
 o setFileName
 public synchronized void setFileName(String newFileName)
 o getStretchImage
 public boolean getStretchImage()
 o setStretchImage
 public void setStretchImage(boolean stretch)
 o getAllowMouseInteraction
 public boolean getAllowMouseInteraction()
 o setAllowMouseInteraction
 public void setAllowMouseInteraction(boolean allow)
 o main
 public static void main(String argv[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index