1 package org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.actions; 2 3 17 18 22 public class ActionAddClassDescriptor extends javax.swing.AbstractAction 23 { 24 private org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaRootNode rootNode; 25 26 public ActionAddClassDescriptor(org.apache.ojb.tools.mapping.reversedb2.ojbmetatreemodel.OjbMetaRootNode pRootNode) 27 { 28 super("Add Class"); 29 rootNode = pRootNode; 30 } 31 32 35 public void actionPerformed(java.awt.event.ActionEvent e) 36 { 37 System.out.println("Action Command: " + e.getActionCommand()); 38 System.out.println("Action Params : " + e.paramString()); 39 System.out.println("Action Source : " + e.getSource()); 40 System.out.println("Action SrcCls : " + e.getSource().getClass().getName()); 41 org.apache.ojb.broker.metadata.ClassDescriptor cld = 42 new org.apache.ojb.broker.metadata.ClassDescriptor(rootNode.getRepository()); 43 cld.setTableName("New Table"); 45 rootNode.addClassDescriptor(cld); 46 } 47 48 } 49 | Popular Tags |