📄 cewolfsignal.jsp
字号:
<!--
Fig. 8.4_07: CewolfSignal.jsp
功能: Cewolf 编程实例21: 信号图
-->
<%@ page contentType="text/html;charset=GB2312"%>
<%@ taglib uri='/WEB-INF/cewolf.tld' prefix='cewolf' %>
<%@ page import="java.util.*"%>
<%@ page import="de.laures.cewolf.*"%>
<%@ page import="de.laures.cewolf.tooltips.*"%>
<%@ page import="de.laures.cewolf.links.*"%>
<%@ page import="org.jfree.data.*"%>
<%@ page import="org.jfree.data.time.*"%>
<%@ page import="org.jfree.data.gantt.*"%>
<%@ page import="org.jfree.chart.*"%>
<%@ page import="org.jfree.chart.plot.*"%>
<%@ page import="org.jfree.chart.renderer.*"%>
<%@ page import="org.jfree.data.category.*"%>
<%@ page import="org.jfree.data.general.*"%>
<%@ page import="org.jfree.data.xy.*"%>
<%!
String chartTitle = "Cewolf 编程实例21: 信号图";
%>
<%
// 创建数据集
DatasetProducer signalsData = new DatasetProducer()
{
public Object produceDataset(Map params)
{
TimeSeries ts = new TimeSeries("Cewolf 发布计划", Month.class);
ts.add(new Month(7, 2002), 0.1);
ts.add(new Month(8, 2002), 0.4);
ts.add(new Month(9, 2002), 0.9);
ts.add(new Month(10, 2002), 1.0);
TimeSeriesCollection col = new TimeSeriesCollection(ts);
return new SubSeriesDataset(col, 0);
}
public String getProducerId()
{
return "SignalsDataProducer";
}
public boolean hasExpired(Map params, Date since)
{
return false;
}
};
pageContext.setAttribute("signalsData", signalsData);
%>
<HTML>
<HEAD>
<TITLE><%=chartTitle%></TITLE>
</HEAD>
<BODY>
<cewolf:chart
id="signals"
title="<%=chartTitle%>"
type="signal"
xaxislabel="发布时间"
yaxislabel="版本">
<cewolf:data>
<cewolf:producer id="signalsData" />
</cewolf:data>
</cewolf:chart>
<img src='<cewolf:imgurl chartid="signals" renderer="/cewolf"
width="500" height="375" mime="image/png"/>'>
</BODY>
</HTML>
<!--
/**************************************************************************
* (C) Copyright 2004-2005 by Jingkui Zhong(钟京馗) and Huan Tang(唐桓). *
* All Rights Reserved. *
* *
* DISCLAIMER: The authors of this code have used their *
* best efforts in preparing the code. These efforts include the *
* development, research, and testing of the theories and programs *
* to determine their effectiveness. The authors and publisher make *
* no warranty of any kind, expressed or implied, with regard to these *
* programs or to the documentation contained in these codes. The authors *
* shall not be liable in any event for incidental or consequential *
* damages in connection with, or arising out of, the furnishing, *
* performance, or use of these programs. *
**************************************************************************/
-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -