Thread: [Ejtools-cvs] CVS: libraries/adwt/src/main/net/sourceforge/ejtools/awt BeanContextListPanel.java,1.2
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-05-05 20:13:51
|
Update of /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt In directory usw-pr-cvs1:/tmp/cvs-serv8679/adwt/src/main/net/sourceforge/ejtools/awt Modified Files: BeanContextListPanel.java BeanContextListView.java BeanContextTreePanel.java BeanContextTreeView.java GenericMBeanCustomizer.java GenericMBeanMethodDialog.java GenericTitledBorder.java Log Message: Add some JavaDocs Index: BeanContextListPanel.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/BeanContextListPanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanContextListPanel.java 30 Apr 2002 21:07:09 -0000 1.2 --- BeanContextListPanel.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 28,47 **** /** ! *Description of the Class * ! * @author Administrator ! * @created 16 octobre 2001 */ public class BeanContextListPanel extends JSplitPane { ! /** Description of the Field */ JList list; /** ! *Constructor for the BeanContextListPanel object * ! * @param beancontext Description of Parameter */ public BeanContextListPanel(BeanContext beancontext) --- 28,47 ---- /** ! * Description of the Class * ! * @author Administrator ! * @created 16 octobre 2001 */ public class BeanContextListPanel extends JSplitPane { ! /** Description of the Field */ JList list; /** ! * Constructor for the BeanContextListPanel object * ! * @param beancontext Description of Parameter */ public BeanContextListPanel(BeanContext beancontext) *************** *** 52,59 **** /** ! *Constructor for the BeanContextListPanel object * ! * @param beancontext Description of Parameter ! * @param s Description of Parameter */ public BeanContextListPanel(BeanContext beancontext, String s) --- 52,59 ---- /** ! * Constructor for the BeanContextListPanel object * ! * @param beancontext Description of Parameter ! * @param s Description of Parameter */ public BeanContextListPanel(BeanContext beancontext, String s) *************** *** 119,123 **** { ! public void intervalAdded(ListDataEvent e) { list.clearSelection(); --- 119,123 ---- { ! public void contentsChanged(ListDataEvent e) { list.clearSelection(); *************** *** 127,131 **** ! public void intervalRemoved(ListDataEvent e) { list.clearSelection(); --- 127,131 ---- ! public void intervalAdded(ListDataEvent e) { list.clearSelection(); *************** *** 135,139 **** ! public void contentsChanged(ListDataEvent e) { list.clearSelection(); --- 135,139 ---- ! public void intervalRemoved(ListDataEvent e) { list.clearSelection(); Index: BeanContextListView.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/BeanContextListView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanContextListView.java 30 Apr 2002 21:07:09 -0000 1.2 --- BeanContextListView.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 1,7 **** /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.awt; --- 1,7 ---- /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.awt; *************** *** 28,270 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 */ ! public class BeanContextListView extends JList { ! static Class class$java$lang$Object; ! /** ! * Constructor for the BeanContextTreeView object ! * ! * @param beancontext Description of Parameter ! */ ! public BeanContextListView(BeanContext beancontext) { ! setModel(new BeanContextListModel(beancontext)); ! setCellRenderer( ! new DefaultListCellRenderer() { ! public Component getListCellRendererComponent(JList list, Object obj, int index, boolean isSelected, boolean cellHasFocus) { ! try { ! ContextElement contextelement = (ContextElement) obj; ! Object obj1 = contextelement.getUserObject(); ! super.getListCellRendererComponent(list, obj1, index, isSelected, cellHasFocus); ! if (contextelement.icon != null) { ! setIcon(contextelement.icon); ! } ! return this; ! } catch (Exception _ex) { ! System.err.println(_ex.getMessage()); ! return super.getListCellRendererComponent(list, obj, index, isSelected, cellHasFocus); ! } ! } ! }); ! } ! /** ! *Description of the Method ! * ! * @param s Description of Parameter ! * @return Description of the Returned Value ! */ ! static Class _mthclass$(String s) { ! try { ! return Class.forName(s); ! } catch (ClassNotFoundException classnotfoundexception) { ! throw new NoClassDefFoundError(classnotfoundexception.getMessage()); ! } ! } ! /** ! *Description of the Class ! * ! * @author Administrator ! * @created 16 octobre 2001 ! */ ! class BeanContextListModel implements ListModel, BeanContextMembershipListener { ! BeanContext context; ! Vector listeners = new Vector(); ! Vector content = new Vector(); ! /** ! *Constructor for the BeanContextListModel object ! * ! * @param beancontext Description of Parameter ! */ ! BeanContextListModel(BeanContext beancontext) { ! context = beancontext; ! context.addBeanContextMembershipListener(this); ! updateModel(); ! } ! /** ! *Gets the size attribute of the BeanContextListModel object ! * ! * @return The size value ! */ ! public int getSize() { ! return context.size(); ! } ! /** ! *Description of the Method ! * ! * @param index Description of Parameter ! * @return Description of the Returned Value ! */ ! public Object getElementAt(int index) { ! return content.elementAt(index); ! } ! /** ! *Adds a feature to the ListDataListener attribute of the BeanContextListModel object ! * ! * @param l The feature to be added to the ListDataListener attribute ! */ ! public void addListDataListener(ListDataListener l) { ! listeners.add(l); ! } ! /** ! *Description of the Method ! * ! * @param l Description of Parameter ! */ ! public void removeListDataListener(ListDataListener l) { ! listeners.remove(l); ! } ! /** ! *Description of the Method ! * ! * @param beancontextmembershipevent Description of Parameter ! */ ! public void childrenAdded(BeanContextMembershipEvent beancontextmembershipevent) { ! updateModel(); ! notifyListener(); ! } ! /** ! *Description of the Method ! * ! * @param beancontextmembershipevent Description of Parameter ! */ ! public void childrenRemoved(BeanContextMembershipEvent beancontextmembershipevent) { ! updateModel(); ! notifyListener(); ! } ! /** ! *Description of the Method ! */ ! private void notifyListener() { ! ListDataEvent event = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, content.size()); ! for (int i = 0; i < listeners.size(); i++) { ! ListDataListener listener = (ListDataListener) listeners.elementAt(i); ! listener.contentsChanged(event); ! } ! } ! /** ! *Description of the Method ! */ ! private void updateModel() { ! content.clear(); ! Iterator enum = context.iterator(); ! while (enum.hasNext()) { ! content.addElement(new ContextElement(enum.next())); ! } ! } ! } ! /** ! *Description of the Class ! * ! * @author Administrator ! * @created 16 octobre 2001 ! */ ! class ContextElement implements BeanContextChildComponentProxy { ! ImageIcon icon = null; ! String txt; ! Object obj; ! /** ! *Constructor for the ContextNode object ! * ! * @param obj1 Description of Parameter ! */ ! ContextElement(Object obj1) { ! obj = obj1; ! try { ! BeanInfo beaninfo = Introspector.getBeanInfo(obj1.getClass()); ! if (beaninfo.getIcon(1) != null) { ! icon = new ImageIcon(beaninfo.getIcon(1)); ! } ! Method method = obj1.getClass().getMethod("toString", new Class[0]); ! if (method.getDeclaringClass().equals(BeanContextListView.class$java$lang$Object == null ? ((Object) (BeanContextListView.class$java$lang$Object = BeanContextListView._mthclass$("java.lang.Object"))) : ((Object) (BeanContextListView.class$java$lang$Object)))) { ! txt = beaninfo.getBeanDescriptor().getDisplayName(); ! } ! } catch (Exception exception) { ! exception.printStackTrace(); } ! } ! /** ! *Gets the component attribute of the ContextNode object ! * ! * @return The component value ! */ ! public Component getComponent() { ! if (obj instanceof Component) { ! return (Component) obj; ! } ! if (obj instanceof BeanContextContainerProxy) { ! return ((BeanContextContainerProxy) obj).getContainer(); ! } ! if (obj instanceof BeanContextChildComponentProxy) { ! return ((BeanContextChildComponentProxy) obj).getComponent(); ! } else { ! return new JLabel("No GUI available", 0); ! } ! } ! /** ! *Gets the userObject attribute of the ContextNode object ! * ! * @return The userObject value ! */ ! public Object getUserObject() { ! return obj; ! } ! /** ! *Description of the Method ! * ! * @return Description of the Returned Value ! */ ! public String toString() { ! return txt != null ? txt : obj.toString(); ! } ! } } --- 28,313 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 */ ! public class BeanContextListView extends JList ! { ! /** Description of the Field */ ! static Class class$java$lang$Object; ! /** ! * Constructor for the BeanContextTreeView object ! * ! * @param beancontext Description of Parameter ! */ ! public BeanContextListView(BeanContext beancontext) ! { ! setModel(new BeanContextListModel(beancontext)); ! setCellRenderer( ! new DefaultListCellRenderer() ! { ! public Component getListCellRendererComponent(JList list, Object obj, int index, boolean isSelected, boolean cellHasFocus) ! { ! try ! { ! ContextElement contextelement = (ContextElement) obj; ! Object obj1 = contextelement.getUserObject(); ! super.getListCellRendererComponent(list, obj1, index, isSelected, cellHasFocus); ! if (contextelement.icon != null) ! { ! setIcon(contextelement.icon); ! } ! return this; ! } ! catch (Exception _ex) ! { ! System.err.println(_ex.getMessage()); ! return super.getListCellRendererComponent(list, obj, index, isSelected, cellHasFocus); ! } ! } ! }); ! } ! /** ! * Description of the Method ! * ! * @param s Description of Parameter ! * @return Description of the Returned Value ! */ ! static Class _mthclass$(String s) ! { ! try ! { ! return Class.forName(s); ! } ! catch (ClassNotFoundException classnotfoundexception) ! { ! throw new NoClassDefFoundError(classnotfoundexception.getMessage()); ! } ! } ! /** ! * Description of the Class ! * ! * @author Administrator ! * @created 16 octobre 2001 ! */ ! class BeanContextListModel implements ListModel, BeanContextMembershipListener ! { ! /** Description of the Field */ ! Vector content = new Vector(); ! /** Description of the Field */ ! BeanContext context; ! /** Description of the Field */ ! Vector listeners = new Vector(); ! /** ! * Constructor for the BeanContextListModel object ! * ! * @param beancontext Description of Parameter ! */ ! BeanContextListModel(BeanContext beancontext) ! { ! context = beancontext; ! context.addBeanContextMembershipListener(this); ! updateModel(); ! } ! /** ! * Adds a feature to the ListDataListener attribute of the ! * BeanContextListModel object ! * ! * @param l The feature to be added to the ListDataListener attribute ! */ ! public void addListDataListener(ListDataListener l) ! { ! listeners.add(l); ! } ! /** ! * Description of the Method ! * ! * @param beancontextmembershipevent Description of Parameter ! */ ! public void childrenAdded(BeanContextMembershipEvent beancontextmembershipevent) ! { ! updateModel(); ! notifyListener(); ! } ! /** ! * Description of the Method ! * ! * @param beancontextmembershipevent Description of Parameter ! */ ! public void childrenRemoved(BeanContextMembershipEvent beancontextmembershipevent) ! { ! updateModel(); ! notifyListener(); ! } ! /** ! * Description of the Method ! * ! * @param index Description of Parameter ! * @return Description of the Returned Value ! */ ! public Object getElementAt(int index) ! { ! return content.elementAt(index); ! } ! /** ! * Gets the size attribute of the BeanContextListModel object ! * ! * @return The size value ! */ ! public int getSize() ! { ! return context.size(); ! } ! /** ! * Description of the Method ! * ! * @param l Description of Parameter ! */ ! public void removeListDataListener(ListDataListener l) ! { ! listeners.remove(l); ! } ! /** Description of the Method */ ! private void notifyListener() ! { ! ListDataEvent event = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, content.size()); ! for (int i = 0; i < listeners.size(); i++) ! { ! ListDataListener listener = (ListDataListener) listeners.elementAt(i); ! listener.contentsChanged(event); ! } ! } ! /** Description of the Method */ ! private void updateModel() ! { ! content.clear(); ! Iterator enum = context.iterator(); ! while (enum.hasNext()) ! { ! content.addElement(new ContextElement(enum.next())); ! } ! } ! } ! /** ! * Description of the Class ! * ! * @author Administrator ! * @created 16 octobre 2001 ! */ ! class ContextElement implements BeanContextChildComponentProxy ! { ! /** Description of the Field */ ! ImageIcon icon = null; ! /** Description of the Field */ ! Object obj; ! /** Description of the Field */ ! String txt; ! /** ! * Constructor for the ContextNode object ! * ! * @param obj1 Description of Parameter ! */ ! ContextElement(Object obj1) ! { ! obj = obj1; ! try ! { ! BeanInfo beaninfo = Introspector.getBeanInfo(obj1.getClass()); ! if (beaninfo.getIcon(1) != null) ! { ! icon = new ImageIcon(beaninfo.getIcon(1)); } ! Method method = obj1.getClass().getMethod("toString", new Class[0]); ! if (method.getDeclaringClass().equals(BeanContextListView.class$java$lang$Object == null ? ((Object) (BeanContextListView.class$java$lang$Object = BeanContextListView._mthclass$("java.lang.Object"))) : ((Object) (BeanContextListView.class$java$lang$Object)))) ! { ! txt = beaninfo.getBeanDescriptor().getDisplayName(); ! } ! } ! catch (Exception exception) ! { ! exception.printStackTrace(); ! } ! } ! /** ! * Gets the component attribute of the ContextNode object ! * ! * @return The component value ! */ ! public Component getComponent() ! { ! if (obj instanceof Component) ! { ! return (Component) obj; ! } ! if (obj instanceof BeanContextContainerProxy) ! { ! return ((BeanContextContainerProxy) obj).getContainer(); ! } ! if (obj instanceof BeanContextChildComponentProxy) ! { ! return ((BeanContextChildComponentProxy) obj).getComponent(); ! } ! else ! { ! return new JLabel("No GUI available", 0); ! } ! } ! /** ! * Gets the userObject attribute of the ContextNode object ! * ! * @return The userObject value ! */ ! public Object getUserObject() ! { ! return obj; ! } ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! */ ! public String toString() ! { ! return txt != null ? txt : obj.toString(); ! } ! } } Index: BeanContextTreePanel.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/BeanContextTreePanel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanContextTreePanel.java 30 Apr 2002 21:07:09 -0000 1.2 --- BeanContextTreePanel.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 1,7 **** /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.awt; --- 1,7 ---- /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. */ package net.sourceforge.ejtools.awt; *************** *** 29,49 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 19 octobre 2001 ! * @todo Javadoc to complete ! * @todo Import to clean */ public class BeanContextTreePanel extends JSplitPane implements ObjectNameFinder { ! /** Description of the Field */ protected BeanContextTreeView tree; /** ! * Constructor for the BeanContextPanel object * ! * @param beancontext Description of Parameter */ public BeanContextTreePanel(BeanContext beancontext) --- 29,49 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 19 octobre 2001 ! * @todo Javadoc to complete ! * @todo Import to clean */ public class BeanContextTreePanel extends JSplitPane implements ObjectNameFinder { ! /** Description of the Field */ protected BeanContextTreeView tree; /** ! * Constructor for the BeanContextPanel object * ! * @param beancontext Description of Parameter */ public BeanContextTreePanel(BeanContext beancontext) *************** *** 54,61 **** /** ! * Constructor for the BeanContextPanel object * ! * @param beancontext Description of Parameter ! * @param s Description of Parameter */ public BeanContextTreePanel(BeanContext beancontext, String s) --- 54,61 ---- /** ! * Constructor for the BeanContextPanel object * ! * @param beancontext Description of Parameter ! * @param s Description of Parameter */ public BeanContextTreePanel(BeanContext beancontext, String s) *************** *** 140,146 **** /** ! * Gets the tree attribute of the BeanContextPanel object * ! * @return The tree value */ public JTree getTree() --- 140,146 ---- /** ! * Gets the tree attribute of the BeanContextPanel object * ! * @return The tree value */ public JTree getTree() *************** *** 151,161 **** /** ! * Description of the Method * ! * @param searchString Description of the Parameter */ public void searchObjectName(String objectName) { ! System.out.println("BeanContextPanel In searchReference(" + objectName+ ")"); tree.searchObjectName(objectName); } --- 151,161 ---- /** ! * Description of the Method * ! * @param objectName Description of the Parameter */ public void searchObjectName(String objectName) { ! System.out.println("BeanContextPanel In searchReference(" + objectName + ")"); tree.searchObjectName(objectName); } *************** *** 163,169 **** /** ! * Sets the showRoot attribute of the BeanContextPanel object * ! * @param flag The new showRoot value */ public void setShowRoot(boolean flag) --- 163,169 ---- /** ! * Sets the showRoot attribute of the BeanContextPanel object * ! * @param flag The new showRoot value */ public void setShowRoot(boolean flag) Index: BeanContextTreeView.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/BeanContextTreeView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanContextTreeView.java 30 Apr 2002 21:07:09 -0000 1.2 --- BeanContextTreeView.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 48,70 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 ! * @todo Javadoc to complete ! * @todo Import to clean */ public class BeanContextTreeView extends JTree implements ObjectNameFinder { ! /** Description of the Field */ protected Hashtable indexes = new Hashtable(); ! /** Description of the Field */ private static Category cat = Category.getInstance(BeanContextTreeView.class.getName()); /** ! * Constructor for the BeanContextTreeView object * ! * @param context Description of Parameter */ public BeanContextTreeView(BeanContext context) --- 48,70 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 ! * @todo Javadoc to complete ! * @todo Import to clean */ public class BeanContextTreeView extends JTree implements ObjectNameFinder { ! /** Description of the Field */ protected Hashtable indexes = new Hashtable(); ! /** Description of the Field */ private static Category cat = Category.getInstance(BeanContextTreeView.class.getName()); /** ! * Constructor for the BeanContextTreeView object * ! * @param context Description of Parameter */ public BeanContextTreeView(BeanContext context) *************** *** 164,174 **** { /* ! * try { ! * Object obj = ((ContextNode) ((DefaultMutableTreeNode) selPath.getLastPathComponent()).getUserObject()).getUserObject(); ! * if (obj instanceof BeanContextEditable) { ! * ((BeanContextEditable) obj).setSelection(); ! * } ! * } catch (Exception _ex) { ! * } */ } --- 164,174 ---- { /* ! * try { ! * Object obj = ((ContextNode) ((DefaultMutableTreeNode) selPath.getLastPathComponent()).getUserObject()).getUserObject(); ! * if (obj instanceof BeanContextEditable) { ! * ((BeanContextEditable) obj).setSelection(); ! * } ! * } catch (Exception _ex) { ! * } */ } *************** *** 180,190 **** /** ! * Description of the Method * ! * @param searchString Description of the Parameter */ public void searchObjectName(String objectName) { ! System.out.println("BeanContextTreeView In searchReference(" + objectName+ ")"); TreeNode[] nodes = (TreeNode[]) indexes.get(objectName); if (nodes != null) --- 180,190 ---- /** ! * Description of the Method * ! * @param objectName Description of the Parameter */ public void searchObjectName(String objectName) { ! System.out.println("BeanContextTreeView In searchReference(" + objectName + ")"); TreeNode[] nodes = (TreeNode[]) indexes.get(objectName); if (nodes != null) *************** *** 197,204 **** /** ! * Description of the Method * ! * @param collection Description of Parameter ! * @param defaultmutabletreenode Description of Parameter */ private void updateTree(Collection collection, DefaultMutableTreeNode defaultmutabletreenode) --- 197,204 ---- /** ! * Description of the Method * ! * @param collection Description of Parameter ! * @param defaultmutabletreenode Description of Parameter */ private void updateTree(Collection collection, DefaultMutableTreeNode defaultmutabletreenode) *************** *** 237,264 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 */ public class ContextNode implements BeanContextChildComponentProxy { ! /** Description of the Field */ Icon closed; ! /** Description of the Field */ Icon icon; ! /** Description of the Field */ Object obj; ! /** Description of the Field */ Icon open; ! /** Description of the Field */ String txt; /** ! * Constructor for the ContextNode object * ! * @param obj1 Description of Parameter */ ContextNode(Object obj1) --- 237,264 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 */ public class ContextNode implements BeanContextChildComponentProxy { ! /** Description of the Field */ Icon closed; ! /** Description of the Field */ Icon icon; ! /** Description of the Field */ Object obj; ! /** Description of the Field */ Icon open; ! /** Description of the Field */ String txt; /** ! * Constructor for the ContextNode object * ! * @param obj1 Description of Parameter */ ContextNode(Object obj1) *************** *** 295,301 **** /** ! * Gets the Component attribute of the ContextNode object * ! * @return The Component value */ public Component getComponent() --- 295,301 ---- /** ! * Gets the Component attribute of the ContextNode object * ! * @return The Component value */ public Component getComponent() *************** *** 321,327 **** /** ! * Gets the UserObject attribute of the ContextNode object * ! * @return The UserObject value */ public Object getUserObject() --- 321,327 ---- /** ! * Gets the UserObject attribute of the ContextNode object * ! * @return The UserObject value */ public Object getUserObject() *************** *** 332,338 **** /** ! * Description of the Method * ! * @return Description of the Returned Value */ public String toString() --- 332,338 ---- /** ! * Description of the Method * ! * @return Description of the Returned Value */ public String toString() *************** *** 344,366 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 */ public class PopupAction extends AbstractAction { ! /** Description of the Field */ MethodDescriptor md; ! /** Description of the Field */ Object obj; /** ! * Constructor for the PopupAction object * ! * @param obj1 Description of Parameter ! * @param methoddescriptor Description of Parameter */ PopupAction(Object obj1, MethodDescriptor methoddescriptor) --- 344,366 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 */ public class PopupAction extends AbstractAction { ! /** Description of the Field */ MethodDescriptor md; ! /** Description of the Field */ Object obj; /** ! * Constructor for the PopupAction object * ! * @param obj1 Description of Parameter ! * @param methoddescriptor Description of Parameter */ PopupAction(Object obj1, MethodDescriptor methoddescriptor) *************** *** 373,379 **** /** ! * Description of the Method * ! * @param actionevent Description of Parameter */ public void actionPerformed(ActionEvent actionevent) --- 373,379 ---- /** ! * Description of the Method * ! * @param actionevent Description of Parameter */ public void actionPerformed(ActionEvent actionevent) *************** *** 399,418 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 */ protected class ServerTreeSync implements BeanContextMembershipListener { ! /** Description of the Field */ DefaultMutableTreeNode node; /** ! * Constructor for the ServerTreeSync object * ! * @param defaultmutabletreenode Description of Parameter */ ServerTreeSync(DefaultMutableTreeNode defaultmutabletreenode) --- 399,418 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 24 septembre 2001 */ protected class ServerTreeSync implements BeanContextMembershipListener { ! /** Description of the Field */ DefaultMutableTreeNode node; /** ! * Constructor for the ServerTreeSync object * ! * @param defaultmutabletreenode Description of Parameter */ ServerTreeSync(DefaultMutableTreeNode defaultmutabletreenode) *************** *** 423,429 **** /** ! * Description of the Method * ! * @param beancontextmembershipevent Description of Parameter */ public void childrenAdded(BeanContextMembershipEvent beancontextmembershipevent) --- 423,429 ---- /** ! * Description of the Method * ! * @param beancontextmembershipevent Description of Parameter */ public void childrenAdded(BeanContextMembershipEvent beancontextmembershipevent) *************** *** 459,465 **** /** ! * Description of the Method * ! * @param beancontextmembershipevent Description of Parameter */ public void childrenRemoved(BeanContextMembershipEvent beancontextmembershipevent) --- 459,465 ---- /** ! * Description of the Method * ! * @param beancontextmembershipevent Description of Parameter */ public void childrenRemoved(BeanContextMembershipEvent beancontextmembershipevent) Index: GenericMBeanCustomizer.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/GenericMBeanCustomizer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GenericMBeanCustomizer.java 30 Apr 2002 21:07:09 -0000 1.4 --- GenericMBeanCustomizer.java 5 May 2002 20:13:45 -0000 1.5 *************** *** 1,7 **** /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at gnu.org. */ package net.sourceforge.ejtools.awt; --- 1,7 ---- /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at gnu.org. */ package net.sourceforge.ejtools.awt; *************** *** 44,78 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 8 avril 2002 ! * @todo Protected method to choose PropertyEditor by Class and Name ! * @todo Constructor Info ! * @todo Notification Info ! * @todo Layout for Contructor Attribute Operation and Notification ! * @todo Non Supported classes displayed ! * @todo Result of Command put into an Output List */ public class GenericMBeanCustomizer extends JScrollPane implements Customizer { ! /** Description of the Field */ protected JPanel beanGui; ! /** Description of the Field */ protected MBeanAttributeInfo mbai[]; ! /** Description of the Field */ protected MBeanNotificationInfo mbni[]; ! /** Description of the Field */ protected MBeanOperationInfo mboi[]; ! /** Description of the Field */ protected MBeanAccessor object; ! /** Description of the Field */ protected JPanel p; ! /** Description of the Field */ protected JComponent previous; ! /** Constructor for the GenericCustomizer object */ public GenericMBeanCustomizer() { --- 44,78 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 8 avril 2002 ! * @todo Protected method to choose PropertyEditor by Class and Name ! * @todo Constructor Info ! * @todo Notification Info ! * @todo Layout for Contructor Attribute Operation and Notification ! * @todo Non Supported classes displayed ! * @todo Result of Command put into an Output List */ public class GenericMBeanCustomizer extends JScrollPane implements Customizer { ! /** Description of the Field */ protected JPanel beanGui; ! /** Description of the Field */ protected MBeanAttributeInfo mbai[]; ! /** Description of the Field */ protected MBeanNotificationInfo mbni[]; ! /** Description of the Field */ protected MBeanOperationInfo mboi[]; ! /** Description of the Field */ protected MBeanAccessor object; ! /** Description of the Field */ protected JPanel p; ! /** Description of the Field */ protected JComponent previous; ! /** Constructor for the GenericCustomizer object */ public GenericMBeanCustomizer() { *************** *** 85,91 **** /** ! * Constructor for the GenericCustomizer object * ! * @param obj Description of Parameter */ public GenericMBeanCustomizer(Object obj) --- 85,91 ---- /** ! * Constructor for the GenericCustomizer object * ! * @param obj Description of Parameter */ public GenericMBeanCustomizer(Object obj) *************** *** 97,106 **** /** ! * Adds a feature to the ArrayProperty attribute of the GenericCustomizer ! * object * ! * @param propertyeditor The feature to be added to the ArrayProperty * attribute ! * @param attributeInfo The feature to be added to the ArrayProperty * attribute */ --- 97,106 ---- /** ! * Adds a feature to the ArrayProperty attribute of the GenericCustomizer ! * object * ! * @param propertyeditor The feature to be added to the ArrayProperty * attribute ! * @param attributeInfo The feature to be added to the ArrayProperty * attribute */ *************** *** 210,217 **** /** ! * Adds a feature to the Property attribute of the GenericCustomizer object * ! * @param propertyeditor The feature to be added to the Property attribute ! * @param attributeInfo The feature to be added to the Property attribute */ public void addProperty(PropertyEditor propertyeditor, MBeanAttributeInfo attributeInfo) --- 210,217 ---- /** ! * Adds a feature to the Property attribute of the GenericCustomizer object * ! * @param propertyeditor The feature to be added to the Property attribute ! * @param attributeInfo The feature to be added to the Property attribute */ public void addProperty(PropertyEditor propertyeditor, MBeanAttributeInfo attributeInfo) *************** *** 326,333 **** /** ! * Adds a feature to the UnsupportedProperty attribute of the ! * GenericMBeanCustomizer object * ! * @param attributeInfo The feature to be added to the UnsupportedProperty * attribute */ --- 326,333 ---- /** ! * Adds a feature to the UnsupportedProperty attribute of the ! * GenericMBeanCustomizer object * ! * @param attributeInfo The feature to be added to the UnsupportedProperty * attribute */ *************** *** 360,366 **** /** ! * Sets the Object attribute of the GenericCustomizer object * ! * @param obj The new Object value */ public void setObject(Object obj) --- 360,366 ---- /** ! * Sets the Object attribute of the GenericCustomizer object * ! * @param obj The new Object value */ public void setObject(Object obj) *************** *** 473,481 **** /** ! * Description of the Method * ! * @param s Description of Parameter ! * @param obj Description of Parameter ! * @param obj1 Description of Parameter */ protected void updated(String s, Object obj, Object obj1) --- 473,481 ---- /** ! * Description of the Method * ! * @param s Description of Parameter ! * @param obj Description of Parameter ! * @param obj1 Description of Parameter */ protected void updated(String s, Object obj, Object obj1) *************** *** 486,504 **** /** ! * Description of the Class * ! * @author laurent ! * @created 11 avril 2002 */ class BeanUpdater implements PropertyChangeListener { ! /** Description of the Field */ MBeanAttributeInfo info; /** ! * Constructor for the BeanUpdater object * ! * @param info Description of Parameter */ public BeanUpdater(MBeanAttributeInfo info) --- 486,504 ---- /** ! * Description of the Class * ! * @author laurent ! * @created 11 avril 2002 */ class BeanUpdater implements PropertyChangeListener { ! /** Description of the Field */ MBeanAttributeInfo info; /** ! * Constructor for the BeanUpdater object * ! * @param info Description of Parameter */ public BeanUpdater(MBeanAttributeInfo info) *************** *** 509,515 **** /** ! * Description of the Method * ! * @param event Description of Parameter */ public void propertyChange(PropertyChangeEvent event) --- 509,515 ---- /** ! * Description of the Method * ! * @param event Description of Parameter */ public void propertyChange(PropertyChangeEvent event) *************** *** 528,542 **** } /* ! * AS Adapt to the JMXConnector exceptions ! * catch( InvocationTargetException e ) { ! * if( e.getTargetException() instanceof PropertyVetoException ) { ! * JOptionPane.showMessageDialog( ! * (Frame) SwingUtilities.windowForComponent( GenericMBeanCustomizer.this ), ! * "Could not change value:" + e.getTargetException().getMessage(), ! * "Error", ! * JOptionPane.ERROR_MESSAGE ! * ); ! * } ! * } */ catch (Exception e) --- 528,542 ---- } /* ! * AS Adapt to the JMXConnector exceptions ! * catch( InvocationTargetException e ) { ! * if( e.getTargetException() instanceof PropertyVetoException ) { ! * JOptionPane.showMessageDialog( ! * (Frame) SwingUtilities.windowForComponent( GenericMBeanCustomizer.this ), ! * "Could not change value:" + e.getTargetException().getMessage(), ! * "Error", ! * JOptionPane.ERROR_MESSAGE ! * ); ! * } ! * } */ catch (Exception e) *************** *** 549,573 **** /** ! * This class makes sure that the customizer is updated with the object ! * changes * ! * @author andreass ! * @created November 24, 2000 */ class EditorUpdater implements PropertyChangeListener { ! /** Description of the Field */ PropertyEditor editor; ! /** Description of the Field */ MBeanAttributeInfo info; ! /** Description of the Field */ String name; /** ! * Constructor for the EditorUpdater object * ! * @param editor Description of Parameter ! * @param info Description of Parameter */ public EditorUpdater(PropertyEditor editor, MBeanAttributeInfo info) --- 549,573 ---- /** ! * This class makes sure that the customizer is updated with the object ! * changes * ! * @author andreass ! * @created November 24, 2000 */ class EditorUpdater implements PropertyChangeListener { ! /** Description of the Field */ PropertyEditor editor; ! /** Description of the Field */ MBeanAttributeInfo info; ! /** Description of the Field */ String name; /** ! * Constructor for the EditorUpdater object * ! * @param editor Description of Parameter ! * @param info Description of Parameter */ public EditorUpdater(PropertyEditor editor, MBeanAttributeInfo info) *************** *** 580,587 **** /** ! * Constructor for the EditorUpdater object * ! * @param editor Description of Parameter ! * @param name Description of Parameter */ public EditorUpdater(PropertyEditor editor, String name) --- 580,587 ---- /** ! * Constructor for the EditorUpdater object * ! * @param editor Description of Parameter ! * @param name Description of Parameter */ public EditorUpdater(PropertyEditor editor, String name) *************** *** 593,599 **** /** ! * Description of the Method * ! * @param event Description of Parameter */ public void propertyChange(PropertyChangeEvent event) --- 593,599 ---- /** ! * Description of the Method * ! * @param event Description of Parameter */ public void propertyChange(PropertyChangeEvent event) *************** *** 635,653 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 10 janvier 2002 */ class MethodInvoker implements ActionListener { ! /** Description of the Field */ MBeanOperationInfo info; /** ! * Constructor for the MethodInvoker object * ! * @param info Description of Parameter */ MethodInvoker(MBeanOperationInfo info) --- 635,653 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 10 janvier 2002 */ class MethodInvoker implements ActionListener { ! /** Description of the Field */ MBeanOperationInfo info; /** ! * Constructor for the MethodInvoker object * ! * @param info Description of Parameter */ MethodInvoker(MBeanOperationInfo info) *************** *** 658,664 **** /** ! * Description of the Method * ! * @param e Description of Parameter */ public void actionPerformed(ActionEvent e) --- 658,664 ---- /** ! * Description of the Method * ! * @param e Description of Parameter */ public void actionPerformed(ActionEvent e) *************** *** 701,715 **** /** ! * Description of the Class * ! * @author laurent ! * @created 27 avril 2002 */ class UnregisterInvoker implements ActionListener { /** ! * Description of the Method * ! * @param e Description of the Parameter */ public void actionPerformed(ActionEvent e) --- 701,715 ---- /** ! * Description of the Class * ! * @author laurent ! * @created 27 avril 2002 */ class UnregisterInvoker implements ActionListener { /** ! * Description of the Method * ! * @param e Description of the Parameter */ public void actionPerformed(ActionEvent e) Index: GenericMBeanMethodDialog.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/GenericMBeanMethodDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GenericMBeanMethodDialog.java 30 Apr 2002 21:07:09 -0000 1.2 --- GenericMBeanMethodDialog.java 5 May 2002 20:13:45 -0000 1.3 *************** *** 1,7 **** /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at gnu.org. */ package net.sourceforge.ejtools.awt; --- 1,7 ---- /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at gnu.org. */ package net.sourceforge.ejtools.awt; *************** *** 36,60 **** /** ! *Description of the Class * ! * @author letiembl ! * @created 7 février 2002 */ public class GenericMBeanMethodDialog extends JDialog implements ActionListener { private Vector mEditors = new Vector(); private MBeanOperationInfo mOperation; ! private MBeanAccessor mConnector; private ObjectName mService; /** ! * Create a new dialog. * ! * @param pConnector Connector to the remote MBean Server ! * @param pService Remote Service Bean on which the method should be invoked ! * @param pOperation Operation to be invoked if accepted ! * @param pOwner Owner of the dialog controlling its appearance */ public GenericMBeanMethodDialog(MBeanAccessor pConnector, ObjectName pService, MBeanOperationInfo pOperation, Frame pOwner) --- 36,65 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 7 février 2002 */ public class GenericMBeanMethodDialog extends JDialog implements ActionListener { + /** Description of the Field */ + private MBeanAccessor mConnector; + /** Description of the Field */ private Vector mEditors = new Vector(); + /** Description of the Field */ private MBeanOperationInfo mOperation; ! /** Description of the Field */ private ObjectName mService; /** ! * Create a new dialog. * ! * @param pConnector Connector to the remote MBean Server ! * @param pService Remote Service Bean on which the method should be ! * invoked ! * @param pOperation Operation to be invoked if accepted ! * @param pOwner Owner of the dialog controlling its appearance */ public GenericMBeanMethodDialog(MBeanAccessor pConnector, ObjectName pService, MBeanOperationInfo pOperation, Frame pOwner) *************** *** 101,147 **** Class cl = ClassTools.getClass(lParameter.getType()); ! lName = new JLabel(lParameter.getName() + ":", JLabel.RIGHT); ! c.gridwidth = GridBagConstraints.RELATIVE; ! c.fill = GridBagConstraints.NONE; ! c.weightx = 0; ! con.add(lName, c); ! if (cl != null) { ! PropertyEditor lEditor = PropertyEditorManager.findEditor(cl); ! if (lEditor != null) { ! // Set initial value ! if (lEditor.getTags() != null) { ! // Set to first value ! lEditor.setAsText(lEditor.getTags()[0]); ! } ! Component lEditorComp; ! if (lEditor.supportsCustomEditor()) ! { ! lEditorComp = lEditor.getCustomEditor(); ! } ! else ! { ! String[] lTags = lEditor.getTags(); ! if (lTags != null) { ! lEditorComp = new GenericPropertyCustomizer(lEditor, lTags); } else { ! lEditorComp = new GenericPropertyCustomizer(lEditor); } - } ! c.gridwidth = GridBagConstraints.REMAINDER; ! c.fill = GridBagConstraints.HORIZONTAL; ! c.weightx = 1; ! con.add(lEditorComp, c); ! mEditors.addElement(new Editor(lEditor, lParameter.getType())); } ! }else { Component lEditorComp; lEditorComp = new JLabel("Unsupported class " + lParameter.getType()); --- 106,155 ---- Class cl = ClassTools.getClass(lParameter.getType()); ! lName = new JLabel(lParameter.getName() + ":", JLabel.RIGHT); ! c.gridwidth = GridBagConstraints.RELATIVE; ! c.fill = GridBagConstraints.NONE; ! c.weightx = 0; ! con.add(lName, c); ! if (cl != null) { ! PropertyEditor lEditor = PropertyEditorManager.findEditor(cl); ! if (lEditor != null) { ! // Set initial value ! if (lEditor.getTags() != null) ! { ! // Set to first value ! lEditor.setAsText(lEditor.getTags()[0]); ! } ! Component lEditorComp; ! if (lEditor.supportsCustomEditor()) { ! lEditorComp = lEditor.getCustomEditor(); } else { ! String[] lTags = lEditor.getTags(); ! if (lTags != null) ! { ! lEditorComp = new GenericPropertyCustomizer(lEditor, lTags); ! } ! else ! { ! lEditorComp = new GenericPropertyCustomizer(lEditor); ! } } ! c.gridwidth = GridBagConstraints.REMAINDER; ! c.fill = GridBagConstraints.HORIZONTAL; ! c.weightx = 1; ! con.add(lEditorComp, c); ! mEditors.addElement(new Editor(lEditor, lParameter.getType())); ! } } ! else ! { Component lEditorComp; lEditorComp = new JLabel("Unsupported class " + lParameter.getType()); *************** *** 164,168 **** p.add(cancel); cancel.addActionListener(this); ! con.add(p,c); pack(); --- 172,176 ---- p.add(cancel); cancel.addActionListener(this); ! con.add(p, c); pack(); *************** *** 186,192 **** // ActionListener implementation --------------------------------- /** ! * Ok or Cancel has been pressed. * ! * @param e the event */ public void actionPerformed(ActionEvent e) --- 194,200 ---- // ActionListener implementation --------------------------------- /** ! * Ok or Cancel has been pressed. * ! * @param e the event */ public void actionPerformed(ActionEvent e) *************** *** 240,259 **** /** ! *Description of the Class * ! * @author letiembl ! * @created 7 février 2002 */ private class Editor { private PropertyEditor mEditor; private String mType; /** ! *Constructor for the Editor object * ! * @param pEditor Description of Parameter ! * @param pType Description of Parameter */ public Editor(PropertyEditor pEditor, String pType) --- 248,269 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 7 février 2002 */ private class Editor { + /** Description of the Field */ private PropertyEditor mEditor; + /** Description of the Field */ private String mType; /** ! * Constructor for the Editor object * ! * @param pEditor Description of Parameter ! * @param pType Description of Parameter */ public Editor(PropertyEditor pEditor, String pType) *************** *** 265,271 **** /** ! *Getter for the editor attribute * ! * @return The value of editor attribute */ public PropertyEditor getEditor() --- 275,281 ---- /** ! * Getter for the editor attribute * ! * @return The value of editor attribute */ public PropertyEditor getEditor() *************** *** 276,282 **** /** ! *Getter for the type attribute * ! * @return The value of type attribute */ public String getType() --- 286,292 ---- /** ! * Getter for the type attribute * ! * @return The value of type attribute */ public String getType() Index: GenericTitledBorder.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/GenericTitledBorder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GenericTitledBorder.java 18 Apr 2002 21:10:30 -0000 1.1 --- GenericTitledBorder.java 5 May 2002 20:13:45 -0000 1.2 *************** *** 1,7 **** /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at gnu.org. */ package net.sourceforge.ejtools.awt; --- 1,7 ---- /* ! * EJTools, the Enterprise Java Tools * ! * Distributable under LGPL license. ! * See terms of license at gnu.org. */ package net.sourceforge.ejtools.awt; *************** *** 24,86 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 8 avril 2002 */ public class GenericTitledBorder extends AbstractBorder { ! /** Description of the Field */ protected Border border; ! /** Description of the Field */ protected ImageIcon icon; ! /** Description of the Field */ protected String title; ! /** Description of the Field */ protected Color titleColor; ! /** Description of the Field */ protected Font titleFont; ! /** Description of the Field */ protected int titleJustification; ! /** Description of the Field */ protected int titlePosition; ! /** Description of the Field */ private Point imgLoc = new Point(); ! /** Description of the Field */ private Point textLoc = new Point(); ! /** Position title text in the center of the border line. */ public final static int CENTER = 2; ! /** Use the default justification for the title text. */ public final static int DEFAULT_JUSTIFICATION = 0; /** ! * Position title text at the left side of the border line for left to right ! * orientation, at the right side of the border line for right to left ! * orientation. */ public final static int LEADING = 4; ! /** Position title text at the left side of the border line. */ public final static int LEFT = 1; ! /** Position title text at the right side of the border line. */ public final static int RIGHT = 3; /** ! * Position title text at the right side of the border line for left to ! * right orientation, at the left side of the border line for right to left ! * orientation. */ public final static int TRAILING = 5; ! /** Space between the border and the component's edge */ protected final static int EDGE_SPACING = 2; ! /** Horizontal inset of text that is left or right justified */ protected final static int TEXT_INSET_H = 5; ! /** Space between the border and text */ protected final static int TEXT_SPACING = 2; /** ! * Creates a TitledBorder instance. * ! * @param title the title the border should display */ public GenericTitledBorder(String title) --- 24,86 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 8 avril 2002 */ public class GenericTitledBorder extends AbstractBorder { ! /** Description of the Field */ protected Border border; ! /** Description of the Field */ protected ImageIcon icon; ! /** Description of the Field */ protected String title; ! /** Description of the Field */ ... [truncated message content] |