[Mc4j-cvs] mc4j/src/org/mc4j/console/bean/attribute AttributeNode.java,1.10,1.11 AttributeSetChildre
Brought to you by:
ghinkl
From: Greg H. <gh...@us...> - 2004-04-21 20:41:47
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10460/src/org/mc4j/console/bean/attribute Modified Files: AttributeNode.java AttributeSetChildren.java Log Message: sort attribute nodes Index: AttributeSetChildren.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeSetChildren.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AttributeSetChildren.java 7 Feb 2004 16:10:40 -0000 1.5 --- AttributeSetChildren.java 21 Apr 2004 20:41:18 -0000 1.6 *************** *** 30,34 **** * @version $Revision$($Author$ / $Date$) */ ! public class AttributeSetChildren extends Children.Array { protected MBeanNode mbeanNode; --- 30,34 ---- * @version $Revision$($Author$ / $Date$) */ ! public class AttributeSetChildren extends Children.SortedArray { protected MBeanNode mbeanNode; Index: AttributeNode.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/bean/attribute/AttributeNode.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AttributeNode.java 7 Apr 2004 03:07:14 -0000 1.10 --- AttributeNode.java 21 Apr 2004 20:41:17 -0000 1.11 *************** *** 20,32 **** package org.mc4j.console.bean.attribute; - import java.lang.reflect.Array; - import java.lang.reflect.InvocationTargetException; - - import javax.management.Attribute; - import javax.management.MBeanAttributeInfo; - import javax.management.MBeanServer; - import javax.management.ObjectInstance; - import javax.management.ObjectName; - import org.openide.actions.PropertiesAction; import org.openide.actions.ToolsAction; --- 20,23 ---- *************** *** 41,44 **** --- 32,44 ---- import org.mc4j.console.Refreshable; + import java.lang.reflect.Array; + import java.lang.reflect.InvocationTargetException; + + import javax.management.Attribute; + import javax.management.MBeanAttributeInfo; + import javax.management.MBeanServer; + import javax.management.ObjectInstance; + import javax.management.ObjectName; + /** * Represents an attribute on an MBean. *************** *** 47,51 **** * @version $Revision$($Author$ / $Date$) */ ! public class AttributeNode extends AbstractNode implements Refreshable { protected MBeanServer server; --- 47,51 ---- * @version $Revision$($Author$ / $Date$) */ ! public class AttributeNode extends AbstractNode implements Refreshable, Comparable { protected MBeanServer server; *************** *** 169,172 **** --- 169,177 ---- } + public int compareTo(Object o) { + Node otherNode = (Node) o; + return this.getDisplayName().compareTo(otherNode.getDisplayName()); + } + // RECOMMENDED - handle cloning specially (so as not to invoke the overhead of FilterNode): |