|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--org.w3c.tools.widgets.ImageButton
| Field Summary | |
protected java.awt.Image |
currentImg
|
protected java.awt.Image |
img1
|
protected java.awt.Image |
img2
|
protected boolean |
switchable
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
| Constructor Summary | |
ImageButton(java.awt.Image img)
Construct an ImageButton with no action command |
|
ImageButton(java.awt.Image img1,
java.awt.Image img2)
Construct an ImageButton with the specified action command |
|
ImageButton(java.awt.Image img1,
java.awt.Image img2,
java.lang.String command)
Construct an ImageButton with the specified action command |
|
ImageButton(java.awt.Image img,
java.lang.String command)
Construct an ImageButton with the specified action command |
|
| Method Summary | |
void |
addActionListener(java.awt.event.ActionListener al)
Adds an action listener to this ImageButton |
protected void |
fireActionEvent()
fire a new ActionEvent and process it, if some listeners are listening |
java.lang.String |
getActionCommand()
Returns the action command String |
java.awt.Dimension |
getMinimumSize()
Returns the minimum size of the ImageButton |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of the ImageButton |
boolean |
imageUpdate(java.awt.Image img,
int flaginfo,
int x,
int y,
int width,
int height)
called when more informations about the image are available. |
protected void |
initSize()
Gets the size of the Image to calculate the minimum size of the Button |
void |
paint(java.awt.Graphics g)
paint the ImageButton in its initial shape |
protected void |
paintShadow(boolean raised)
paints the ImageButton using double buffering |
void |
removeActionListener(java.awt.event.ActionListener al)
Removes an action listener to this ImageButton |
void |
setActionCommand(java.lang.String command)
Sets the action command String used when an ActionEvent is fired |
void |
switchImage()
|
| Methods inherited from class java.awt.Canvas |
addNotify |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
minimumSize,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
paramString,
postEvent,
preferredSize,
prepareImage,
prepareImage,
print,
printAll,
processComponentEvent,
processEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
update,
validate |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected boolean switchable
protected java.awt.Image img1
protected java.awt.Image img2
protected java.awt.Image currentImg
| Constructor Detail |
public ImageButton(java.awt.Image img1,
java.awt.Image img2,
java.lang.String command)
img1 - The image of this ImageButtonimg2 - The image of this ImageButtoncommand - The action command String
public ImageButton(java.awt.Image img1,
java.awt.Image img2)
img1 - The image of this ImageButtonrealesed - The image of this ImageButton
public ImageButton(java.awt.Image img,
java.lang.String command)
img - The image of this ImageButtoncommand - The action command Stringpublic ImageButton(java.awt.Image img)
img - The image of this ImageButton| Method Detail |
protected void initSize()
public void switchImage()
public void paint(java.awt.Graphics g)
g - A Graphicsprotected void paintShadow(boolean raised)
raised - A boolean which shows the state of the button
public boolean imageUpdate(java.awt.Image img,
int flaginfo,
int x,
int y,
int width,
int height)
ImageObserverpublic java.awt.Dimension getMinimumSize()
public java.awt.Dimension getPreferredSize()
public void setActionCommand(java.lang.String command)
command - The command Stringpublic java.lang.String getActionCommand()
public void addActionListener(java.awt.event.ActionListener al)
al - The ActionListenerpublic void removeActionListener(java.awt.event.ActionListener al)
al - The ActionListenerprotected void fireActionEvent()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||