|
|||||||||
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 | +--iicm.widgets.ImageButton
ImageButton - image button
Field Summary | |
protected ImageButtonGroup |
group_
|
protected int |
height_
|
protected java.awt.Image |
img_
|
protected java.lang.String |
label_
|
protected boolean |
state_
|
protected int |
width_
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
ImageButton(java.lang.String label,
java.awt.Image img,
int width,
int height,
boolean state,
ImageButtonGroup group)
constructor |
Method Summary | |
ImageButtonGroup |
getGroup()
|
boolean |
getState()
|
java.awt.Dimension |
minimumSize()
|
boolean |
mouseDown(java.awt.Event evt,
int x,
int y)
|
void |
paint(java.awt.Graphics g)
|
java.awt.Dimension |
preferredSize()
|
void |
setState(boolean value)
|
static java.awt.Image |
subimage(java.awt.Image img,
int x,
int y,
int w,
int h,
java.awt.Component target)
small helper to crop a subimage area out of an image. will wait until cropping has been completed when target is non-null. |
void |
update(java.awt.Graphics g)
|
static boolean |
waitForImage(java.awt.Image img,
java.awt.Component target)
small helper to wait until an image is completely loaded |
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,
getMinimumSize,
getName,
getParent,
getPeer,
getPreferredSize,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
list,
list,
list,
list,
list,
locate,
location,
lostFocus,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
paramString,
postEvent,
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,
validate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected java.lang.String label_
protected java.awt.Image img_
protected int width_
protected int height_
protected boolean state_
protected ImageButtonGroup group_
Constructor Detail |
public ImageButton(java.lang.String label, java.awt.Image img, int width, int height, boolean state, ImageButtonGroup group)
label
- label used when img is nullwidth
- image width, substituted by label width when img is nullheight
- allows uniform button height if some images are not available,
width determined from image or labelstate
- initial state flaggroup
- ImageButtonGroup for radio buttons, null for toggle buttonsMethod Detail |
public static java.awt.Image subimage(java.awt.Image img, int x, int y, int w, int h, java.awt.Component target)
public static boolean waitForImage(java.awt.Image img, java.awt.Component target)
public java.awt.Dimension minimumSize()
public java.awt.Dimension preferredSize()
public void update(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
public boolean mouseDown(java.awt.Event evt, int x, int y)
public void setState(boolean value)
public boolean getState()
public ImageButtonGroup getGroup()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |