1 26 package org.objectweb.openccm.explorer.menu; 27 28 29 import org.objectweb.fractal.api.Component; 30 import org.objectweb.fractal.api.NoSuchInterfaceException; 31 import org.objectweb.openccm.explorer.CORBA.ConsoleFactory; 32 import org.objectweb.util.explorer.api.Tree; 33 import org.objectweb.util.explorer.swing.api.Explorer; 34 35 36 import javax.swing.AbstractAction ; 37 import javax.swing.ImageIcon ; 38 39 46 public abstract class AbstractMenuAction 47 extends AbstractAction 48 { 49 50 protected Component tree_; 51 protected Tree treeItf_ = null; 52 protected Explorer explorerItf_ = null; 53 54 57 protected AbstractMenuAction(String nom, ImageIcon image, String desc, Integer mnemonic, Component tree) { 58 super(nom, image); 59 putValue(SHORT_DESCRIPTION, desc); 60 putValue(MNEMONIC_KEY, mnemonic); 61 tree_ = tree; 62 if(tree_!=null){ 63 try { 64 treeItf_ = (Tree)tree_.getFcInterface(Tree.TREE); 65 explorerItf_ = (Explorer)tree_.getFcInterface(Explorer.EXPLORER); 66 } catch (NoSuchInterfaceException e) { 67 ConsoleFactory.getDebugConsole().add(e.getMessage()); 68 } 69 } 70 } 71 72 public abstract void actionPerformed(java.awt.event.ActionEvent ae); 73 74 } 75 | Popular Tags |