Package org.jfree.ui

Examples of org.jfree.ui.RectangleInsets


                catAxis.setTickLabelsVisible(false);
        }

        if (data.numCols() == 1) {
            chart.removeLegend();
            chart.getPlot().setInsets(new RectangleInsets(5,2,2,5));
        }
    }
View Full Code Here


    plot.setDomainCrosshairVisible(true);
    plot.setRangeCrosshairVisible(true);
    plot.setDomainCrosshairValue(0);
    plot.setRangeCrosshairValue(0);

    plot.setAxisOffset(new RectangleInsets(5, 5, 5, 5));
    plot.setOutlinePaint(Color.blue);

    JFreeChart chart = new JFreeChart(plot);

    NumberAxis scaleAxis = new NumberAxis(model.getZType().toString());
    scaleAxis.setAxisLinePaint(Color.white);
    scaleAxis.setTickMarkPaint(Color.white);
    scaleAxis.setTickLabelFont(new Font("Dialog", Font.PLAIN, 7));

    PaintScaleLegend legend = new PaintScaleLegend(scale, scaleAxis);
    legend.setStripOutlineVisible(false);
    legend.setSubdivisionCount(20);
    legend.setAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    legend.setAxisOffset(5.0);
    legend.setMargin(new RectangleInsets(5, 5, 5, 5));
    legend.setFrame(new BlockBorder(Color.red));
    legend.setPadding(new RectangleInsets(10, 10, 10, 10));
    legend.setStripWidth(10);
    legend.setPosition(RectangleEdge.BOTTOM);
    chart.removeLegend();
    chart.addSubtitle(legend);
    chart.setBackgroundPaint(new GradientPaint(0, 0, Color.WHITE, 0, 1000,
View Full Code Here

     * @param dataset  the data set.
     */
    public ThermometerPlot(ValueDataset dataset) {
        super();

        this.padding = new RectangleInsets(UnitType.RELATIVE, 0.05, 0.05, 0.05, 0.05);
        this.dataset = dataset;
        if (dataset != null) {
            dataset.addChangeListener(this);
        }
        NumberAxis axis = new NumberAxis(null);
View Full Code Here

        if (info != null) {
            info.setPlotArea(area);
        }

        // adjust for insets...
        RectangleInsets insets = getInsets();
        insets.trim(area);
        drawBackground(g2, area);

        // adjust for padding...
        Rectangle2D interior = (Rectangle2D) area.clone();
        this.padding.trim(interior);
View Full Code Here

    if (str != null)
      showRangeAxes = "true".equals(str.toLowerCase());

    localChart.setBorderVisible(hasBorder);
    localChart.setBorderPaint(borderPaint);
    localChart.setPadding(new RectangleInsets(top, left, bottom, right));

    Plot plot = localChart.getPlot();
    plot.setInsets(new RectangleInsets(plotTop, plotLeft, plotBottom, plotRight));

    if (plot instanceof XYPlot) {
      XYPlot xyPlot = (XYPlot) plot;
      ValueAxis axis = xyPlot.getRangeAxis();
      if (axis instanceof NumberAxis)
View Full Code Here

  {
    DefaultValueDataset dataset = createDefaultValueDataset(values);

    ThermometerPlot plot = new ThermometerPlot(dataset);

    plot.setInsets(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
    plot.setPadding(new RectangleInsets(10.0, 10.0, 10.0, 10.0));
    plot.setThermometerStroke(new BasicStroke(2.0f));
    plot.setThermometerPaint(Color.lightGray);
    plot.setUnits(ThermometerPlot.UNITS_FAHRENHEIT);

    JFreeChart chart = new JFreeChart(reportChart.getTitle(),
View Full Code Here

 
  private LegendTitle legend;
 
  public LegendPanel(LegendItemSource source) {
    this.legend = new LegendTitle(source);
        legend.setMargin(new RectangleInsets(1.0, 1.0, 1.0, 1.0));
        legend.setFrame(new LineBorder());
        legend.setBackgroundPaint(Color.white);
        legend.setPosition(RectangleEdge.BOTTOM);       
    setPreferredSize(new Dimension(1024, 35));
  }
View Full Code Here

        // Set plot styles
        XYPlot plot = (XYPlot) chart.getPlot();
        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setRangeGridlinePaint(Color.white);
        plot.setAxisOffset(new RectangleInsets(2.0, 2.0, 2.0, 2.0));
        // Set series line styles
        plot.setRenderer(new XYStepRenderer());

        XYItemRenderer r = plot.getRenderer();
        if (r instanceof XYLineAndShapeRenderer) {
View Full Code Here

    }

    /* vytvoříme graf a nastavíme mu okraje */
    JFreeChart graf = ChartFactory.createPieChart3D(null, dataSet, false, false,
        false);
    graf.setPadding(new RectangleInsets(20, 20, 20, 20));

    /* uložíme graf do souboru */
    try {
      DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
      Document document = domImpl.createDocument(null, "svg", null);
View Full Code Here

    }

    /* vytvoříme graf a nastavíme mu okraje */
    JFreeChart graf = ChartFactory.createXYLineChart(null, null, null, dataSet,
        PlotOrientation.VERTICAL, false, false, false);
    graf.setPadding(new RectangleInsets(20, 20, 20, 20));

    /* aby se zobrazovali na ose jen celé verze a ne půlky */
    XYPlot plot = graf.getXYPlot();
    NumberAxis osy = (NumberAxis) plot.getDomainAxis();
    osy.setTickUnit(new NumberTickUnit(1));
View Full Code Here

TOP

Related Classes of org.jfree.ui.RectangleInsets

Copyright © 2018 www.massapicom. 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.