1 4 package com.tc.admin.common; 5 6 import org.dijon.Spinner; 7 8 import javax.swing.JComponent ; 9 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 } 37 | Popular Tags |