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