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
-
CENTER
- The centered image position.
-
DEFAULT
- The default image position.
-
PictureBox()
-
-
autoSize()
- Resizes the picture box to match the size of the image.
-
getAutoSize()
-
-
getImage()
-
-
getImagePosition()
-
-
getInsets()
-
-
getScaleImage()
-
-
paint(PaintEvent)
-
-
setAutoSize(boolean)
- When the AutoSize property is true, the picture box will be resized
to match the size of the image.
-
setImage(Image)
- Sets the image for the component.
-
setImage(String)
- Sets the image for the component.
-
setImage(URL)
- Sets the image for the component.
-
setImagePosition(int)
-
-
setInsets(Insets)
-
-
setScaleImage(boolean)
-
DEFAULT
public final static int DEFAULT
- The default image position.
CENTER
public final static int CENTER
- The centered image position.
PictureBox
public PictureBox()
getAutoSize
public boolean getAutoSize()
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.
getImage
public Image getImage()
setImage
public synchronized void setImage(Image image)
- Sets the image for the component.
- Parameters:
- image - Specifies the image.
- See Also:
- setImage
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
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
getImagePosition
public int getImagePosition()
setImagePosition
public synchronized void setImagePosition(int position)
getInsets
public Insets getInsets()
setInsets
public synchronized void setInsets(Insets insets)
getScaleImage
public boolean getScaleImage()
setScaleImage
public synchronized void setScaleImage(boolean scale)
autoSize
public synchronized boolean autoSize()
- Resizes the picture box to match the size of the image.
paint
public synchronized void paint(PaintEvent data)
All Packages Class Hierarchy This Package Previous Next Index