All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.awt.ImageButton
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----ncsa.awt.ImageButton
- public class ImageButton
- extends Canvas
-
str_def
- This is used by the Habanero Framework to set the default image for the session
-
ImageButton(Image, Image, Image)
- Constructs a button with an image, an alternate image
when the button has been pressed, and a image to use when
the button has been disabled.
-
ImageButton(Image, Image, Image, int, int)
- Constructs a button with an image, an alternate image
when the button has been pressed, and a image to use when
the button has been disabled.
-
ImageButton(String)
- Constructs a button with an image, but no alternate images
-
ImageButton(String, String)
- Constructs a button with an image, and an alternate image
when the button has been pressed.
-
ImageButton(String, String, String)
- Constructs a button with an image, an alternate image
when the button has been pressed, and a image to use when
the button has been disabled.
-
ImageButton(String, String, String, int, int)
- Constructs a button with an image, an alternate image
when the button has been pressed, a image that is displayed when
the button has been disabled, and an image that is displayed when
the cursor is over the button.
-
addActionListener(ActionListener)
-
-
changeImages(Image, Image, Image)
- Lets you change the image of the ImageButton on the fly.
-
changeImages(String, String, String)
- Lets you change the image of the ImageButton on the fly.
-
contains(int, int)
-
-
drawImageAt(Graphics, int, int)
-
-
getImage()
-
-
getMinimumSize()
-
-
getPreferredSize()
-
-
getRefCon()
-
-
getSize()
-
-
hilite()
- Hilites the ImageButton.
-
isEnabled()
- Returns whether the ImageButton is enabled.
-
isHilited()
- Hilites the ImageButton.
-
main(String[])
-
-
paint(Graphics)
-
-
processMouseEvent(MouseEvent)
-
-
processMouseMotionEvent(MouseEvent)
-
-
removeActionListener(ActionListener)
-
-
resizeImages()
-
-
setBounds(int, int, int, int)
-
-
setEnabled(boolean)
-
-
setIBDisabled(Image)
-
-
setIBHilited(Image)
-
-
setIBNormal(Image)
-
-
setRefCon(int)
-
-
unhilite()
- Unhilites the ImageButton.
str_def
public static String str_def
- This is used by the Habanero Framework to set the default image for the session
ImageButton
public ImageButton(String normal)
- Constructs a button with an image, but no alternate images
- Parameters:
- normal - the file containing the normal button image to use
ImageButton
public ImageButton(String normal,
String hilited)
- Constructs a button with an image, and an alternate image
when the button has been pressed.
- Parameters:
- normal - the file containing the normal button image
- hilited - the file containing the hilited button image
ImageButton
public ImageButton(String normal,
String hilited,
String disabled)
- Constructs a button with an image, an alternate image
when the button has been pressed, and a image to use when
the button has been disabled.
- Parameters:
- normal - the file containing the normal button image
- hilited - the file containing the hilited button image
- disabled - the file containing the disabled button image
ImageButton
public ImageButton(String normal,
String hilited,
String disabled,
int imgWidth,
int imgHeight)
- Constructs a button with an image, an alternate image
when the button has been pressed, a image that is displayed when
the button has been disabled, and an image that is displayed when
the cursor is over the button.
- Parameters:
- normal - the file containing the normal button image
- hilited - the file containing the hilited button image
- disabled - the file containing the disabled button image
- hightlight - the file containing the hightlight button image
ImageButton
public ImageButton(Image normal,
Image hilited,
Image disabled)
- Constructs a button with an image, an alternate image
when the button has been pressed, and a image to use when
the button has been disabled.
- Parameters:
- normal - the normal button image
- hilited - the hilited button image
- disabled - the disabled button image
ImageButton
public ImageButton(Image normal,
Image hilited,
Image disabled,
int imgWidth,
int imgHeight)
- Constructs a button with an image, an alternate image
when the button has been pressed, and a image to use when
the button has been disabled.
Resizes the image to the proper dimensions.
- Parameters:
- normal - the normal button image
- hilited - the hilited button image
- disabled - the disabled button image
- imgWidth - the desired width of the image
- imgHeight - the desired height of the image
setIBNormal
public void setIBNormal(Image img)
setIBHilited
public void setIBHilited(Image img)
setIBDisabled
public void setIBDisabled(Image img)
resizeImages
public void resizeImages()
changeImages
public void changeImages(String normal,
String hilited,
String disabled)
- Lets you change the image of the ImageButton on the fly.
- Parameters:
- normal, - hilited, disabled names of the new images
use null for default
changeImages
public void changeImages(Image normal,
Image hilited,
Image disabled)
- Lets you change the image of the ImageButton on the fly.
- Parameters:
- normal, - hilited, disabled new images
use null for default
paint
public void paint(Graphics g)
- Overrides:
- paint in class Canvas
drawImageAt
public void drawImageAt(Graphics g,
int x,
int y)
contains
public boolean contains(int x,
int y)
- Overrides:
- contains in class Component
setEnabled
public void setEnabled(boolean b)
- Overrides:
- setEnabled in class Component
unhilite
public void unhilite()
- Unhilites the ImageButton. Takes care of the redraw
hilite
public void hilite()
- Hilites the ImageButton. Takes care of the redraw
isEnabled
public boolean isEnabled()
- Returns whether the ImageButton is enabled.
- Overrides:
- isEnabled in class Component
isHilited
public boolean isHilited()
- Hilites the ImageButton. Takes care of the redraw
addActionListener
public void addActionListener(ActionListener listener)
removeActionListener
public void removeActionListener(ActionListener listener)
processMouseMotionEvent
public void processMouseMotionEvent(MouseEvent e)
- Overrides:
- processMouseMotionEvent in class Component
processMouseEvent
public void processMouseEvent(MouseEvent e)
- Overrides:
- processMouseEvent in class Component
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Component
getMinimumSize
public Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class Component
getSize
public Dimension getSize()
- Overrides:
- getSize in class Component
setBounds
public void setBounds(int x,
int y,
int w,
int h)
- Overrides:
- setBounds in class Component
setRefCon
public void setRefCon(int r)
getRefCon
public int getRefCon()
getImage
public Image getImage()
main
public static void main(String foo[])
All Packages Class Hierarchy This Package Previous Next Index