本文整理匯總了Java中org.jfree.ui.RectangleAnchor.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java RectangleAnchor.equals方法的具體用法?Java RectangleAnchor.equals怎麽用?Java RectangleAnchor.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.ui.RectangleAnchor
的用法示例。
在下文中一共展示了RectangleAnchor.equals方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: flipAnchorH
import org.jfree.ui.RectangleAnchor; //導入方法依賴的package包/類
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;
}
示例2: flipAnchorV
import org.jfree.ui.RectangleAnchor; //導入方法依賴的package包/類
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;
}
示例3: textAlignPtForLabelAnchorV
import org.jfree.ui.RectangleAnchor; //導入方法依賴的package包/類
/**
* Returns the text anchor that is used to align a label to its anchor
* point.
*
* @param anchor the anchor.
*
* @return The text alignment point.
*/
private TextAnchor textAlignPtForLabelAnchorV(RectangleAnchor anchor) {
TextAnchor result = TextAnchor.CENTER;
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;
}
return result;
}
示例4: textAlignPtForLabelAnchorH
import org.jfree.ui.RectangleAnchor; //導入方法依賴的package包/類
/**
* Returns the text anchor that is used to align a label to its anchor
* point.
*
* @param anchor the anchor.
*
* @return The text alignment point.
*/
private TextAnchor textAlignPtForLabelAnchorH(RectangleAnchor anchor) {
TextAnchor result = TextAnchor.CENTER;
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;
}
return result;
}