/** * Returns a clone of the annotation. * * @return A clone. * * @throws CloneNotSupportedException this class will not throw this * exception, but subclasses (if any) might. */ @Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Sets the rotation angle and sends an {@link AnnotationChangeEvent} to * all registered listeners. The angle is measured clockwise in radians. * * @param angle the angle (in radians). * * @see #getRotationAngle() */ public void setRotationAngle(double angle) { this.rotationAngle = angle; fireAnnotationChanged(); }
/** * Returns a hash code for this instance. * * @return A hash code. */ public int hashCode() { int result = super.hashCode(); result = 37 * result + this.category.hashCode(); result = 37 * result + this.categoryAnchor.hashCode(); long temp = Double.doubleToLongBits(this.value); result = 37 * result + (int) (temp ^ (temp >>> 32)); return result; }
if (!ObjectUtils.equal(this.text, that.getText())) { return false; if (!ObjectUtils.equal(this.font, that.getFont())) { return false; if (!PaintUtils.equal(this.paint, that.getPaint())) { return false; if (!ObjectUtils.equal(this.textAnchor, that.getTextAnchor())) { return false; that.getRotationAnchor())) { return false; if (this.rotationAngle != that.getRotationAngle()) { return false;
/** * Tests this object for equality with another. * * @param obj the object ({@code null} permitted). * * @return {@code true} or {@code false}. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryTextAnnotation)) { return false; } CategoryTextAnnotation that = (CategoryTextAnnotation) obj; if (!super.equals(obj)) { return false; } if (!this.category.equals(that.getCategory())) { return false; } if (!this.categoryAnchor.equals(that.getCategoryAnchor())) { return false; } if (this.value != that.getValue()) { return false; } return true; }
if (!ObjectUtilities.equal(this.text, that.getText())) { return false; if (!ObjectUtilities.equal(this.font, that.getFont())) { return false; if (!PaintUtilities.equal(this.paint, that.getPaint())) { return false; if (!ObjectUtilities.equal(this.textAnchor, that.getTextAnchor())) { return false; that.getRotationAnchor())) { return false; if (this.rotationAngle != that.getRotationAngle()) { return false;
/** * Tests this object for equality with another. * * @param obj the object (<code>null</code> permitted). * * @return <code>true</code> or <code>false</code>. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryTextAnnotation)) { return false; } CategoryTextAnnotation that = (CategoryTextAnnotation) obj; if (!super.equals(obj)) { return false; } if (!this.category.equals(that.getCategory())) { return false; } if (!this.categoryAnchor.equals(that.getCategoryAnchor())) { return false; } if (this.value != that.getValue()) { return false; } return true; }
/** * Sets the rotation angle and sends an {@link AnnotationChangeEvent} to * all registered listeners. The angle is measured clockwise in radians. * * @param angle the angle (in radians). * * @see #getRotationAngle() */ public void setRotationAngle(double angle) { this.rotationAngle = angle; fireAnnotationChanged(); }
/** * Returns a clone of the annotation. * * @return A clone. * * @throws CloneNotSupportedException this class will not throw this * exception, but subclasses (if any) might. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Returns a hash code for this instance. * * @return A hash code. */ @Override public int hashCode() { int result = super.hashCode(); result = 37 * result + this.category.hashCode(); result = 37 * result + this.categoryAnchor.hashCode(); long temp = Double.doubleToLongBits(this.value); result = 37 * result + (int) (temp ^ (temp >>> 32)); return result; }
/** * Sets the rotation anchor point and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param anchor the anchor (<code>null</code> not permitted). * * @see #getRotationAnchor() */ public void setRotationAnchor(TextAnchor anchor) { this.rotationAnchor = anchor; fireAnnotationChanged(); }
/** * Sets the paint for the annotation and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param paint the paint (<code>null</code> not permitted). * * @see #getPaint() */ public void setPaint(Paint paint) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument."); } this.paint = paint; fireAnnotationChanged(); }
/** * Sets the font for the annotation and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param font the font (<code>null</code> not permitted). * * @see #getFont() */ public void setFont(Font font) { if (font == null) { throw new IllegalArgumentException("Null 'font' argument."); } this.font = font; fireAnnotationChanged(); }
/** * Sets the text anchor (the point on the text bounding rectangle that is * aligned to the (x, y) coordinate of the annotation) and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param anchor the anchor point (<code>null</code> not permitted). * * @see #getTextAnchor() */ public void setTextAnchor(TextAnchor anchor) { if (anchor == null) { throw new IllegalArgumentException("Null 'anchor' argument."); } this.textAnchor = anchor; fireAnnotationChanged(); }
/** * Sets the rotation anchor point and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param anchor the anchor ({@code null} not permitted). * * @see #getRotationAnchor() */ public void setRotationAnchor(TextAnchor anchor) { Args.nullNotPermitted(anchor, "anchor"); this.rotationAnchor = anchor; fireAnnotationChanged(); }
/** * Sets the text for the annotation and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param text the text ({@code null} not permitted). * * @see #getText() */ public void setText(String text) { Args.nullNotPermitted(text, "text"); this.text = text; fireAnnotationChanged(); }
/** * Sets the font for the annotation and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param font the font ({@code null} not permitted). * * @see #getFont() */ public void setFont(Font font) { Args.nullNotPermitted(font, "font"); this.font = font; fireAnnotationChanged(); }
/** * Sets the paint for the annotation and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param paint the paint ({@code null} not permitted). * * @see #getPaint() */ public void setPaint(Paint paint) { Args.nullNotPermitted(paint, "paint"); this.paint = paint; fireAnnotationChanged(); }
/** * Sets the text anchor (the point on the text bounding rectangle that is * aligned to the (x, y) coordinate of the annotation) and sends an * {@link AnnotationChangeEvent} to all registered listeners. * * @param anchor the anchor point ({@code null} not permitted). * * @see #getTextAnchor() */ public void setTextAnchor(TextAnchor anchor) { Args.nullNotPermitted(anchor, "anchor"); this.textAnchor = anchor; fireAnnotationChanged(); }