|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.sssw.rt.atlas.AtPanel | +--com.sssw.rt.atlas.AtCanvas | +--com.sssw.rt.form.PvBaseCanvas | +--com.sssw.rt.form.AgcImage
The AgcImage Control (Image control) associates an image with a form or with other controls on the form. It supports GIF and JPEG image formats.
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Field Summary | |
static int |
IMAGE_MODE_CENTERED
Image mode constant for an image centered in the control's rectangle. |
static int |
IMAGE_MODE_NORMAL
Image mode constant for an image at the upper left corner of the control's rectangle. |
static int |
IMAGE_MODE_STRETCH
Image mode constant for the image to be stretched to fit the control's rectangle. |
static int |
IMAGE_MODE_TILED
Image mode constant for the image to be tiled within the control's rectangle. |
Fields inherited from class com.sssw.rt.atlas.AtPanel |
BGIMAGE_DRAW_CENTERED,
BGIMAGE_DRAW_NORMAL,
BGIMAGE_DRAW_STRETCH,
BGIMAGE_DRAW_TILED |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
AgcImage()
|
Method Summary | |
Image |
getImage()
Returns the image associated with the control. |
int |
getImageMode()
Returns the control's current image mode. |
void |
setImage(Image image)
Assigns an image to the control. |
void |
setImage(String imageSpec)
Assigns an image to the control. |
void |
setImageMode(int mode)
Assigns the control's image mode, using a constant value defined in this class. |
Methods inherited from class com.sssw.rt.form.PvBaseCanvas |
getBackgroundColor,
getFontIdentifier,
setBackgroundColor,
setFontIdentifier |
Methods inherited from class com.sssw.rt.atlas.AtPanel |
addImpl,
addNotify,
clientPaint,
clientPaint,
deliverMouseEvent,
deliverMouseMoveEvent,
doAtCommand,
drawTiledImage,
enableAtCommands,
getBackgroundImage,
getBackgroundImageMode,
getHelper,
getTransparent,
hide,
hideToolTip,
imageUpdate,
isFocusTraversable,
isOptimizedDrawingEnabled,
ownedImage,
paintBorder,
paintComponent,
paintImmediately,
paintImmediately,
paintNow,
preprocessKeyEvent,
processEvent,
reshape,
setBackgroundImage,
setBackgroundImageMode,
setTransparent,
show,
showToolTip |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Methods implemented from interface com.sssw.rt.form.AgiControl |
getComponent,
getHelpInfo,
setHelpInfo |
Field Detail |
public static final int IMAGE_MODE_NORMAL
AgcImage.getImageMode()
,
AgcImage.setImageMode(int)
public static final int IMAGE_MODE_CENTERED
AgcImage.getImageMode()
,
AgcImage.setImageMode(int)
public static final int IMAGE_MODE_TILED
AgcImage.getImageMode()
,
AgcImage.setImageMode(int)
public static final int IMAGE_MODE_STRETCH
AgcImage.getImageMode()
,
AgcImage.setImageMode(int)
Constructor Detail |
public AgcImage()
Method Detail |
public Image getImage()
Use the setImage()
method or the Image property to set the control's image.
The following code fragment illustrates how to obtain the current image from an image control
using getImage()
.
Image img; img = AgcImage1.getImage();
AgcImage.setImage(String)
,
AgcImage.setImage(Image)
public void setImage(Image image)
image
- an Image object.AgcImage.getImage()
public void setImage(String imageSpec)
imageSpec
- a string that specifies the image.
If the image is in the same database as the application, then it is sufficient to supply just the image name.
If the image is located in a different database, then the fully qualified image name needs
to be supplied, in the form database:imagename
. The image's URL may also be used.
Use the Image property to set the control's image at design time. Use the getImage()
method to
determine the control's current image.
The following code fragment illustrates how to assign an image in the same database.
AgcImage1.setImage("newdatabase.gif");
This code fragment illustrates how to assign an image from a database called otherdatabase:
AgcImage1.setImage("otherdatabase:someImage.gif");
AgcImage.getImage()
public int getImageMode()
For a list of image modes returned by this method, see the constant fields defined in this class.
The following is an example that illustrates how to use getImageMode()
.
int imageMode; imageMode = ControlName1.getImageMode();
AgcImage.setImageMode(int)
public void setImageMode(int mode)
mode
- an int that specifies the display mode of the image
(one of the constant fields defined in this class).The following code fragment illustrates how to assign a normal image mode to the AgcImage control.
AgcImage1.setImageMode(AgcImage.IMAGE_MODE_NORMAL);
AgcImage.getImageMode()
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |