Changeset 533


Ignore:
Timestamp:
02/14/11 22:39:26 (2 years ago)
Author:
philsmart
Message:
 
Location:
raptor-web/trunk/src/main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/engine/ChartProcessor.java

    r531 r533  
    44package uk.ac.cardiff.raptorweb.engine; 
    55 
     6import java.awt.BasicStroke; 
    67import java.awt.Color; 
     8import java.awt.Font; 
    79import java.awt.GradientPaint; 
    810import java.awt.Rectangle; 
     
    6668    /* options for how the graph is displayed */ 
    6769    public enum GraphPresentation { 
    68         FANCY(true), SIMPLE(false); 
     70        FANCY(true), FRONT(false); 
    6971        private boolean legend; 
    7072 
     
    189191        if (graphPresentation == GraphPresentation.FANCY) 
    190192            fancyGraphOutput(chart); 
    191         else if (graphPresentation == GraphPresentation.SIMPLE) 
    192             simpleGraphOutput(chart); 
     193        else if (graphPresentation == GraphPresentation.FRONT) 
     194            frontGraphOutput(chart); 
    193195 
    194196        // save the graph 
     
    252254    } 
    253255 
    254     private void simpleGraphOutput(JFreeChart chart) { 
     256    private void frontGraphOutput(JFreeChart chart) { 
    255257        CategoryPlot plot = (CategoryPlot) chart.getPlot(); 
    256258        CategoryAxis xAxis = (CategoryAxis) plot.getDomainAxis(); 
     
    263265        plot.setRangeGridlinePaint(Color.black); 
    264266        plot.setDomainGridlinePaint(Color.black); 
    265  
     267        //set the thickness of the first series 
     268        plot.getRenderer().setSeriesStroke(0, new BasicStroke(2.0f)); 
     269        plot.setForegroundAlpha(0.7f); 
     270        plot.setBackgroundPaint(new GradientPaint(0, 0,Color.white , 1f, 1f, new Color(210,210,210))); 
     271        plot.getRenderer().setSeriesPaint(0, Color.blue); 
    266272        // axis 
    267         CategoryAxis rangeAxis = (CategoryAxis) plot.getDomainAxis(); 
    268         rangeAxis.setUpperMargin(0.0); 
    269         rangeAxis.setLowerMargin(0.0); 
     273        CategoryAxis domainAxis = (CategoryAxis) plot.getDomainAxis(); 
     274        domainAxis.setUpperMargin(0.0); 
     275        domainAxis.setLowerMargin(0.0); 
     276        domainAxis.setLabelFont(new Font("SansSerif",Font.PLAIN,0)); 
     277        domainAxis.setTickLabelFont(new Font("SansSerif",Font.PLAIN,0)); 
    270278 
    271279    } 
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/service/impl/StartServiceImpl.java

    r531 r533  
    225225            } 
    226226            if (numberOfAuthenticationsPerIntervalNumberModel != null) { 
    227                 RaptorJFreeChartModel jfreeChart = getChartProcessor().constructJFreeGraph(GraphPresentation.SIMPLE,GraphType.LINE,numberOfAuthenticationsPerIntervalNumberModel,1270,400,(chosenStartTime.toString("ddMMyyyHH-mm")+"-"+currentDateTime.toString("ddMMyyyHH-mm"))); 
     227                RaptorJFreeChartModel jfreeChart = getChartProcessor().constructJFreeGraph(GraphPresentation.FRONT,GraphType.AREA,numberOfAuthenticationsPerIntervalNumberModel,1270,300,(chosenStartTime.toString("ddMMyyyHH-mm")+"-"+currentDateTime.toString("ddMMyyyHH-mm"))); 
    228228                startstats.setHeadlineGraph(jfreeChart); 
    229229            } 
  • raptor-web/trunk/src/main/webapp/WEB-INF/flows/reports/startReport.xhtml

    r531 r533  
    2222                                        <h:panelGrid columns="7" columnClasses="verticalAlignMiddle"> 
    2323 
    24                                                 <h:outputText style="font-size:150%; font-weight:bold' color:red" 
     24                                                <h:outputText style="font-size:150%" 
    2525                                                        value="Currently Attached to #{flowScope.websession.startmodel.attachedMUACapabilities.muaMetadata.muaName}, and showing statistics for: " /> 
    2626 
     
    5757 
    5858                                <h:panelGrid width="100%" style="height: 100%; text-align: center;"> 
    59                                         <rich:spacer height="20px" /> 
     59                                        <rich:spacer height="50px" /> 
    6060 
    6161                                        <h:panelGroup layout="horizontal" width="100%"> 
    62                                                 <rich:spacer width="60px" /> 
     62                                                <rich:spacer width="30px" /> 
    6363 
    6464 
     
    8080 
    8181                                        </h:panelGroup> 
    82                                         <!--<h:outputText 
    83                                 value="aaaaaaaaaaaaaaaaaaaaaaaaa" 
    84                                 inlineStyle="opacity:0.0;color:#EEE9E8;" /> 
    85                         --> 
    8682 
    8783                                </h:panelGrid> 
     
    9288                        <rich:layoutPanel position="center" > 
    9389                                <a4j:form id="startTables"> 
    94                                 <rich:spacer height="20px" /> 
     90                                <rich:spacer height="50px" /> 
    9591                                <h:panelGroup columns = "2"> 
    9692                                        <rich:dataTable id="currentTableGraphTable" 
Note: See TracChangeset for help on using the changeset viewer.