91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.82MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-09-20
  • 語言: Java
  • 標簽: JSP??

資源簡介

訪客操作系統(tǒng)統(tǒng)計JSP訪客統(tǒng)計系統(tǒng)(源碼)

資源截圖

代碼片段和文件信息

package?stat;

import?java.awt.Insets;
import?java.awt.Font;
import?java.io.PrintWriter;
import?javax.servlet.http.HttpSession;
import?org.jfree.chart.*;
import?org.jfree.chart.plot.*;
import?org.jfree.chart.entity.*;
import?org.jfree.chart.urls.*;
import?org.jfree.chart.servlet.*;
import?org.jfree.chart.labels.StandardPieToolTipGenerator;
import?org.jfree.data.general.DefaultPieDataset;
import?org.jfree.chart.title.Texttitle;
import?org.jfree.ui.RectangleInsets;
import?org.jfree.data.general.Dataset;
import?org.jfree.data.category.CategoryDataset;
import?org.jfree.data.xy.XYDataset;
import?java.awt.Color;
import?org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
import?org.jfree.chart.axis.DateAxis;
import?java.text.SimpleDateFormat;

/**
?*?專門用來生成圖形
?*
?*/
public?class?ChartHandle?{
????/**
?????*?根據傳入的參數,生成餅圖,并保存到文件中,返回文件名
?????*?@param?title?String?圖形標題
?????*?@param?session?HttpSession
?????*?@param?data?CategoryDataset?數據集
?????*?@param?pw?PrintWriter?輸出流
?????*?@return?String?返回圖形的文件名
?????*/
????public?static?String?generatePieChart(String?title?HttpSession?session
??????????????????????????????????????????DefaultPieDataset?data
??????????????????????????????????????????PrintWriter?pw)?{
????????String?filename?=?null;
????????try?{
????????????PiePlot?plot?=?new?PiePlot(data);
????????????//創(chuàng)建Plot圖表區(qū)域對象這里是餅圖
????????????JFreeChart?chart?=?new?JFreeChart(title?//圖形標題
??????????????????????????????????????????????JFreeChart.DEFAULT_title_FONT?//標題字體
??????????????????????????????????????????????plot?//圖標標題對象
??????????????????????????????????????????????true?//是否顯示圖例
??????????????????????????????????????????????);
????????????//使用plot對象創(chuàng)建JFreeChart
????????????chart.setBackgroundPaint(java.awt.Color.white);
????????????//設置圖形的背景色
????????????ChartRenderingInfo?info?=?new?ChartRenderingInfo(new
????????????????StandardEntityCollection());
????????????filename?=?ServletUtilities.saveChartAsPNG(chart?500?300?info
????????????????session);
????????????//把生成的圖片放到臨時目錄
????????????//500是圖片長度,300是圖片高度
????????????pw.flush();
????????}
????????catch?(Exception?e)?{
????????????e.printStackTrace();
????????}
????????return?filename;
????}

????/**
?????*?根據傳入的參數,生成柱狀圖,并保存到文件中,返回文件名
?????*?@param?title?String?圖形標題
?????*?@param?session?HttpSession
?????*?@param?data?CategoryDataset?數據集
?????*?@param?pw?PrintWriter?輸出流
?????*?@return?String?返回圖形的文件名
?????*/
????public?static?String?generateBarChart(String?title?HttpSession?session
??????????????????????????????????????????CategoryDataset?data
??????????????????????????????????????????PrintWriter?pw)?{
????????String?filename?=?null;
????????try?{
????????????JFreeChart?chart?=?ChartFactory.createBarChart3D(
????????????????title?//??圖表標題
????????????????“時間“?//??目錄軸的顯示標簽
????????????????“訪問量“?//??數值軸的顯示標簽
????????????????data?//??數據集
????????????????PlotOrientation.VERTICAL?//??圖表方向:水平、垂直
?????????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????633??2006-05-04?20:07??chapter4\.classpath

?????文件????????289??2006-06-16?05:47??chapter4\.mymetadata

?????文件???????1129??2006-05-04?20:05??chapter4\.project

?????文件???????9114??2006-03-06?23:31??chapter4\src\stat\ChartHandle.java

?????文件???????2124??2006-05-04?20:13??chapter4\src\stat\DBHandle.java

?????文件???????1766??2005-12-16?22:37??chapter4\src\stat\EncodingFilter.java

?????文件???????3115??2006-03-06?23:21??chapter4\src\stat\StatFilter.java

?????文件??????19178??2006-04-01?00:01??chapter4\src\stat\StatHandle.java

?????文件???????9535??2006-03-07?03:55??chapter4\src\stat\StatServlet.java

?????文件???????3368??2006-03-07?18:41??chapter4\src\stat\THandle.java

?????目錄??????????0??2008-04-19?21:10??chapter4\src\stat

?????目錄??????????0??2008-04-19?21:10??chapter4\src

?????文件???????1192??2006-06-16?05:43??chapter4\doc\stat.xml

?????文件??????26112??2006-06-17?23:17??chapter4\doc\系統(tǒng)移植說明.doc

?????目錄??????????0??2008-04-19?21:10??chapter4\doc

?????文件????????631??2006-06-16?05:38??chapter4\database\dbscript.sql

?????目錄??????????0??2008-04-19?21:10??chapter4\database

?????文件????????701??2006-03-07?03:55??chapter4\WebRoot\browser.jsp

?????文件????????817??2006-03-07?03:54??chapter4\WebRoot\day.jsp

?????文件????????272??2005-12-17?23:49??chapter4\WebRoot\error.jsp

?????文件????????306??2005-12-17?23:49??chapter4\WebRoot\error_info.jsp

?????文件????????675??2006-03-07?03:55??chapter4\WebRoot\hour.jsp

?????文件???????1009??2006-05-04?20:27??chapter4\WebRoot\index.jsp

?????文件????????657??2006-03-07?03:55??chapter4\WebRoot\month.jsp

?????文件????????707??2006-03-07?03:55??chapter4\WebRoot\os.jsp

?????文件?????????44??2006-04-01?00:07??chapter4\WebRoot\tldCache.ser

?????文件????????563??2005-10-24?19:24??chapter4\WebRoot\include\check.js

?????文件???????1128??2005-12-14?05:21??chapter4\WebRoot\include\style.css

?????目錄??????????0??2008-04-19?21:10??chapter4\WebRoot\include

?????文件?????????96??2001-03-08?21:42??chapter4\WebRoot\images\0.gif

............此處省略48個文件信息

評論

共有 條評論