1 48 49 50 package org.exolab.jms.tools.admin; 51 52 import java.awt.event.MouseEvent ; 53 import java.util.EventObject ; 54 55 import javax.swing.DefaultCellEditor ; 56 import javax.swing.JComboBox ; 57 import javax.swing.JTree ; 58 import javax.swing.SwingUtilities ; 59 60 61 67 public class OpenJMSEditor extends DefaultCellEditor { 68 69 private JTree tree_; 71 72 private JComboBox comboBox_; 74 75 80 public OpenJMSEditor(JTree tree, JComboBox comboBox) { 81 super(comboBox); 82 comboBox_ = comboBox; 83 tree_ = tree; 84 } 85 86 public boolean isCellEditable(EventObject e) { 87 boolean editable = false; 88 89 System.out.println("Checking Editable"); 90 if (e instanceof MouseEvent && 91 SwingUtilities.isRightMouseButton((MouseEvent ) e)) { 92 System.out.println("Editable"); 93 editable = true; 94 } 95 96 return editable; 97 } 98 99 } | Popular Tags |