Package com.positive.charts.common

Examples of com.positive.charts.common.RectangleEdge


  /**
   * Fetches the latest legend items.
   */
  protected void fetchLegendItems() {
    this.items.clear();
    final RectangleEdge p = this.getPosition();
    if (RectangleEdge.isTopOrBottom(p)) {
      this.items.setArrangement(this.hLayout);
    } else {
      this.items.setArrangement(this.vLayout);
    }
View Full Code Here


    }
    if (area == null) {
      throw new IllegalArgumentException("Null 'area' argument.");
    }
    Rectangle titleArea = null;
    final RectangleEdge position = t.getPosition();
    final double ww = area.width;
    if (ww <= 0.0) {
      return null;
    }
    final double hh = area.height;
View Full Code Here

   * @return The content size.
   *
   * @since 1.0.9
   */
  protected Size2D arrangeFN(final GC g2, final double w) {
    final RectangleEdge position = this.getPosition();
    if ((position == RectangleEdge.TOP)
        || (position == RectangleEdge.BOTTOM)) {
      final float maxWidth = (float) w;
      g2.setFont(this.font);
      this.content = TextUtilities.createTextBlock(this.text, this.font,
View Full Code Here

   *
   * @return The content size.
   */
  protected Size2D arrangeRR(final GC g2, final Range widthRange,
      final Range heightRange) {
    final RectangleEdge position = this.getPosition();
    if ((position == RectangleEdge.TOP)
        || (position == RectangleEdge.BOTTOM)) {
      final float maxWidth = (float) widthRange.getUpperBound();
      g2.setFont(this.font);
      this.content = TextUtilities.createTextBlock(this.text, this.font,
View Full Code Here

    if (this.backgroundPaint != null) {
      g2.setForeground(this.backgroundPaint);
      g2.fillRectangle(area);
    }
    area = this.trimPadding(area);
    final RectangleEdge position = this.getPosition();
    if ((position == RectangleEdge.TOP)
        || (position == RectangleEdge.BOTTOM)) {
      this.drawHorizontal(g2, area);
    } else if ((position == RectangleEdge.LEFT)
        || (position == RectangleEdge.RIGHT)) {
View Full Code Here

    } else if (horizontalAlignment == HorizontalAlignment.CENTER) {
      x = (titleArea.x + (titleArea.width / 2));
      anchor = TextBlockAnchor.TOP_CENTER;
    }
    float y = 0.0f;
    final RectangleEdge position = this.getPosition();
    if (position == RectangleEdge.TOP) {
      y = titleArea.y;
    } else if (position == RectangleEdge.BOTTOM) {
      y = (float) titleArea.y + titleArea.height;
      if (horizontalAlignment == HorizontalAlignment.LEFT) {
View Full Code Here

    } else if (verticalAlignment == VerticalAlignment.CENTER) {
      y = (float) (titleArea.y + titleArea.height) / 2;
      anchor = TextBlockAnchor.TOP_CENTER;
    }
    float x = 0.0f;
    final RectangleEdge position = this.getPosition();
    if (position == RectangleEdge.LEFT) {
      x = titleArea.x;
    } else if (position == RectangleEdge.RIGHT) {
      x = (float) titleArea.x + titleArea.width;
      if (verticalAlignment == VerticalAlignment.TOP) {
View Full Code Here

  public void add(final Block block, final Object key) {

    if (key == null) {
      this.centerBlock = block;
    } else {
      final RectangleEdge edge = (RectangleEdge) key;
      if (edge == RectangleEdge.TOP) {
        this.topBlock = block;
      } else if (edge == RectangleEdge.BOTTOM) {
        this.bottomBlock = block;
      } else if (edge == RectangleEdge.LEFT) {
View Full Code Here

      final GC gc, final XYPlot plot, final XYDataset dataset,
      final int pass, final int series, final int item,
      final ValueAxis domainAxis, final ValueAxis rangeAxis,
      final Rectangle dataArea) {

    final RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
    final RectangleEdge yAxisLocation = plot.getRangeAxisEdge();

    // get the data point...
    final double x1 = dataset.getXValue(series, item);
    final double y1 = dataset.getYValue(series, item);
    final double transX1 = domainAxis.valueToJava2D(x1, dataArea,
View Full Code Here

    if (Double.isNaN(y1) || Double.isNaN(x1)) {
      return;
    }

    final PlotOrientation orientation = plot.getOrientation();
    final RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
    final RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
    final double transX1 = domainAxis.valueToJava2D(x1, dataArea,
        xAxisLocation);
    final double transY1 = rangeAxis.valueToJava2D(y1, dataArea,
        yAxisLocation);
View Full Code Here

TOP

Related Classes of com.positive.charts.common.RectangleEdge

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.