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

Variable Index

 o SIZE

Constructor Index

 o PixIcon(Image, String)

Method Index

 o addActionListener(ActionListener)
Adds an action listener to the icon
 o getMinimumSize()
 o getPreferredSize()
 o paint(Graphics)
paints the thumbnail with associated name
 o processMouseEvent(MouseEvent)
if the thumbnail is clicked it will generate an action event
 o removeActionListner(ActionListener)
Removes an action listener from the icon
 o setImage(Image)

Variables

 o SIZE
 static final int SIZE

Constructors

 o 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)

Methods

 o setImage
 void setImage(Image im)
 o paint
 public void paint(Graphics g)
paints the thumbnail with associated name

Overrides:
paint in class Canvas
 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Component
 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Component
 o processMouseEvent
 public void processMouseEvent(MouseEvent ev)
if the thumbnail is clicked it will generate an action event

Overrides:
processMouseEvent in class Component
 o addActionListener
 public void addActionListener(ActionListener listener)
Adds an action listener to the icon

Parameters:
listener - the action listener added
 o 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