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