Examples of XYConditionRenderer


Examples of de.laures.cewolf.jfree.XYConditionRenderer

    } else if (plot instanceof XYPlot) {
      XYPlot xyPlot = (XYPlot) plot;
      XYItemRenderer xyRenderer = xyPlot.getRenderer();

      if (xyRenderer instanceof XYConditionRenderer) {
        XYConditionRenderer xyCondRender = (XYConditionRenderer) xyRenderer;

        boolean shapes = false;
        String str = (String) params.get("shapes");
        if (str != null)
          shapes = "true".equals(str);
        xyCondRender.setBaseShapesVisible(shapes);

        boolean outline = false;
        str = (String) params.get("outline");
        if (str != null)
          outline = "true".equals(str);
        xyCondRender.setDrawOutlines(outline);

        boolean useFillPaint = false;
        str = (String) params.get("useFillPaint");
        if (str != null)
          useFillPaint = "true".equals(str);
        xyCondRender.setUseFillPaint(useFillPaint);

        if (useFillPaint) {
          str = (String) params.get("fillPaint");
          if (str != null && str.trim().length() > 0) {
            try {
              Color fillPaint = Color.decode(str);
              xyCondRender.setBaseFillPaint(fillPaint);
            } catch (NumberFormatException nfex) { }
          }
        }

        boolean useOutlinePaint = false;
        str = (String) params.get("useOutlinePaint");
        if (str != null)
          useOutlinePaint = "true".equals(str);
        xyCondRender.setUseOutlinePaint(useOutlinePaint);

        if (useOutlinePaint) {
          str = (String) params.get("outlinePaint");
          if (str != null && str.trim().length() > 0) {
            try {
              Color outlinePaint = Color.decode(str);
              xyCondRender.setBaseOutlinePaint(outlinePaint);
            } catch (NumberFormatException nfex) { }
          }
        }

        str = (String) params.get("shapeVisibleCondition");
        if (str != null)
          xyCondRender.setShapeVisibleCondition(str);

        str = (String) params.get("shapeFilledCondition");
        if (str != null)
          xyCondRender.setShapeFilledCondition(str);
      }
    }
  }
View Full Code Here

Examples of de.laures.cewolf.jfree.XYConditionRenderer

        XYURLGenerator urlGenerator = null;
        if (urls) {
            urlGenerator = new StandardXYURLGenerator();
        }
        XYItemRenderer renderer = new XYConditionRenderer(false, true);
        renderer.setBaseToolTipGenerator(toolTipGenerator);
        renderer.setURLGenerator(urlGenerator);
        plot.setRenderer(renderer);
        plot.setOrientation(orientation);

        JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
        ChartFactory.getChartTheme().apply(chart);
View Full Code Here

Examples of de.laures.cewolf.jfree.XYConditionRenderer

            throw new IllegalArgumentException("Null 'orientation' argument.");
        }
        NumberAxis xAxis = new NumberAxis(xAxisLabel);
        xAxis.setAutoRangeIncludesZero(false);
        NumberAxis yAxis = new NumberAxis(yAxisLabel);
        XYItemRenderer renderer = new XYConditionRenderer(true, false);
        XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
        plot.setOrientation(orientation);
        if (tooltips) {
            renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
        }
        if (urls) {
            renderer.setURLGenerator(new StandardXYURLGenerator());
        }

        JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
        ChartFactory.getChartTheme().apply(chart);
        return chart;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.