/** * Sets the tip radius and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param radius the radius (in Java2D units). * * @see #getTipRadius() */ public void setTipRadius(double radius) { this.tipRadius = radius; fireAnnotationChanged(); }
plot.getRangeAxisLocation(), orientation); CategoryDataset dataset = plot.getDataset(); int catIndex = dataset.getColumnIndex(getCategory()); int catCount = dataset.getColumnCount(); double j2DX = domainAxis.getCategoryMiddle(catIndex, catCount, dataArea, domainEdge); double j2DY = rangeAxis.valueToJava2D(getValue(), dataArea, rangeEdge); if (orientation == PlotOrientation.HORIZONTAL) { double temp = j2DX; g2.setFont(getFont()); g2.setPaint(getPaint()); double labelX = j2DX + Math.cos(this.angle) * (this.baseRadius + this.labelOffset); double labelY = j2DY + Math.sin(this.angle) * (this.baseRadius + this.labelOffset); /* Rectangle2D hotspot = */ TextUtilities.drawAlignedString(getText(), g2, (float) labelX, (float) labelY, getTextAnchor());
plot.getRangeAxisLocation(), orientation); CategoryDataset dataset = plot.getDataset(); int catIndex = dataset.getColumnIndex(getCategory()); int catCount = dataset.getColumnCount(); double j2DX = domainAxis.getCategoryMiddle(catIndex, catCount, dataArea, domainEdge); double j2DY = rangeAxis.valueToJava2D(getValue(), dataArea, rangeEdge); if (orientation == PlotOrientation.HORIZONTAL) { double temp = j2DX; g2.setFont(getFont()); g2.setPaint(getPaint()); double labelX = j2DX + Math.cos(this.angle) * (this.baseRadius + this.labelOffset); double labelY = j2DY + Math.sin(this.angle) * (this.baseRadius + this.labelOffset); /* Rectangle2D hotspot = */ TextUtils.drawAlignedString(getText(), g2, (float) labelX, (float) labelY, getTextAnchor());
/** * Sets the angle of the arrow and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param angle the angle (in radians). * * @see #getAngle() */ public void setAngle(double angle) { this.angle = angle; fireAnnotationChanged(); }
/** * Sets the arrow width and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param width the width (in Java2D units). * * @see #getArrowWidth() */ public void setArrowWidth(double width) { this.arrowWidth = width; fireAnnotationChanged(); }
/** * Sets the arrow length and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param length the length. * * @see #getArrowLength() */ public void setArrowLength(double length) { this.arrowLength = length; fireAnnotationChanged(); }
/** * Sets the arrow width and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param width the width (in Java2D units). * * @see #getArrowWidth() */ public void setArrowWidth(double width) { this.arrowWidth = width; fireAnnotationChanged(); }
/** * Sets the angle of the arrow and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param angle the angle (in radians). * * @see #getAngle() */ public void setAngle(double angle) { this.angle = angle; fireAnnotationChanged(); }
/** * Sets the base radius and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param radius the radius (in Java2D units). * * @see #getBaseRadius() */ public void setBaseRadius(double radius) { this.baseRadius = radius; fireAnnotationChanged(); }
/** * Sets the arrow length and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param length the length. * * @see #getArrowLength() */ public void setArrowLength(double length) { this.arrowLength = length; fireAnnotationChanged(); }
/** * Sets the tip radius and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param radius the radius (in Java2D units). * * @see #getTipRadius() */ public void setTipRadius(double radius) { this.tipRadius = radius; fireAnnotationChanged(); }
/** * Sets the base radius and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param radius the radius (in Java2D units). * * @see #getBaseRadius() */ public void setBaseRadius(double radius) { this.baseRadius = radius; fireAnnotationChanged(); }
/** * Sets the label offset (from the arrow base, continuing in a straight * line, in Java2D units) and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param offset the offset (in Java2D units). * * @see #getLabelOffset() */ public void setLabelOffset(double offset) { this.labelOffset = offset; fireAnnotationChanged(); }
/** * Sets the label offset (from the arrow base, continuing in a straight * line, in Java2D units) and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param offset the offset (in Java2D units). * * @see #getLabelOffset() */ public void setLabelOffset(double offset) { this.labelOffset = offset; fireAnnotationChanged(); }
/** * Sets the stroke used to draw the arrow line and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param stroke the stroke (<code>null</code> not permitted). * * @see #getArrowStroke() */ public void setArrowStroke(Stroke stroke) { if (stroke == null) { throw new IllegalArgumentException("Null 'stroke' not permitted."); } this.arrowStroke = stroke; fireAnnotationChanged(); }
/** * Sets the paint used for the arrow and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param paint the arrow paint (<code>null</code> not permitted). * * @see #getArrowPaint() */ public void setArrowPaint(Paint paint) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument."); } this.arrowPaint = paint; fireAnnotationChanged(); }
/** * Sets the stroke used to draw the arrow line and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param stroke the stroke ({@code null} not permitted). * * @see #getArrowStroke() */ public void setArrowStroke(Stroke stroke) { Args.nullNotPermitted(stroke, "stroke"); this.arrowStroke = stroke; fireAnnotationChanged(); }
/** * Sets the paint used for the arrow and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param paint the arrow paint ({@code null} not permitted). * * @see #getArrowPaint() */ public void setArrowPaint(Paint paint) { Args.nullNotPermitted(paint, "paint"); this.arrowPaint = paint; fireAnnotationChanged(); }