01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.admin.common;
05:
06: import javax.swing.JPopupMenu;
07:
08: import org.dijon.CheckBox;
09:
10: public class XCheckBox extends CheckBox {
11: protected XPopupListener m_popupListener;
12:
13: public XCheckBox() {
14: super ();
15: m_popupListener = new XPopupListener(this );
16:
17: JPopupMenu popup = createPopup();
18: if (popup != null) {
19: setPopupMenu(popup);
20: }
21: }
22:
23: public XCheckBox(String label) {
24: this ();
25: setText(label);
26: }
27:
28: protected JPopupMenu createPopup() {
29: return null;
30: }
31:
32: public void setPopupMenu(JPopupMenu popupMenu) {
33: m_popupListener.setPopupMenu(popupMenu);
34: }
35:
36: public JPopupMenu getPopupMenu() {
37: return m_popupListener.getPopupMenu();
38: }
39: }
|