From: Jan S. <st...@us...> - 2002-07-14 18:14:53
|
Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/nodes In directory usw-pr-cvs1:/tmp/cvs-serv1165 Added Files: AllocStatProperty.java CPUStatProperty.java MonStatProperty.java Log Message: Common properties. --- NEW FILE: AllocStatProperty.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.module.nodes; import java.util.*; import org.openide.nodes.*; import org.openide.util.NbBundle; import net.sourceforge.javaprofiler.jpi.AllocStat; /** * Properties of nodes that take data from object that implements AllocStat. * * @author Jan Stola */ public class AllocStatProperty { private static ResourceBundle bundle=NbBundle.getBundle(AllocStatProperty.class); public static class AllocStatLiveInstancesCount extends PropertySupport.ReadOnly { private AllocStat stat; public AllocStatLiveInstancesCount(AllocStat stat) { super("allocStatLiveInstancesCount", Long.class, bundle.getString("LBL_allocStatLiveInstancesCount"), bundle.getString("HINT_allocStatLiveInstancesCount")); this.stat=stat; } public Object getValue() { return new Long(stat.getLiveInstancesCount()); } } public static class AllocStatTotalInstancesCount extends PropertySupport.ReadOnly { private AllocStat stat; public AllocStatTotalInstancesCount(AllocStat stat) { super("allocStatTotalInstancesCount", Long.class, bundle.getString("LBL_allocStatTotalInstancesCount"), bundle.getString("HINT_allocStatTotalInstancesCount")); this.stat=stat; } public Object getValue() { return new Long(stat.getTotalInstancesCount()); } } public static class AllocStatLiveInstancesSize extends PropertySupport.ReadOnly { private AllocStat stat; public AllocStatLiveInstancesSize(AllocStat stat) { super("allocStatLiveInstancesSize", Long.class, bundle.getString("LBL_allocStatLiveInstancesSize"), bundle.getString("HINT_allocStatLiveInstancesSize")); this.stat=stat; } public Object getValue() { return new Long(stat.getLiveInstancesSize()); } } public static class AllocStatTotalInstancesSize extends PropertySupport.ReadOnly { private AllocStat stat; public AllocStatTotalInstancesSize(AllocStat stat) { super("allocStatTotalInstancesSize", Long.class, bundle.getString("LBL_allocStatTotalInstancesSize"), bundle.getString("HINT_allocStatTotalInstancesSize")); this.stat=stat; } public Object getValue() { return new Long(stat.getTotalInstancesSize()); } } public static void addProperties(Sheet.Set props, AllocStat stat) { props.put(new AllocStatLiveInstancesCount(stat)); props.put(new AllocStatTotalInstancesCount(stat)); props.put(new AllocStatLiveInstancesSize(stat)); props.put(new AllocStatTotalInstancesSize(stat)); } } /* * $Log: AllocStatProperty.java,v $ * Revision 1.1 2002/07/14 18:14:49 stolis * Common properties. * */ --- NEW FILE: CPUStatProperty.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.module.nodes; import java.util.*; import org.openide.nodes.*; import org.openide.util.NbBundle; import net.sourceforge.javaprofiler.jpi.CPUStat; /** * Properties of nodes that take data from object that implements CPUStat. * * @author Jan Stola */ public class CPUStatProperty { private static ResourceBundle bundle=NbBundle.getBundle(CPUStatProperty.class); public static class CPUStatHits extends PropertySupport.ReadOnly { private CPUStat stat; public CPUStatHits(CPUStat stat) { super("CPUStatHits", Long.class, bundle.getString("LBL_CPUStatHits"), bundle.getString("HINT_CPUStatHits")); this.stat=stat; } public Object getValue() { return new Long(stat.getCPUHitsCount()); } } public static class CPUStatPureTime extends PropertySupport.ReadOnly { private CPUStat stat; public CPUStatPureTime(CPUStat stat) { super("CPUStatPureTime", Long.class, bundle.getString("LBL_CPUStatPureTime"), bundle.getString("HINT_CPUStatPureTime")); this.stat=stat; } public Object getValue() { return new Long(stat.getCPUPureTime()); } } public static void addProperties(Sheet.Set props, CPUStat stat) { props.put(new CPUStatHits(stat)); props.put(new CPUStatPureTime(stat)); } } /* * $Log: CPUStatProperty.java,v $ * Revision 1.1 2002/07/14 18:14:49 stolis * Common properties. * */ --- NEW FILE: MonStatProperty.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.module.nodes; import java.util.*; import org.openide.nodes.*; import org.openide.util.NbBundle; import net.sourceforge.javaprofiler.jpi.MonStat; /** * Properties of nodes that take data from object that implements MonStat. * * @author Jan Stola */ public class MonStatProperty { private static ResourceBundle bundle=NbBundle.getBundle(MonStatProperty.class); public static class MonStatHits extends PropertySupport.ReadOnly { private MonStat stat; public MonStatHits(MonStat stat) { super("monStatHits", Long.class, bundle.getString("LBL_monStatHits"), bundle.getString("HINT_monStatHits")); this.stat=stat; } public Object getValue() { return new Long(stat.getMonHitsCount()); } } public static class MonStatPureTime extends PropertySupport.ReadOnly { private MonStat stat; public MonStatPureTime(MonStat stat) { super("monStatPureTime", Long.class, bundle.getString("LBL_monStatPureTime"), bundle.getString("HINT_monStatPureTime")); this.stat=stat; } public Object getValue() { return new Long(stat.getMonPureTime()); } } public static void addProperties(Sheet.Set props, MonStat stat) { props.put(new MonStatHits(stat)); props.put(new MonStatPureTime(stat)); } } /* * $Log: MonStatProperty.java,v $ * Revision 1.1 2002/07/14 18:14:49 stolis * Common properties. * */ |