KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > Iconic


1 /*
2  * Copyright © 2004, Rob Gordon.
3  */

4 package org.oddjob;
5
6 import org.oddjob.images.IconListener;
7 import org.oddjob.images.IconTip;
8
9
10 /**
11  * An implementing class is able notify a visual display about
12  * the icon and tool tip to associate with the object.
13  * <p>
14  * Icon notifications are strings, which the client may then
15  * 'look up'. This allows the client to store an icon locally
16  * thus reducing network traffic. This does limit the object to
17  * not changing the icon for a paticular id after startup.
18  *
19  * @author Rob Gordon.
20  */

21 public interface Iconic {
22
23     /**
24      * Return the IconTip (Icon and ToolTip pair).
25      *
26      * @param id The icon id.
27      * @return The IconTip or null if it doesn't exist.
28      */

29     public IconTip iconForId(String JavaDoc id);
30
31     /**
32      * Add a listener.
33      *
34      * @param listener The IconListener.
35      */

36     public void addIconListener(IconListener listener);
37
38     /**
39      * Remove a listener.
40      *
41      * @param listener The IconListener.
42      */

43     public void removeIconListener(IconListener listener);
44 }
45
Popular Tags