SilverStream
Application Server 3.5

com.sssw.rt.form
Class AgcImage

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
All Implemented Interfaces:
Accessible, AgiControl, AgiHelpInfo, ImageObserver, MenuContainer, Serializable

public class AgcImage
extends PvBaseCanvas

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.

Properties:
Control Type, Enabled, Height, Image, Image Drawing Mode, Image Expression, Left, Name, Tool Tip, Top, Transparent, Visible, Width
Events:
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, validationFailed, validationTest, valueChanged
See Also:
Serialized Form

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 javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isOpaque, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, print, printAll, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
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.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus
 
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

IMAGE_MODE_NORMAL

public static final int IMAGE_MODE_NORMAL
Image mode constant for an image at the upper left corner of the control's rectangle.
See Also:
AgcImage.getImageMode(), AgcImage.setImageMode(int)

IMAGE_MODE_CENTERED

public static final int IMAGE_MODE_CENTERED
Image mode constant for an image centered in the control's rectangle.
See Also:
AgcImage.getImageMode(), AgcImage.setImageMode(int)

IMAGE_MODE_TILED

public static final int IMAGE_MODE_TILED
Image mode constant for the image to be tiled within the control's rectangle.
See Also:
AgcImage.getImageMode(), AgcImage.setImageMode(int)

IMAGE_MODE_STRETCH

public static final int IMAGE_MODE_STRETCH
Image mode constant for the image to be stretched to fit the control's rectangle.
See Also:
AgcImage.getImageMode(), AgcImage.setImageMode(int)
Constructor Detail

AgcImage

public AgcImage()
Method Detail

getImage

public Image getImage()
Returns the image associated with the control.
Usage:

Use the setImage() method or the Image property to set the control's image.

Example:

The following code fragment illustrates how to obtain the current image from an image control using getImage().

 Image img;
 img = AgcImage1.getImage();
 
See Also:
AgcImage.setImage(String), AgcImage.setImage(Image)

setImage

public void setImage(Image image)
Assigns an image to the control.
Parameters:
image - an Image object.
Usage:

Example:
 
See Also:
AgcImage.getImage()

setImage

public void setImage(String imageSpec)
Assigns an image to the control.
Parameters:
imageSpec - a string that specifies the image.
Usage:

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.

Example:

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");
 
See Also:
AgcImage.getImage()

getImageMode

public int getImageMode()
Returns the control's current image mode.
Usage:

For a list of image modes returned by this method, see the constant fields defined in this class.

Example:

The following is an example that illustrates how to use getImageMode().

 int imageMode;
 imageMode = ControlName1.getImageMode();
 
See Also:
AgcImage.setImageMode(int)

setImageMode

public void setImageMode(int mode)
Assigns the control's image mode, using a constant value defined in this class.
Parameters:
mode - an int that specifies the display mode of the image (one of the constant fields defined in this class).
Example:

The following code fragment illustrates how to assign a normal image mode to the AgcImage control.

 AgcImage1.setImageMode(AgcImage.IMAGE_MODE_NORMAL);
 
See Also:
AgcImage.getImageMode()

SilverStream
Application Server 3.5