Class powersoft.jcm.ui.PictureBox
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class powersoft.jcm.ui.PictureBox

java.lang.Object
   |
   +----powersoft.jcm.ui.Component
           |
           +----powersoft.jcm.ui.Control
                   |
                   +----powersoft.jcm.ui.PictureBox

public class PictureBox
extends Control
implements PaintListener

Variable Index

 o CENTER
The centered image position.
 o DEFAULT
The default image position.

Constructor Index

 o PictureBox()

Method Index

 o autoSize()
Resizes the picture box to match the size of the image.
 o getAutoSize()
 o getImage()
 o getImagePosition()
 o getInsets()
 o getScaleImage()
 o paint(PaintEvent)
 o setAutoSize(boolean)
When the AutoSize property is true, the picture box will be resized to match the size of the image.
 o setImage(Image)
Sets the image for the component.
 o setImage(String)
Sets the image for the component.
 o setImage(URL)
Sets the image for the component.
 o setImagePosition(int)
 o setInsets(Insets)
 o setScaleImage(boolean)

Variables

 o DEFAULT
  public final static int DEFAULT
The default image position.
 o CENTER
  public final static int CENTER
The centered image position.

Constructors

 o PictureBox
  public PictureBox()

Methods

 o getAutoSize
  public boolean getAutoSize()
 o setAutoSize
  public void setAutoSize(boolean autoSize)
When the AutoSize property is true, the picture box will be resized to match the size of the image.
 o getImage
  public Image getImage()
 o setImage
  public synchronized void setImage(Image image)
Sets the image for the component.
Parameters:
image - Specifies the image.
See Also:
setImage
 o setImage
  public void setImage(String filename)
Sets the image for the component.

Notes: This method is only useful for a Java application, since reading an image from a local file is neither allowed or desired for an applet.

Parameters:
filename - Specifies the GIF or JPEG file to read the image from.
See Also:
setImage
 o setImage
  public void setImage(URL url)
Sets the image for the component.

Notes: Using an absolute URL may violate the security model for an untrusted applet. In an applet a relative URL can be used as follows: java.net.URL url = new java.net.URL( this.getDocumentBase(), "images/i1.gif" ); pictb_1.setImage( url );

Parameters:
url - Specifies a URL to read the image from.
See Also:
setImage
 o getImagePosition
  public int getImagePosition()
 o setImagePosition
  public synchronized void setImagePosition(int position)
 o getInsets
  public Insets getInsets()
 o setInsets
  public synchronized void setInsets(Insets insets)
 o getScaleImage
  public boolean getScaleImage()
 o setScaleImage
  public synchronized void setScaleImage(boolean scale)
 o autoSize
  public synchronized boolean autoSize()
Resizes the picture box to match the size of the image.
 o paint
  public synchronized void paint(PaintEvent data)

All Packages  Class Hierarchy  This Package  Previous  Next  Index