]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-4_2_1-src/src/com/ibm/richtext/uiimpl/MenuItemSet.java
icu4jsrc
[Dictionary.git] / jars / icu4j-4_2_1-src / src / com / ibm / richtext / uiimpl / MenuItemSet.java
1 /*\r
2  * (C) Copyright IBM Corp. 1998-2004.  All Rights Reserved.\r
3  *\r
4  * The program is provided "as is" without any warranty express or\r
5  * implied, including the warranty of non-infringement and the implied\r
6  * warranties of merchantibility and fitness for a particular purpose.\r
7  * IBM will not be liable for any damages suffered by you as a result\r
8  * of using the Program. In no event will IBM be liable for any\r
9  * special, indirect or consequential damages or lost profits even if\r
10  * IBM has been advised of the possibility of their occurrence. IBM\r
11  * will not be liable for any third party claims against you.\r
12  */\r
13 package com.ibm.richtext.uiimpl;\r
14 \r
15 import com.ibm.richtext.textpanel.MTextPanel;\r
16 import com.ibm.richtext.textpanel.TextPanelEvent;\r
17 import com.ibm.richtext.textpanel.TextPanelListener;\r
18 \r
19 public abstract class MenuItemSet implements TextPanelListener {\r
20     \r
21     static final String COPYRIGHT =\r
22                 "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";\r
23     public static final boolean CHARACTER = true;\r
24     public static final boolean PARAGRAPH = false;\r
25 \r
26     private MTextPanel fTextPanel = null;\r
27     \r
28     public abstract void textEventOccurred(TextPanelEvent event);\r
29     public abstract boolean respondsToEventType(int type);\r
30     \r
31     public final void setTextPanel(MTextPanel textPanel) {\r
32         \r
33         if (fTextPanel != null) {\r
34             fTextPanel.removeListener(this);\r
35         }\r
36         fTextPanel = textPanel;\r
37         if (fTextPanel != null) {\r
38             fTextPanel.addListener(this);\r
39         }\r
40         \r
41         textPanelChanged();\r
42     }\r
43     \r
44     public final MTextPanel getTextPanel() {\r
45         \r
46         return fTextPanel;\r
47     }\r
48     \r
49     protected void textPanelChanged() {\r
50     }\r
51 }\r