/** * Returns {@code true} if this orientation is {@code HORIZONTAL}, * and {@code false} otherwise. * * @return A boolean. * * @since 1.0.18 */ public boolean isHorizontal() { return this.equals(PlotOrientation.HORIZONTAL); }
/** * Draws the bar for one item in the dataset. * * @param g2 the graphics device. * @param state the renderer state. * @param dataArea the plot area. * @param plot the plot. * @param domainAxis the domain (category) axis. * @param rangeAxis the range (value) axis. * @param data the data. * @param row the row index (zero-based). * @param column the column index (zero-based). * @param pass the pass index. */ @Override public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset data, int row, int column, int pass) { PlotOrientation orientation = plot.getOrientation(); if (orientation.isHorizontal()) { drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, data, row, column); } else if (orientation.isVertical()) { drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, data, row, column); } }
/** * Returns <code>true</code> if this object is equal to the specified * object, and <code>false</code> otherwise. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof PlotOrientation)) { return false; } PlotOrientation orientation = (PlotOrientation) obj; if (!this.name.equals(orientation.toString())) { return false; } return true; }
if (this.orientation.isHorizontal()) { sourceY = source.getX();
rectWidth = Math.abs(java2dValue1 - java2dValue0); barBase = RectangleEdge.LEFT; } else if (orientation.isVertical()) {
if (orientation.isHorizontal()) { space = dataArea.getHeight(); } else {
/** * Returns {@code true} if this orientation is {@code VERTICAL}, * and {@code false} otherwise. * * @return A boolean. * * @since 1.0.18 */ public boolean isVertical() { return this.equals(PlotOrientation.VERTICAL); }
double v = axis.valueToJava2D(value, dataArea, plot.getDomainAxisEdge()); if (orientation.isHorizontal()) { line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v); } else if (orientation.isVertical()) { line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY());
if (this.orientation.isHorizontal()) { space.ensureAtLeast(this.fixedRangeAxisSpace.getTop(), RectangleEdge.TOP);
/** * Ensures that serialization returns the unique instances. * * @return The object. * * @throws ObjectStreamException if there is a problem. */ private Object readResolve() throws ObjectStreamException { Object result = null; if (this.equals(PlotOrientation.HORIZONTAL)) { result = PlotOrientation.HORIZONTAL; } else if (this.equals(PlotOrientation.VERTICAL)) { result = PlotOrientation.VERTICAL; } return result; }
if (orientation.isHorizontal()) { bar = new Rectangle2D.Double( bottom, left, top - bottom, translatedWidth); } else if (orientation.isVertical()) { boolean inverted = rangeAxis.isInverted(); RectangleEdge barBase; if (orientation.isHorizontal()) { if (positive && inverted || !positive && !inverted) { barBase = RectangleEdge.RIGHT;
if (orientation.isHorizontal()) { x = barL; y = barW0 + state.getBarWidth() / 2.0;
boolean isVertical = this.plotOrientation.equals( PlotOrientation.VERTICAL); int index = isVertical ? ORIENTATION_VERTICAL
if (plot.getOrientation().isVertical()) { moveTo(areaState.area, transX1, zero); } else if (plot.getOrientation().isHorizontal()) { moveTo(areaState.area, zero, transX1); if (plot.getOrientation().isVertical()) { lineTo(areaState.area, transX1, transY1); } else if (plot.getOrientation().isHorizontal()) { lineTo(areaState.area, transY1, transX1);
Rectangle2D block; PlotOrientation orientation = plot.getOrientation(); if (orientation.equals(PlotOrientation.HORIZONTAL)) { block = new Rectangle2D.Double(Math.min(yy0, yy1), Math.min(xx0, xx1), Math.abs(yy1 - yy0),
if (this.orientation.isHorizontal()) { space.ensureAtLeast( this.fixedDomainAxisSpace.getLeft(), RectangleEdge.LEFT); space.ensureAtLeast(this.fixedDomainAxisSpace.getRight(), RectangleEdge.RIGHT); } else if (this.orientation.isVertical()) { space.ensureAtLeast(this.fixedDomainAxisSpace.getTop(), RectangleEdge.TOP);
boolean isVertical = this.plotOrientation.equals( PlotOrientation.VERTICAL); int index = isVertical ? ORIENTATION_VERTICAL
Line2D line; PlotOrientation orientation = plot.getOrientation(); if (orientation.equals(PlotOrientation.HORIZONTAL)) { line = new Line2D.Double(yy0, xx0, yy1, xx1);
Line2D line; PlotOrientation orientation = plot.getOrientation(); if (orientation.equals(PlotOrientation.HORIZONTAL)) { line = new Line2D.Double(yy0, xx0, yy1, xx1);
Rectangle2D block; PlotOrientation orientation = plot.getOrientation(); if (orientation.equals(PlotOrientation.HORIZONTAL)) { block = new Rectangle2D.Double(Math.min(yy0, yy1), Math.min(xx0, xx1), Math.abs(yy1 - yy0),