All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.awt.Component | +----java.awt.Container | +----java.awt.Panel | +----java.applet.Applet | +----com.ibm.beans.samples.media.ImageViewer
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.
public ImageViewer()
public ImageViewer(String imageFileName)
public void init()
public void destroy()
public void start()
public void stop()
public Image loadIcon(boolean large)
public String chooseImageFile()
public void loadImage()
public void printImage()
public void actionPerformed(ActionEvent evt)
public void mouseClicked(MouseEvent evt)
public void mouseReleased(MouseEvent evt)
public void mousePressed(MouseEvent evt)
public void mouseEntered(MouseEvent evt)
public void mouseExited(MouseEvent evt)
public void paint(Graphics g)
public Dimension getPreferredSize()
public Dimension getMinimumSize()
public String getFileName()
public synchronized void setFileName(String newFileName)
public boolean getStretchImage()
public void setStretchImage(boolean stretch)
public boolean getAllowMouseInteraction()
public void setAllowMouseInteraction(boolean allow)
public static void main(String argv[])
All Packages Class Hierarchy This Package Previous Next Index