[jboss-cvs] JBossAS SVN: r68694 - in trunk/console/src/main/org/jboss/console: plugins/monitor and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jan 8 17:18:44 EST 2008
Author: dimitris at jboss.org
Date: 2008-01-08 17:18:44 -0500 (Tue, 08 Jan 2008)
New Revision: 68694
Modified:
trunk/console/src/main/org/jboss/console/manager/interfaces/impl/GraphMBeanAttributeAction.java
trunk/console/src/main/org/jboss/console/plugins/monitor/ManageSnapshotServlet.java
Log:
JBAS-5060, Upgrade jfreechart to v1.0.2
Modified: trunk/console/src/main/org/jboss/console/manager/interfaces/impl/GraphMBeanAttributeAction.java
===================================================================
--- trunk/console/src/main/org/jboss/console/manager/interfaces/impl/GraphMBeanAttributeAction.java 2008-01-08 22:18:21 UTC (rev 68693)
+++ trunk/console/src/main/org/jboss/console/manager/interfaces/impl/GraphMBeanAttributeAction.java 2008-01-08 22:18:44 UTC (rev 68694)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.console.manager.interfaces.impl;
import org.jboss.console.navtree.AppletBrowser;
@@ -28,8 +28,8 @@
import org.jfree.chart.ChartFrame;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
-import org.jfree.data.AbstractXYDataset;
-import org.jfree.data.DatasetChangeEvent;
+import org.jfree.data.xy.AbstractXYDataset;
+import org.jfree.data.general.DatasetChangeEvent;
import javax.management.ObjectName;
import java.util.ArrayList;
@@ -84,9 +84,9 @@
*
* @return the x-value for the specified series and item.
*/
- public Number getXValue(int series, int item)
+ public Number getX(int series, int item)
{
- return new Integer(item);
+ return (Number)item;
}
/**
@@ -97,12 +97,59 @@
*
* @return the y-value for the specified series and item.
*/
- public Number getYValue(int series, int item)
+ public Number getY(int series, int item)
{
- return (Number) data.get(item);
+ return (Number)data.get(item);
}
/**
+ * Returns the x-value for the specified series and item. Series are numbered 0, 1, ...
+ *
+ * @param series the index (zero-based) of the series.
+ * @param item the index (zero-based) of the required item.
+ *
+ * @return the x-value for the specified series and item.
+ */
+ public double getXValue(int series, int item)
+ {
+ return item;
+ }
+
+ /**
+ * Returns the y-value for the specified series and item. Series are numbered 0, 1, ...
+ *
+ * @param series the index (zero-based) of the series.
+ * @param item the index (zero-based) of the required item.
+ *
+ * @return the y-value for the specified series and item.
+ */
+ public double getYValue(int series, int item)
+ {
+ double result = Double.NaN;
+ Number x = (Number)data.get(item);
+ if (x != null) {
+ result = x.doubleValue();
+ }
+ return result;
+ }
+
+ /**
+ * Returns the key for a series.
+ * <p>
+ * If <code>series</code> is not within the specified range, the
+ * implementing method should throw an {@link IndexOutOfBoundsException}
+ * (preferred) or an {@link IllegalArgumentException}.
+ *
+ * @param series the series index (in the range <code>0</code> to
+ * <code>getSeriesCount() - 1</code>).
+ *
+ * @return The series key.
+ */
+ public Comparable getSeriesKey(int series){
+ return "graph"; //Just better to keep it as "graph" for now
+ }
+
+ /**
* Returns the number of series in the dataset.
*
* @return the number of series in the dataset.
Modified: trunk/console/src/main/org/jboss/console/plugins/monitor/ManageSnapshotServlet.java
===================================================================
--- trunk/console/src/main/org/jboss/console/plugins/monitor/ManageSnapshotServlet.java 2008-01-08 22:18:21 UTC (rev 68693)
+++ trunk/console/src/main/org/jboss/console/plugins/monitor/ManageSnapshotServlet.java 2008-01-08 22:18:44 UTC (rev 68694)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.console.plugins.monitor;
import java.io.IOException;
@@ -38,8 +38,8 @@
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
-import org.jfree.data.DefaultTableXYDataset;
-import org.jfree.data.XYSeries;
+import org.jfree.data.xy.DefaultTableXYDataset;
+import org.jfree.data.xy.XYSeries;
/**
* @author Bill Burke
@@ -47,6 +47,8 @@
*/
public class ManageSnapshotServlet extends javax.servlet.http.HttpServlet
{
+ static final long serialVersionUID = 128303790912009915L;
+
private static final Logger log = Logger.getLogger(ManageSnapshotServlet.class);
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
More information about the jboss-cvs-commits
mailing list