Package com.positive.charts.block

Examples of com.positive.charts.block.RectangleInsets


   *            the text block.
   */
  public TextBox(final TextBlock block) {
    this.outlinePaint = PiePlot.DEFAULT_LABEL_PAINT;
    this.outlineStroke = new Stroke(1);
    this.interiorGap = new RectangleInsets(1.0, 3.0, 1.0, 3.0);
    if (color == null) {
      color = new Color(Display.getCurrent(), 255, 255, 192);
    }
    this.backgroundPaint = color;
    this.shadowPaint =  StaticColorChecker.dublicateColor(SWT.COLOR_GRAY);
View Full Code Here


    this.vLayout = vLayout;
    this.backgroundPaint = null;
    this.legendItemGraphicEdge = RectangleEdge.LEFT;
    this.legendItemGraphicAnchor = RectangleAnchor.CENTER;
    this.legendItemGraphicLocation = RectangleAnchor.CENTER;
    this.legendItemGraphicPadding = new RectangleInsets(2.0, 2.0, 2.0, 2.0);
    this.itemFont = DEFAULT_ITEM_FONT;
    this.itemPaint = this.DEFAULT_ITEM_PAINT;
    this.itemLabelPadding = new RectangleInsets(2.0, 2.0, 2.0, 2.0);
  }
View Full Code Here

  public static Chart createPieChart(final String title,
      final PieDataset dataset, final boolean legend, final Locale locale) {

    final PiePlot plot = new PiePlot(dataset);
    plot.setLabelGenerator(new StandardPieSectionLabelGenerator(locale));
    plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
    final Chart chart = new Chart(plot, legend);
    chart.setTitle(title);
    return chart;

  }
View Full Code Here

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

    // adjust the drawing area for the plot insets (if any)...
    final RectangleInsets insets = this.getInsets();
    insets.trim(area);

    final AxisSpace space = this.calculateAxisSpace(gc, area);
    final Rectangle dataArea = space.shrink(area, null);
    this.axisOffset.trim(dataArea);
View Full Code Here

        state = new PlotRenderingInfo(null);
      }
      state.setPlotArea(area);

      // adjust the drawing area for the plot insets (if any)...
      final RectangleInsets insets = this.getInsets();
      insets.trim(area);

      // calculate the data area...
      final AxisSpace space = this.calculateAxisSpace(g2, area);
      final Rectangle dataArea = space.shrink(area, null);
      this.axisOffset.trim(dataArea);
View Full Code Here

    this.outlinePaint = outlinePaint;
    this.outlineStroke = outlineStroke;
    this.alpha = alpha;

    this.labelAnchor = RectangleAnchor.TOP_LEFT;
    this.labelOffset = new RectangleInsets(3, 3, 3, 3);
    this.labelOffsetType = LengthAdjustmentType.CONTRACT;
    this.labelTextAnchor = TextAnchor.CENTER;

    this.listenerList = new ListenerList();
  }
View Full Code Here

    this.labelShadowPaint = DEFAULT_LABEL_SHADOW_PAINT;
    this.labelLinksVisible = true;
    this.labelDistributor = new PieLabelDistributor(0);

    this.simpleLabels = false;
    this.simpleLabelOffset = new RectangleInsets(UnitType.ABSOLUTE, 1, 1,
        1, 1);
    this.labelPadding = new RectangleInsets(2, 2, 2, 2);

    this.toolTipGenerator = null;
    this.urlGenerator = null;
    this.legendLabelGenerator = new StandardPieSectionLabelGenerator();
    this.legendLabelToolTipGenerator = null;
View Full Code Here

      final PlotState parentState, final PlotRenderingInfo info) {

    // adjust for insets...
    g2.setAdvanced(true);
    g2.setAntialias(SWT.ON);
    final RectangleInsets insets = this.getInsets();
    insets.trim(area);

    if (info != null) {
      info.setPlotArea(area);
      info.setDataArea(area);
    }
View Full Code Here

    // Composite originalComposite = g2.getComposite();
    // g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
    // 1.0f));

    final RectangleInsets labelInsets = new RectangleInsets(
        RectangleInsets.UnitType.RELATIVE, 0.18, 0.18, 0.18, 0.18);
    final Rectangle labelsArea = labelInsets.createInsetRectangle(pieArea);
    double runningTotal = 0.0;
    final Iterator iterator = keys.iterator();
    while (iterator.hasNext()) {
      final Comparable key = (Comparable) iterator.next();
      boolean include = true;
View Full Code Here

   * @return The height.
   */
  protected double calculateTextBlockHeight(final TextBlock block,
      final CategoryLabelPosition position, final GC g2) {

    final RectangleInsets insets = this.getTickLabelInsets();
    final Size2D size = block.calculateDimensions(g2);
    final Rectangle box = RectangleUtil.Double(0.0, 0.0, size.width,
        size.height);
    // Shape rotatedBox = ShapeUtilities.rotateShape(
    // box, position.getAngle(), 0.0f, 0.0f
    // );
    final Rectangle rotatedBox = box;
    final double h = rotatedBox.height + insets.getTop()
        + insets.getBottom();
    return h;

  }
View Full Code Here

TOP

Related Classes of com.positive.charts.block.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.