private RectangleAnchor flipAnchorH(RectangleAnchor anchor) { RectangleAnchor result = anchor; if (anchor.equals(RectangleAnchor.TOP_LEFT)) { result = RectangleAnchor.TOP_RIGHT; } else if (anchor.equals(RectangleAnchor.TOP_RIGHT)) { result = RectangleAnchor.TOP_LEFT; } else if (anchor.equals(RectangleAnchor.LEFT)) { result = RectangleAnchor.RIGHT; } else if (anchor.equals(RectangleAnchor.RIGHT)) { result = RectangleAnchor.LEFT; } else if (anchor.equals(RectangleAnchor.BOTTOM_LEFT)) { result = RectangleAnchor.BOTTOM_RIGHT; } else if (anchor.equals(RectangleAnchor.BOTTOM_RIGHT)) { result = RectangleAnchor.BOTTOM_LEFT; } return result; }
private RectangleAnchor flipAnchorV(RectangleAnchor anchor) { RectangleAnchor result = anchor; if (anchor.equals(RectangleAnchor.TOP_LEFT)) { result = RectangleAnchor.BOTTOM_LEFT; } else if (anchor.equals(RectangleAnchor.TOP_RIGHT)) { result = RectangleAnchor.BOTTOM_RIGHT; } else if (anchor.equals(RectangleAnchor.TOP)) { result = RectangleAnchor.BOTTOM; } else if (anchor.equals(RectangleAnchor.BOTTOM)) { result = RectangleAnchor.TOP; } else if (anchor.equals(RectangleAnchor.BOTTOM_LEFT)) { result = RectangleAnchor.TOP_LEFT; } else if (anchor.equals(RectangleAnchor.BOTTOM_RIGHT)) { result = RectangleAnchor.TOP_RIGHT; } return result; }
if (this.equals(RectangleAnchor.CENTER)) { result = RectangleAnchor.CENTER; else if (this.equals(RectangleAnchor.TOP)) { result = RectangleAnchor.TOP; else if (this.equals(RectangleAnchor.BOTTOM)) { result = RectangleAnchor.BOTTOM; else if (this.equals(RectangleAnchor.LEFT)) { result = RectangleAnchor.LEFT; else if (this.equals(RectangleAnchor.RIGHT)) { result = RectangleAnchor.RIGHT; else if (this.equals(RectangleAnchor.TOP_LEFT)) { result = RectangleAnchor.TOP_LEFT; else if (this.equals(RectangleAnchor.TOP_RIGHT)) { result = RectangleAnchor.TOP_RIGHT; else if (this.equals(RectangleAnchor.BOTTOM_LEFT)) { result = RectangleAnchor.BOTTOM_LEFT; else if (this.equals(RectangleAnchor.BOTTOM_RIGHT)) { result = RectangleAnchor.BOTTOM_RIGHT;
if (anchor.equals(RectangleAnchor.TOP_LEFT)) { result = TextAnchor.TOP_RIGHT; else if (anchor.equals(RectangleAnchor.TOP)) { result = TextAnchor.TOP_CENTER; else if (anchor.equals(RectangleAnchor.TOP_RIGHT)) { result = TextAnchor.TOP_LEFT; else if (anchor.equals(RectangleAnchor.LEFT)) { result = TextAnchor.HALF_ASCENT_RIGHT; else if (anchor.equals(RectangleAnchor.RIGHT)) { result = TextAnchor.HALF_ASCENT_LEFT; else if (anchor.equals(RectangleAnchor.BOTTOM_LEFT)) { result = TextAnchor.BOTTOM_RIGHT; else if (anchor.equals(RectangleAnchor.BOTTOM)) { result = TextAnchor.BOTTOM_CENTER; else if (anchor.equals(RectangleAnchor.BOTTOM_RIGHT)) { result = TextAnchor.BOTTOM_LEFT;
if (this.equals(RectangleAnchor.CENTER)) { result = RectangleAnchor.CENTER; else if (this.equals(RectangleAnchor.TOP)) { result = RectangleAnchor.TOP; else if (this.equals(RectangleAnchor.BOTTOM)) { result = RectangleAnchor.BOTTOM; else if (this.equals(RectangleAnchor.LEFT)) { result = RectangleAnchor.LEFT; else if (this.equals(RectangleAnchor.RIGHT)) { result = RectangleAnchor.RIGHT; else if (this.equals(RectangleAnchor.TOP_LEFT)) { result = RectangleAnchor.TOP_LEFT; else if (this.equals(RectangleAnchor.TOP_RIGHT)) { result = RectangleAnchor.TOP_RIGHT; else if (this.equals(RectangleAnchor.BOTTOM_LEFT)) { result = RectangleAnchor.BOTTOM_LEFT; else if (this.equals(RectangleAnchor.BOTTOM_RIGHT)) { result = RectangleAnchor.BOTTOM_RIGHT;
if (anchor.equals(RectangleAnchor.TOP_LEFT)) { result = TextAnchor.BOTTOM_LEFT; else if (anchor.equals(RectangleAnchor.TOP)) { result = TextAnchor.BOTTOM_CENTER; else if (anchor.equals(RectangleAnchor.TOP_RIGHT)) { result = TextAnchor.BOTTOM_RIGHT; else if (anchor.equals(RectangleAnchor.LEFT)) { result = TextAnchor.HALF_ASCENT_LEFT; else if (anchor.equals(RectangleAnchor.RIGHT)) { result = TextAnchor.HALF_ASCENT_RIGHT; else if (anchor.equals(RectangleAnchor.BOTTOM_LEFT)) { result = TextAnchor.TOP_LEFT; else if (anchor.equals(RectangleAnchor.BOTTOM)) { result = TextAnchor.TOP_CENTER; else if (anchor.equals(RectangleAnchor.BOTTOM_RIGHT)) { result = TextAnchor.TOP_RIGHT;
if (this.equals(RectangleAnchor.CENTER)) { result = RectangleAnchor.CENTER; else if (this.equals(RectangleAnchor.TOP)) { result = RectangleAnchor.TOP; else if (this.equals(RectangleAnchor.BOTTOM)) { result = RectangleAnchor.BOTTOM; else if (this.equals(RectangleAnchor.LEFT)) { result = RectangleAnchor.LEFT; else if (this.equals(RectangleAnchor.RIGHT)) { result = RectangleAnchor.RIGHT; else if (this.equals(RectangleAnchor.TOP_LEFT)) { result = RectangleAnchor.TOP_LEFT; else if (this.equals(RectangleAnchor.TOP_RIGHT)) { result = RectangleAnchor.TOP_RIGHT; else if (this.equals(RectangleAnchor.BOTTOM_LEFT)) { result = RectangleAnchor.BOTTOM_LEFT; else if (this.equals(RectangleAnchor.BOTTOM_RIGHT)) { result = RectangleAnchor.BOTTOM_RIGHT;
if (this.blockAnchor.equals(RectangleAnchor.BOTTOM_LEFT)) { this.xOffset = 0.0; this.yOffset = 0.0; else if (this.blockAnchor.equals(RectangleAnchor.BOTTOM)) { this.xOffset = -this.blockWidth / 2.0; this.yOffset = 0.0; else if (this.blockAnchor.equals(RectangleAnchor.BOTTOM_RIGHT)) { this.xOffset = -this.blockWidth; this.yOffset = 0.0; else if (this.blockAnchor.equals(RectangleAnchor.LEFT)) { this.xOffset = 0.0; this.yOffset = -this.blockHeight / 2.0; else if (this.blockAnchor.equals(RectangleAnchor.CENTER)) { this.xOffset = -this.blockWidth / 2.0; this.yOffset = -this.blockHeight / 2.0; else if (this.blockAnchor.equals(RectangleAnchor.RIGHT)) { this.xOffset = -this.blockWidth; this.yOffset = -this.blockHeight / 2.0; else if (this.blockAnchor.equals(RectangleAnchor.TOP_LEFT)) { this.xOffset = 0.0; this.yOffset = -this.blockHeight; else if (this.blockAnchor.equals(RectangleAnchor.TOP)) {
return false; if (!this.blockAnchor.equals(that.blockAnchor)) { return false;
/** * Sets the anchor point used to align a block at its (x, y) location and * sends a {@link RendererChangeEvent} to all registered listeners. * * @param anchor the anchor. * * @see #getBlockAnchor() */ public void setBlockAnchor(RectangleAnchor anchor) { if (anchor == null) { throw new IllegalArgumentException("Null 'anchor' argument."); } if (this.blockAnchor.equals(anchor)) { return; // no change } this.blockAnchor = anchor; updateOffsets(); fireChangeEvent(); }
if (!this.categoryAnchor.equals(that.categoryAnchor)) { return false;
return false; if (!this.anchor.equals(that.anchor)) { return false;
return false; if (!this.anchor.equals(that.anchor)) { return false;
return false; if (!this.anchor.equals(that.anchor)) { return false;
return false; if (!this.labelAnchor.equals(that.labelAnchor)) { return false;
return false; if (!this.textAnchor.equals(that.textAnchor)) { return false;