All Packages Class Hierarchy This Package Previous Next Index
Class Pixmap.PixIcon
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----Pixmap.PixIcon
- public class PixIcon
- extends Canvas
an icon used for thumbnail sketches of a Pixmap
currently all icons are square rather than proportional
to the image being iconified
- Author:
- Owen Astrachan
-
SIZE
-
-
PixIcon(Image, String)
-
-
addActionListener(ActionListener)
- Adds an action listener to the icon
-
getMinimumSize()
-
-
getPreferredSize()
-
-
paint(Graphics)
- paints the thumbnail with associated name
-
processMouseEvent(MouseEvent)
- if the thumbnail is clicked it will generate an action event
-
removeActionListner(ActionListener)
- Removes an action listener from the icon
-
setImage(Image)
-
SIZE
static final int SIZE
PixIcon
public PixIcon(Image im,
String name)
- Parameters:
- im - the image for which a thumbnail is created
- name - URL/filename of image (displayed with thumbnail)
setImage
void setImage(Image im)
paint
public void paint(Graphics g)
- paints the thumbnail with associated name
- Overrides:
- paint in class Canvas
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Component
getMinimumSize
public Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class Component
processMouseEvent
public void processMouseEvent(MouseEvent ev)
- if the thumbnail is clicked it will generate an action event
- Overrides:
- processMouseEvent in class Component
addActionListener
public void addActionListener(ActionListener listener)
- Adds an action listener to the icon
- Parameters:
- listener - the action listener added
removeActionListner
public void removeActionListner(ActionListener listener)
- Removes an action listener from the icon
- Parameters:
- listener - the action listener to remove
All Packages Class Hierarchy This Package Previous Next Index