Package com.positive.charts.plot

Examples of com.positive.charts.plot.PlotOrientation


    }

    // draw the plot background and axes...
    this.drawBackground(gc, dataArea);
    final Map axisStateMap = this.drawAxes(gc, area, dataArea, info);
    final PlotOrientation orient = this.getOrientation();
    // the anchor point is typically the point where the mouse last
    // clicked - the crosshairs will be driven off this point...
    if ((anchor != null) && !dataArea.contains(anchor)) {
      anchor = null;
    }
View Full Code Here


    final Range range = axis.getRange();
    if (!range.contains(value)) {
      return;
    }

    final PlotOrientation orientation = plot.getOrientation();
    final int v = (int) axis.valueToJava2D(value, dataArea, plot
        .getDomainAxisEdge());

    final Color color = plot.getDomainGridlinePaint();
    final Stroke stroke = plot.getDomainGridlineStroke();
View Full Code Here

    }
    if (stroke != null) {
      stroke.set(gc);
    }

    final PlotOrientation orientation = plot.getOrientation();
    final int v = (int) axis.valueToJava2D(value, dataArea, plot
        .getRangeAxisEdge());
    if (orientation == PlotOrientation.HORIZONTAL) {
      gc.drawLine(v, RectangleUtil.getMinY(dataArea), v, RectangleUtil
          .getMaxY(dataArea));
View Full Code Here

   */
  public void drawDomainGridline(final GC gc, final CategoryPlot plot,
      final Rectangle dataArea, final double value) {

    Line line = null;
    final PlotOrientation orientation = plot.getOrientation();

    if (orientation == PlotOrientation.HORIZONTAL) {
      line = Line.Double(RectangleUtil.getMinX(dataArea), value,
          RectangleUtil.getMaxX(dataArea), value);
    } else if (orientation == PlotOrientation.VERTICAL) {
View Full Code Here

    final int oldAlpha = gc.getAlpha();
    // transparency
    gc.setAlpha(marker.getAlpha());

    final PlotOrientation orientation = plot.getOrientation();
    Rectangle bounds = null;
    if (marker.getDrawAsLine()) {
      final double v = axis.getCategoryMiddle(columnIndex, dataset
          .getColumnCount(), dataArea, plot.getDomainAxisEdge());
      Line line = null;
View Full Code Here

    final Range range = axis.getRange();
    if (!range.contains(value)) {
      return;
    }

    final PlotOrientation orientation = plot.getOrientation();
    final double v = axis.valueToJava2D(value, dataArea, plot
        .getRangeAxisEdge());
    Line line = null;
    if (orientation == PlotOrientation.HORIZONTAL) {
View Full Code Here

      // set alpha
      final int oldAlpha = gc.getAlpha();
      gc.setAlpha(marker.getAlpha());

      final PlotOrientation orientation = plot.getOrientation();
      final double v = axis.valueToJava2D(value, dataArea.getRectangle(),
          plot.getRangeAxisEdge());
      Line line = null;
      if (orientation == PlotOrientation.HORIZONTAL) {
        line = Line
            .Double(v, dataArea.getMinY(), v, dataArea.getMaxY());
      } else if (orientation == PlotOrientation.VERTICAL) {
        line = Line
            .Double(dataArea.getMinX(), v, dataArea.getMaxX(), v);
      }

      gc.setForeground(marker.getPaint());
      marker.getStroke().set(gc);
      GCUtilities.draw(gc, line);

      final String label = marker.getLabel();
      final RectangleAnchor anchor = marker.getLabelAnchor();
      if (label != null) {
        final Font labelFont = marker.getLabelFont();
        gc.setFont(labelFont);
        gc.setForeground(marker.getLabelPaint());
        final Point coordinates = this
            .calculateRangeMarkerTextAnchorPoint(gc, orientation,
                dataArea.getRectangle(), line.getBounds(),
                marker.getLabelOffset(),
                LengthAdjustmentType.EXPAND, anchor);
        TextUtilities.drawAlignedString(label, gc, coordinates.x,
            coordinates.y, marker.getLabelTextAnchor());
      }

      gc.setAlpha(oldAlpha);
    } else if (marker instanceof IntervalMarker) {

      final IntervalMarker im = (IntervalMarker) marker;
      final double start = im.getStartValue();
      final double end = im.getEndValue();
      final Range range = axis.getRange();
      if (!(range.intersects(start, end))) {
        return;
      }

      final int oldAlpha = gc.getAlpha();
      gc.setAlpha(marker.getAlpha());

      final double start2d = axis.valueToJava2D(start, dataArea
          .getRectangle(), plot.getRangeAxisEdge());
      final double end2d = axis.valueToJava2D(end, dataArea
          .getRectangle(), plot.getRangeAxisEdge());

      final PlotOrientation orientation = plot.getOrientation();
      Rectangle rect = null;
      if (orientation == PlotOrientation.HORIZONTAL) {
        rect = RectangleUtil.Double(Math.min(start2d, end2d), dataArea
            .getMinY(), Math.abs(end2d - start2d), dataArea
            .getHeight());
View Full Code Here

    final CategoryDataset dataset = plot.getDataset(rendererIndex);
    if (dataset != null) {
      final int columns = dataset.getColumnCount();
      final int rows = dataset.getRowCount();
      double space = 0.0;
      final PlotOrientation orientation = plot.getOrientation();
      if (orientation == PlotOrientation.HORIZONTAL) {
        space = dataArea.height;
      } else if (orientation == PlotOrientation.VERTICAL) {
        space = dataArea.width;
      }
View Full Code Here

      return;
    }

    final double value = dataValue.doubleValue();

    final PlotOrientation orientation = plot.getOrientation();
    final double barW0 = this.calculateBarW0(plot, orientation, dataArea,
        domainAxis, state, row, column);
    final double[] barL0L1 = this.calculateBarL0L1(value);
    if (barL0L1 == null) {
      return; // the bar is not visible
View Full Code Here

TOP

Related Classes of com.positive.charts.plot.PlotOrientation

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.