本文整理汇总了Java中org.jfree.text.TextBlockAnchor.CENTER_RIGHT属性的典型用法代码示例。如果您正苦于以下问题:Java TextBlockAnchor.CENTER_RIGHT属性的具体用法?Java TextBlockAnchor.CENTER_RIGHT怎么用?Java TextBlockAnchor.CENTER_RIGHT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.jfree.text.TextBlockAnchor
的用法示例。
在下文中一共展示了TextBlockAnchor.CENTER_RIGHT属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testEquals
/**
* Check that the equals() method can distinguish all fields.
*/
@Test
public void testEquals() {
CategoryLabelPosition p1 = new CategoryLabelPosition(
RectangleAnchor.BOTTOM_LEFT, TextBlockAnchor.CENTER_RIGHT,
TextAnchor.BASELINE_LEFT, Math.PI / 4.0,
CategoryLabelWidthType.RANGE, 0.44f);
CategoryLabelPosition p2 = new CategoryLabelPosition(
RectangleAnchor.BOTTOM_LEFT, TextBlockAnchor.CENTER_RIGHT,
TextAnchor.BASELINE_LEFT, Math.PI / 4.0,
CategoryLabelWidthType.RANGE, 0.44f);
assertTrue(p1.equals(p2));
assertTrue(p2.equals(p1));
p1 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER_RIGHT, TextAnchor.BASELINE_LEFT,
Math.PI / 4.0, CategoryLabelWidthType.RANGE, 0.44f);
assertFalse(p1.equals(p2));
p2 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER_RIGHT, TextAnchor.BASELINE_LEFT,
Math.PI / 4.0, CategoryLabelWidthType.RANGE, 0.44f);
assertTrue(p1.equals(p2));
p1 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.BASELINE_LEFT, Math.PI / 4.0,
CategoryLabelWidthType.RANGE, 0.44f);
assertFalse(p1.equals(p2));
p2 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.BASELINE_LEFT, Math.PI / 4.0,
CategoryLabelWidthType.RANGE, 0.44f);
assertTrue(p1.equals(p2));
p1 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.CENTER, Math.PI / 4.0,
CategoryLabelWidthType.RANGE, 0.44f);
assertFalse(p1.equals(p2));
p2 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.CENTER, Math.PI / 4.0,
CategoryLabelWidthType.RANGE, 0.44f);
assertTrue(p1.equals(p2));
p1 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.CENTER, Math.PI / 6.0,
CategoryLabelWidthType.RANGE, 0.44f);
assertFalse(p1.equals(p2));
p2 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.CENTER, Math.PI / 6.0,
CategoryLabelWidthType.RANGE, 0.44f);
assertTrue(p1.equals(p2));
p1 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.CENTER, Math.PI / 6.0,
CategoryLabelWidthType.CATEGORY, 0.44f);
assertFalse(p1.equals(p2));
p2 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.CENTER, Math.PI / 6.0,
CategoryLabelWidthType.CATEGORY, 0.44f);
assertTrue(p1.equals(p2));
p1 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.CENTER, Math.PI / 6.0,
CategoryLabelWidthType.CATEGORY, 0.55f);
assertFalse(p1.equals(p2));
p2 = new CategoryLabelPosition(RectangleAnchor.TOP,
TextBlockAnchor.CENTER, TextAnchor.CENTER, Math.PI / 6.0,
CategoryLabelWidthType.CATEGORY, 0.55f);
assertTrue(p1.equals(p2));
}