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 org.dijon.Spinner;
07:
08: import javax.swing.JComponent;
09: import javax.swing.JPopupMenu;
10:
11: public class XSpinner extends Spinner {
12: protected XPopupListener m_popupListener;
13:
14: public XSpinner() {
15: super ();
16: m_popupListener = new XPopupListener(this );
17: setPopupMenu(createPopup());
18: }
19:
20: public void setEditor(JComponent editor) {
21: super .setEditor(editor);
22: m_popupListener.setTarget(editor);
23: }
24:
25: protected JPopupMenu createPopup() {
26: return null;
27: }
28:
29: public void setPopupMenu(JPopupMenu popupMenu) {
30: m_popupListener.setPopupMenu(popupMenu);
31: }
32:
33: public JPopupMenu getPopupMenu() {
34: return m_popupListener.getPopupMenu();
35: }
36: }
|