<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Kimi's NutShell

    我荒廢的今日,正是昨日殞身之人祈求的明日

    BlogJava 新隨筆 管理
      141 Posts :: 0 Stories :: 75 Comments :: 0 Trackbacks

    .JSPX:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="????????? xmlns:f="????????? xmlns:h="????????? xmlns:af="????????? xmlns:afh="????????? xmlns:graph="/webapp/graph.tld">
    ? <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    ? <jsp:directive.page import="Bar,java.io.*,org.jfree.chart.*,org.jfree.chart.servlet.*,java.util.*"/>
    ? <html>
    ??? <body><!--jsp:scriptlet>
    ? Bar chart = new Bar();
    ? String filename = chart.generateChart("", session, new PrintWriter(out), 75, 45);
    ? String graphURL = request.getContextPath() + "/servlet/DisplayChart?filename=" +filename;
    ?? </jsp:scriptlet-->
    ???? <!--h:graphicImage url="/img/acmecenter.jpg" height="200"
    ???????????????????????????????????? width="190"
    ???????????????????????????????????? /-->
    ????????????????????????????????????
    <f:view>
    ??????? <afh:html>
    ????? <f:loadBundle basename="com.primesuccess.portal.resources.UIResources"
    ??????????????????????? var="res"/>
    ????????? <afh:head title="#{res['home.title']}"/>
    ????????? <afh:body inlineStyle="margin:0.0pt; padding:0.0pt;">
    ??????????? <af:form>
    ????????????? <af:panelPage>
    ??????????????? <f:facet name="branding">
    ????????????????? <af:objectImage source="/img/SRBranding.gif"/>
    ??????????????? </f:facet>
    ??????????????? <f:facet name="menuGlobal">
    ????????????????? <h:panelGroup>
    ??????????????????? <af:menuButtons>
    ????????????????????? <h:outputFormat value="#{res['portal.connectedUser']}"
    ????????????????????????????????????? escape="false" rendered="true">
    ??????????????????????? <f:param value="#{account.username}"/>
    ????????????????????? </h:outputFormat>
    ????????????????????? <af:objectSpacer width="140" height="10"/>
    ????????????????????? <af:commandMenuItem text="#{res['portal.logout']}"
    ????????????????????????????????????????? action="logout" immediate="true"
    ????????????????????????????????????????? icon="/img/logout.gif"/>
    ??????????????????? </af:menuButtons>
    ????????????????? </h:panelGroup>
    ??????????????? </f:facet>
    ??????????????? <f:facet name="menu1">
    ????????????????? <af:menuTabs var="menuTab" value="#{account.model}">
    ??????????????????? <f:facet name="nodeStamp">
    ????????????????????? <!--af:commandMenuItem text="#{menuTab.label}"
    ????????????????????????????????????? action="#{menuTab.getOutcome}"
    ????????????????????????????????????? rendered="#{menuTab.shown and menuTab.type=='default'}"
    ????????????????????????????????????? disabled="#{menuTab.readOnly}"/-->
    ????????????????????? <af:commandMenuItem text="#{menuTab.label}"
    ????????????????????????????????????????? action="#{menuTab.getOutcome}"
    ????????????????????????????????????????? rendered="#{menuTab.shown and menuTab.type=='default'}"
    ????????????????????????????????????????? disabled="#{menuTab.readOnly}"/>
    ??????????????????? </f:facet>
    ????????????????? </af:menuTabs>
    ??????????????? </f:facet>
    ??????????????? <f:facet name="messages">
    ????????????????? <af:messages message="aaa" globalOnly="true"/>
    ??????????????? </f:facet>
    ??????????????? <f:facet name="appCopyright">
    ????????????????? <af:outputText value="#{res['portal.copyright']}"/>
    ??????????????? </f:facet>
    ??????????????? <af:panelHorizontal halign="center">
    ????????????????? <af:objectImage source="/img/acmecenter.jpg" align="middle"/>
    ??????????????? </af:panelHorizontal>
    ????????????? </af:panelPage>
    ????????????? <h:graphicImage url="#{chart.graphURL}" height="175" width="300"
    ????????????????????????????? usemap="#{chart.filename}" ismap="false"/>
    ??????????????????????????????? <!--h:graphicImage url="/img/acmecenter.jpg" height="200"
    ???????????????????????????????????? width="190"
    ???????????????????????????????????? /-->
    ??????????? </af:form>
    ????????? </afh:body>
    ??????? </afh:html>
    ????? </f:view></body>
    ? </html>
    </jsp:root>

    Model:
    ?// FrontEnd Plus GUI for JAD
    ?// DeCompiled : Chart.class

    ?

    ?import java.io.PrintWriter;
    import java.io.Writer;

    import java.text.NumberFormat;
    ?import javax.servlet.http.HttpSession;
    ?
    ?import javax.servlet.http.HttpServletRequest;


    import oracle.adf.share.http.Http21Util;

    import org.jfree.chart.*;
    ?import org.jfree.chart.axis.NumberAxis;
    ?import org.jfree.chart.entity.StandardEntityCollection;
    ?import org.jfree.chart.imagemap.ImageMapUtilities;
    ?import org.jfree.chart.plot.PlotOrientation;
    ?import org.jfree.chart.plot.XYPlot;
    ?import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
    ?import org.jfree.chart.servlet.ServletUtilities;
    ?import org.jfree.data.xy.*;

    ?public class Bar
    ?{
    ?String filename=new String();
    ?String graphURL=new String();
    ??? HttpSession session;
    ??? HttpServletRequest request;
    ??? PrintWriter pw;
    ?

    ???? public Bar()
    ???? {
    ???? }

    ???? private static XYDataset createDataset1()
    ???? {
    ???????? XYSeries xyseries = new XYSeries("Lot Count");
    ???????? xyseries.add(0.0D, 0.0D);
    ???????? xyseries.add(1.0D, 10D);
    ???????? xyseries.add(2D, 20D);
    ???????? xyseries.add(3D, 30D);
    ???????? xyseries.add(4D, 50D);
    ???????? xyseries.add(5D, 32D);
    ???????? xyseries.add(6D, 15D);
    ???????? xyseries.add(7D, 5D);
    ???????? xyseries.add(8D, 20D);
    ???????? xyseries.add(9D, 35D);
    ???????? xyseries.add(10D, 80D);
    ???????? XYSeries xyseries1 = new XYSeries("Series 2");
    ???????? xyseries1.add(0.0D, 0.0D);
    ???????? xyseries1.add(1.0D, 10D);
    ???????? xyseries1.add(2D, 18D);
    ???????? xyseries1.add(3D, 22D);
    ???????? xyseries1.add(4D, 35D);
    ???????? xyseries1.add(5D, 50D);
    ???????? xyseries1.add(6D, 55D);
    ???????? xyseries1.add(7D, 66D);
    ???????? xyseries1.add(8D, 78D);
    ???????? xyseries1.add(9D, 95D);
    ???????? xyseries1.add(10D, 100D);
    ???????? XYSeriesCollection xyseriescollection = new XYSeriesCollection();
    ???????? xyseriescollection.addSeries(xyseries);
    ???????? xyseriescollection.addSeries(xyseries1);
    ???????? return xyseriescollection;
    ???? }

    ???? private static JFreeChart createChart(String targetUrl)
    ???? {
    ???????? XYDataset xydataset = createDataset1();
    ???????? JFreeChart jfreechart = ChartFactory.createXYLineChart("Fab1", "MCT", "Lot Count", xydataset, PlotOrientation.VERTICAL, true, true, false);
    ???????? XYPlot xyplot = jfreechart.getXYPlot();
    ???????? NumberAxis numberaxis = new NumberAxis("Line2");
    ???????? numberaxis.setAutoRangeIncludesZero(false);
    ???????? numberaxis.setAutoRangeMinimumSize(1.0D);
    ???????? numberaxis.setNumberFormatOverride(NumberFormat.getPercentInstance());
    ???????? xyplot.setRangeAxis(1, numberaxis);
    ???????? xyplot.mapDatasetToRangeAxis(1, 1);
    ???????? NumberAxis numberaxis1 = new NumberAxis("MCT");
    ???????? numberaxis1.setAutoRangeIncludesZero(false);
    ???????? numberaxis1.setAutoRangeMinimumSize(1.0D);
    ???????? xyplot.setDomainAxis(numberaxis1);
    ???????? XYLineAndShapeRenderer xylineandshaperenderer = new XYLineAndShapeRenderer();
    ???????? xylineandshaperenderer.setSeriesLinesVisible(0, false);
    ???????? xyplot.setRenderer(xylineandshaperenderer);
    ???????? return jfreechart;
    ???? }

    ???? public String generateChart(String targetUrl, HttpSession session,PrintWriter pw, int w, int h)
    ???? {
    ???????? JFreeChart chart = createChart(targetUrl);
    ???????? ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
    ???????? String filename=new String();
    ???????? try
    ???????? {
    ???????????? filename = ServletUtilities.saveChartAsPNG(chart,w,h,info,session);
    ???????????? ImageMapUtilities.writeImageMap(pw, filename, info);
    ???????????? pw.flush();
    ???????? }
    ???????? catch(Exception e)
    ???????? {
    ???????????? e.printStackTrace();
    ????????????
    ???????????
    ???????? }
    ????????
    ???????? return filename;
    ???? }

    ??? public void setFilename(String filename) {
    ??????? this.filename = filename;
    ??? }

    ??? public String getFilename() {
    ??????? return this.generateChart("", session, pw, 750, 450);
    ??? }

    ??? public void setGraphURL(String graphURL) {
    ??????? this.graphURL = graphURL;
    ??? }

    ??? public String getGraphURL() {
    ??? System.out.println("FILENAME:"+this.getFilename());
    ??? String s="" + "/servlet/DisplayChart?filename=" +this.getFilename();
    ??
    ??????? return s;
    ??? }
    ???
    }

    動態則DAO連接數據庫

    主站蜘蛛池模板: 亚洲香蕉成人AV网站在线观看| 免费观看成人毛片a片2008| 免费一级毛片免费播放| 亚洲精品国产综合久久久久紧| 99热在线精品免费全部my| 亚洲一区二区三区久久| 全免费a级毛片免费**视频| 久久综合久久综合亚洲| 暖暖免费高清日本中文| 一级一级一片免费高清| 亚洲精品蜜桃久久久久久| 免费一区二区三区| 日韩精品一区二区亚洲AV观看| 114级毛片免费观看| 亚洲乱码卡三乱码新区| 日韩在线免费播放| 一级做a毛片免费视频| 久久伊人久久亚洲综合| 97热久久免费频精品99| 欧美激情综合亚洲一二区| 亚洲成年看片在线观看| 午夜爽爽爽男女免费观看影院| 亚洲av无码片区一区二区三区| 日韩免费视频在线观看| 九九久久精品国产免费看小说 | 女人18一级毛片免费观看| 污污免费在线观看| 无码乱人伦一区二区亚洲一| 久久不见久久见免费影院| 免费人成网站永久| 亚洲综合一区二区国产精品| 好大好深好猛好爽视频免费| 一区二区免费在线观看| 亚洲三级电影网址| 免费jjzz在线播放国产| 日本一道本不卡免费| 亚洲人成色在线观看| 亚洲精品卡2卡3卡4卡5卡区| 成年女人视频网站免费m| 美女网站在线观看视频免费的| 久久精品国产亚洲AV久|