|
|||||||
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 | +--java.awt.Panel | +--symantec.itools.awt.ImagePanel
The ImagePanel component is similar to a regular panel except that it displays an image within the panel. The image to use is specified with a URL.
Field Summary | |
static int |
IMAGE_CENTERED
A constant indicating the image is to be centered in this panel. |
static int |
IMAGE_NORMAL
A constant indicating the image is to be drawn from the upper left corner of the panel. |
static int |
IMAGE_SCALED_TO_FIT
A constant indicating the image is to be scaled to fit this panel. |
static int |
IMAGE_TILED
A constant indicating the image is to be tiled in this panel. |
protected int |
imageStyle
The style that the image will be displayed in. |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
ImagePanel()
Constructs a default ImagePanel. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener for all event changes. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a vetoable listener for all event changes. |
java.awt.Image |
getImage()
Returns the image being displayed in this panel. |
java.net.URL |
getImageURL()
Returns the URL of the image being displayed in this panel. |
int |
getStyle()
Gets the current panel image style. |
void |
paint(java.awt.Graphics g)
Paints this component using the given graphics context. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a listener for all event changes. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes a vetoable listener for all event changes. |
void |
setImageURL(java.net.URL url)
Sets the URL of the image to display in this panel. |
void |
setStyle(int newStyle)
Sets the new panel image style. |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getPreferredSize,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
paramString,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setCursor,
setFont,
setLayout,
update,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int IMAGE_TILED
public static final int IMAGE_CENTERED
public static final int IMAGE_SCALED_TO_FIT
public static final int IMAGE_NORMAL
protected int imageStyle
Constructor Detail |
public ImagePanel()
Method Detail |
public void paint(java.awt.Graphics g)
g
- the graphics context used for paintingComponent.repaint()
,
Component.update(java.awt.Graphics)
public void setImageURL(java.net.URL url) throws java.beans.PropertyVetoException
url
- the URL of the image to displaygetImageURL()
public java.net.URL getImageURL()
setImageURL(java.net.URL)
public void setStyle(int newStyle) throws java.beans.PropertyVetoException
newStyle
- the new panel image style, one of
IMAGE_TILED, IMAGE_CENTERED, or IMAGE_SCALED_TO_FITgetStyle()
,
IMAGE_TILED
,
IMAGE_CENTERED
,
IMAGE_SCALED_TO_FIT
,
IMAGE_NORMAL
public int getStyle()
setStyle(int)
,
IMAGE_TILED
,
IMAGE_CENTERED
,
IMAGE_SCALED_TO_FIT
,
IMAGE_NORMAL
public java.awt.Image getImage()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener to add.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener to remove.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- the listener to add.removeVetoableChangeListener(java.beans.VetoableChangeListener)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- the listener to remove.addVetoableChangeListener(java.beans.VetoableChangeListener)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |