Package org.jfree.chart.block

Examples of org.jfree.chart.block.BlockBorder


        assertFalse(t1.equals(t2));
        t2.setMargin(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
        assertTrue(t1.equals(t2));

        // border
        t1.setBorder(new BlockBorder(Color.red));
        assertFalse(t1.equals(t2));
        t2.setBorder(new BlockBorder(Color.red));
        assertTrue(t1.equals(t2));

        // padding
        t1.setPadding(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
        assertFalse(t1.equals(t2));
View Full Code Here


        b1.setMargin(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
        assertFalse(b1.equals(b2));
        b2.setMargin(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
        assertTrue(b1.equals(b2));

        b1.setFrame(new BlockBorder(Color.red));
        assertFalse(b1.equals(b2));
        b2.setFrame(new BlockBorder(Color.red));
        assertTrue(b1.equals(b2));

        b1.setPadding(new RectangleInsets(2.0, 4.0, 6.0, 8.0));
        assertFalse(b1.equals(b2));
        b2.setPadding(new RectangleInsets(2.0, 4.0, 6.0, 8.0));
View Full Code Here

  public void drawLegend(JFreeChart chart){
    //remove ipotetical other legend
    chart.removeLegend();
    BlockContainer wrapper = new BlockContainer(new BorderArrangement());
    wrapper.setFrame(new BlockBorder(1.0, 1.0, 1.0, 1.0));

    /*LabelBlock titleBlock = new LabelBlock("Legend Items:",
        new Font("SansSerif", Font.BOLD, 12));
    titleBlock.setPadding(5, 5, 5, 5);
    wrapper.add(titleBlock, RectangleEdge.TOP);*/
 
View Full Code Here

                setBackgroundPaint(chart.getChartView().getTitlePaint());
            }

            if (styleModel.getBackground() != null && !chartTitlePaintDefined) {
                setBackgroundPaint(styleModel.getBackground());
                setBorder(new BlockBorder(styleModel.getBackground()));
            }

            if (styleModel.getColor() != null) {
                setPaint(styleModel.getColor());
            }

            StyleBorderModel border = styleModel.getBorder();
            if (border != null) {
                if (!border.isNone() && border.getColor() != null) {
                    BlockBorder bb = new BlockBorder(border.getColor());
                    setBorder(bb);
                }
            }

            setMargin(styleModel.getMargin(0), styleModel.getMargin(1), styleModel.getMargin(2), styleModel.getMargin(3));
View Full Code Here

        }

        StyleBorderModel border = cssLegendModel.getBorder();

        if (border != null && !border.isNone()) {
            setBorder(new BlockBorder(border.getColor()));
        } else {
            setBorder(new BlockBorder(cssLegendModel.getBackground()));
        }

        setMargin(cssLegendModel.getMargin(0), cssLegendModel.getMargin(1), cssLegendModel.getMargin(2), cssLegendModel.getMargin(3));

        if (legend != null) {
View Full Code Here

    BlockContainer blockcontainer = new BlockContainer(new BorderArrangement());
    blockcontainer.add(legendtitle, RectangleEdge.LEFT);
    blockcontainer.add(legendtitle1, RectangleEdge.RIGHT);
    blockcontainer.add(new EmptyBlock(2000D, 0.0D));
    CompositeTitle compositetitle = new CompositeTitle(blockcontainer);
    compositetitle.setFrame(new BlockBorder(Color.red));
    compositetitle.setBackgroundPaint(Color.yellow);
    compositetitle.setPosition(RectangleEdge.BOTTOM);
    jfreechart.addSubtitle(compositetitle);
    ChartUtilities.applyCurrentTheme(jfreechart);
    return jfreechart;
View Full Code Here

      numberaxis2.setTickLabelFont(new Font("Dialog", 0, 7));
      PaintScaleLegend paintscalelegend = new PaintScaleLegend(graypaintscale, numberaxis2);
      paintscalelegend.setAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
      paintscalelegend.setAxisOffset(5D);
      paintscalelegend.setMargin(new RectangleInsets(5D, 5D, 5D, 5D));
      paintscalelegend.setFrame(new BlockBorder(Color.red));
      paintscalelegend.setPadding(new RectangleInsets(10D, 10D, 10D, 10D));
      paintscalelegend.setStripWidth(10D);
      paintscalelegend.setPosition(RectangleEdge.RIGHT);
      paintscalelegend.setBackgroundPaint(new Color(120, 120, 180));
      jfreechart.addSubtitle(paintscalelegend);
View Full Code Here

            if (findColor(getLegendBackgroundPaint()) != null) {
                chartLegend.setBackgroundPaint(findColor(getLegendBackgroundPaint()));
            }

            if (findColor(getLegendOutlinePaint()) != null) {
                chartLegend.setFrame(new BlockBorder(findColor(getLegendOutlinePaint())));
            }

            if (findColor(getLegendItemPaint()) != null) {
                chartLegend.setItemPaint(findColor(getLegendItemPaint()));
            }
View Full Code Here

        plot.setRangeCrosshairVisible(true);

        LegendTitle lt = new LegendTitle(plot);
        lt.setItemFont(new Font("Dialog", Font.PLAIN, 9));
        lt.setBackgroundPaint(new Color(200, 200, 255, 100));
        lt.setFrame(new BlockBorder(Color.white));
        lt.setPosition(RectangleEdge.BOTTOM);
        XYTitleAnnotation ta = new XYTitleAnnotation(0.98, 0.02, lt,
                RectangleAnchor.BOTTOM_RIGHT);
       
        ta.setMaxWidth(0.48);
View Full Code Here

        b1.setMargin(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
        assertFalse(b1.equals(b2));
        b2.setMargin(new RectangleInsets(1.0, 2.0, 3.0, 4.0));
        assertTrue(b1.equals(b2));
       
        b1.setFrame(new BlockBorder(Color.red));
        assertFalse(b1.equals(b2));
        b2.setFrame(new BlockBorder(Color.red));
        assertTrue(b1.equals(b2));
       
        b1.setPadding(new RectangleInsets(2.0, 4.0, 6.0, 8.0));
        assertFalse(b1.equals(b2));
        b2.setPadding(new RectangleInsets(2.0, 4.0, 6.0, 8.0));
View Full Code Here

TOP

Related Classes of org.jfree.chart.block.BlockBorder

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.