From: Lukas P. <pe...@us...> - 2002-08-31 08:43:47
|
Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes In directory usw-pr-cvs1:/tmp/cvs-serv3425 Modified Files: PSelectorChildren.java Log Message: added 'Sort by' property Index: PSelectorChildren.java =================================================================== RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes/PSelectorChildren.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** PSelectorChildren.java 28 Aug 2002 18:02:38 -0000 1.1 --- PSelectorChildren.java 31 Aug 2002 08:43:42 -0000 1.2 *************** *** 41,47 **** --- 41,53 ---- import org.openide.nodes.AbstractNode; import org.openide.nodes.PropertySupport; + import net.sourceforge.javaprofiler.module.sheets.*; import net.sourceforge.javaprofiler.jpi.VirtualMachineImageRef; + /** This class creates selector Nodes, one for each children list that is + * provided by a specified JPI object. The available children lists are queried * for using <code>InterfaceRepository</code> class. + * <p>Most of the Nodes will have the capability of sorting their children. + * @author Lukas Petru + */ class PSelectorChildren extends Children.Array { private final Object source; *************** *** 64,72 **** Children children; ! if (childrenList.size()==0) children=Children.LEAF; ! else ! children=new PDataChildren(childrenList); ! AbstractNode node=new AbstractNode(children); node.setName(listName); node.setDisplayName(listName); --- 70,84 ---- Children children; ! SheetFactory sheet=null; ! if (childrenList.size()==0) { children=Children.LEAF; ! sheet=null; ! } else { ! PDataChildren pChildren=new PDataChildren(childrenList); ! children=pChildren; ! if (InterfaceRepository.canSort(childTypes[i])) ! sheet=new PSelectorSheet(pChildren, childTypes[i]); ! } ! AbstractNode node=new PSelectorNode(children, sheet, childTypes[i]); node.setName(listName); node.setDisplayName(listName); *************** *** 91,94 **** --- 103,108 ---- } + /** Special Nodes for which there is no information in InterfaceRepository. + */ List getSpecialNodes() { int type=InterfaceRepository.objectType(source); *************** *** 105,110 **** nodeList.add(node); ! node=new CallTreeNode(new BacktraceChildren( ! ref.getCPUTraces(), 1)); node.setName("Backtrace"); node.setDisplayName("Merg CPUTraces"); --- 119,128 ---- nodeList.add(node); ! Children children; ! if (ref.getCPUTraces().size()!=0) ! children=new BacktraceChildren(ref.getCPUTraces(), 1); ! else ! children=Children.LEAF; ! node=new CallTreeNode(children); node.setName("Backtrace"); node.setDisplayName("Merg CPUTraces"); *************** *** 121,126 **** /* * $Log$ ! * Revision 1.1 2002/08/28 18:02:38 petrul ! * nodes, version 2 * */ --- 139,144 ---- /* * $Log$ ! * Revision 1.2 2002/08/31 08:43:42 petrul ! * added 'Sort by' property * */ |