Java Code Examples for org.jfree.ui.TextAnchor#CENTER

The following examples show how to use org.jfree.ui.TextAnchor#CENTER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CategoryTickTest.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Two objects that are equal are required to return the same hashCode.
 */
@Test
public void testHashCode() {
    Comparable c1 = "C1";
    TextBlock tb1 = new TextBlock();
    tb1.addLine(new TextLine("Block 1"));
    tb1.addLine(new TextLine("Block 2"));
    TextBlockAnchor tba1 = TextBlockAnchor.CENTER;
    TextAnchor ta1 = TextAnchor.CENTER;

    CategoryTick t1 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f);
    CategoryTick t2 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f);
    assertTrue(t1.equals(t2));
    int h1 = t1.hashCode();
    int h2 = t2.hashCode();
    assertEquals(h1, h2);
}
 
Example 2
Source File: StackedBarRenderer.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new renderer.
 *
 * @param renderAsPercentages  a flag that controls whether the data values
 *                             are rendered as percentages.
 */
public StackedBarRenderer(boolean renderAsPercentages) {
    super();
    this.renderAsPercentages = renderAsPercentages;

    // set the default item label positions, which will only be used if
    // the user requests visible item labels...
    ItemLabelPosition p = new ItemLabelPosition(ItemLabelAnchor.CENTER,
            TextAnchor.CENTER);
    setBasePositiveItemLabelPosition(p);
    setBaseNegativeItemLabelPosition(p);
    setPositiveItemLabelPositionFallback(null);
    setNegativeItemLabelPositionFallback(null);
}
 
Example 3
Source File: CategoryTickTest.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    CategoryTick t1 = new CategoryTick("C1", new TextBlock(),
            TextBlockAnchor.CENTER, TextAnchor.CENTER, 1.5f);
    CategoryTick t2 = (CategoryTick) TestUtilities.serialised(t1);
    assertEquals(t1, t2);
}
 
Example 4
Source File: CrosshairOverlay.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 5
Source File: Axis.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
protected TextAnchor labelAnchorH(AxisLabelLocation location) {
    if (location.equals(AxisLabelLocation.HIGH_END)) {
        return TextAnchor.CENTER_RIGHT;
    }
    if (location.equals(AxisLabelLocation.MIDDLE)) {
        return TextAnchor.CENTER;
    }
    if (location.equals(AxisLabelLocation.LOW_END)) {
        return TextAnchor.CENTER_LEFT;
    }
    throw new RuntimeException("Unexpected AxisLabelLocation: " + location);
}
 
Example 6
Source File: Axis.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
protected TextAnchor labelAnchorH(AxisLabelLocation location) {
    if (location.equals(AxisLabelLocation.HIGH_END)) {
        return TextAnchor.CENTER_RIGHT;
    }
    if (location.equals(AxisLabelLocation.MIDDLE)) {
        return TextAnchor.CENTER;
    }
    if (location.equals(AxisLabelLocation.LOW_END)) {
        return TextAnchor.CENTER_LEFT;
    }
    throw new RuntimeException("Unexpected AxisLabelLocation: " + location);
}
 
Example 7
Source File: PolarPlot.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Generates a list of tick values for the angular tick marks.
 *
 * @return A list of {@link NumberTick} instances.
 *
 * @since 1.0.10
 */
protected List refreshAngleTicks() {
    List ticks = new ArrayList();
    for (double currentTickVal = 0.0; currentTickVal < 360.0;
            currentTickVal += this.angleTickUnit.getSize()) {

        TextAnchor ta = calculateTextAnchor(currentTickVal);
        NumberTick tick = new NumberTick(new Double(currentTickVal),
            this.angleTickUnit.valueToString(currentTickVal),
            ta, TextAnchor.CENTER, 0.0);
        ticks.add(tick);
    }
    return ticks;
}
 
Example 8
Source File: CategoryTickTest.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    CategoryTick t1 = new CategoryTick("C1", new TextBlock(),
            TextBlockAnchor.CENTER, TextAnchor.CENTER, 1.5f);
    CategoryTick t2 = (CategoryTick) TestUtilities.serialised(t1);
    assertEquals(t1, t2);
}
 
Example 9
Source File: DateTickTest.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    DateTick t1 = new DateTick(new Date(0L), "Label", TextAnchor.CENTER,
            TextAnchor.CENTER, 10.0);
    DateTick t2 = (DateTick) TestUtilities.serialised(t1);
    assertEquals(t1, t2);
}
 
Example 10
Source File: StackedXYBarRenderer.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a new renderer.
 *
 * @param margin  the percentual amount of the bars that are cut away.
 */
public StackedXYBarRenderer(double margin) {
    super(margin);
    this.renderAsPercentages = false;

    // set the default item label positions, which will only be used if
    // the user requests visible item labels...
    ItemLabelPosition p = new ItemLabelPosition(ItemLabelAnchor.CENTER,
            TextAnchor.CENTER);
    setBasePositiveItemLabelPosition(p);
    setBaseNegativeItemLabelPosition(p);
    setPositiveItemLabelPositionFallback(null);
    setNegativeItemLabelPositionFallback(null);
}
 
Example 11
Source File: StackedBarRenderer.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a new renderer.
 *
 * @param renderAsPercentages  a flag that controls whether the data values
 *                             are rendered as percentages.
 */
public StackedBarRenderer(boolean renderAsPercentages) {
    super();
    this.renderAsPercentages = renderAsPercentages;

    // set the default item label positions, which will only be used if
    // the user requests visible item labels...
    ItemLabelPosition p = new ItemLabelPosition(ItemLabelAnchor.CENTER,
            TextAnchor.CENTER);
    setBasePositiveItemLabelPosition(p);
    setBaseNegativeItemLabelPosition(p);
    setPositiveItemLabelPositionFallback(null);
    setNegativeItemLabelPositionFallback(null);
}
 
Example 12
Source File: CategoryTickTest.java    From openstock with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
@Test
public void testEquals() {
    Comparable c1 = "C1";
    Comparable c2 = "C2";
    TextBlock tb1 = new TextBlock();
    tb1.addLine(new TextLine("Block 1"));
    TextBlock tb2 = new TextBlock();
    tb1.addLine(new TextLine("Block 2"));
    TextBlockAnchor tba1 = TextBlockAnchor.CENTER;
    TextBlockAnchor tba2 = TextBlockAnchor.BOTTOM_CENTER;
    TextAnchor ta1 = TextAnchor.CENTER;
    TextAnchor ta2 = TextAnchor.BASELINE_LEFT;

    CategoryTick t1 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f);
    CategoryTick t2 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb1, tba1, ta1, 1.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb1, tba1, ta1, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb2, tba1, ta1, 1.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb2, tba1, ta1, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb2, tba2, ta1, 1.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb2, tba2, ta1, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb2, tba2, ta2, 1.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb2, tba2, ta2, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb2, tba2, ta2, 2.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb2, tba2, ta2, 2.0f);
    assertTrue(t1.equals(t2));

}
 
Example 13
Source File: CategoryLabelPositionTest.java    From SIMVA-SoS with Apache License 2.0 4 votes vote down vote up
/**
 * 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));
}
 
Example 14
Source File: CategoryLabelPositionTest.java    From ECG-Viewer with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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));
}
 
Example 15
Source File: CategoryTickTest.java    From ccu-historian with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
@Test
public void testEquals() {
    Comparable c1 = "C1";
    Comparable c2 = "C2";
    TextBlock tb1 = new TextBlock();
    tb1.addLine(new TextLine("Block 1"));
    TextBlock tb2 = new TextBlock();
    tb1.addLine(new TextLine("Block 2"));
    TextBlockAnchor tba1 = TextBlockAnchor.CENTER;
    TextBlockAnchor tba2 = TextBlockAnchor.BOTTOM_CENTER;
    TextAnchor ta1 = TextAnchor.CENTER;
    TextAnchor ta2 = TextAnchor.BASELINE_LEFT;

    CategoryTick t1 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f);
    CategoryTick t2 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb1, tba1, ta1, 1.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb1, tba1, ta1, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb2, tba1, ta1, 1.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb2, tba1, ta1, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb2, tba2, ta1, 1.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb2, tba2, ta1, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb2, tba2, ta2, 1.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb2, tba2, ta2, 1.0f);
    assertTrue(t1.equals(t2));

    t1 = new CategoryTick(c2, tb2, tba2, ta2, 2.0f);
    assertFalse(t1.equals(t2));
    t2 = new CategoryTick(c2, tb2, tba2, ta2, 2.0f);
    assertTrue(t1.equals(t2));

}
 
Example 16
Source File: DateTickTest.java    From ECG-Viewer with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
@Test
public void testEquals() {
    Date d1 = new Date(0L);
    Date d2 = new Date(1L);
    String l1 = "Label 1";
    String l2 = "Label 2";
    TextAnchor ta1 = TextAnchor.CENTER;
    TextAnchor ta2 = TextAnchor.BASELINE_LEFT;

    DateTick t1 = new DateTick(d1, l1, ta1, ta1, Math.PI / 2.0);
    DateTick t2 = new DateTick(d1, l1, ta1, ta1, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d2, l1, ta1, ta1, Math.PI / 2.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d2, l1, ta1, ta1, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d1, l2, ta1, ta1, Math.PI / 2.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d1, l2, ta1, ta1, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d1, l1, ta2, ta1, Math.PI / 2.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d1, l1, ta2, ta1, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d1, l1, ta1, ta2, Math.PI / 2.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d1, l1, ta1, ta2, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d1, l1, ta1, ta1, Math.PI / 3.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d1, l1, ta1, ta1, Math.PI / 3.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(TickType.MINOR, d1, l1, ta1, ta1, Math.PI);
    t2 = new DateTick(TickType.MAJOR, d1, l1, ta1, ta1, Math.PI);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(TickType.MINOR, d1, l1, ta1, ta1, Math.PI);
    assertTrue(t1.equals(t2));
}
 
Example 17
Source File: CategoryLabelPosition.java    From buffer_bci with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Creates a new category label position record.
 *
 * @param categoryAnchor  the category anchor (<code>null</code> not
 *                        permitted).
 * @param labelAnchor  the label anchor (<code>null</code> not permitted).
 * @param widthType  the width type (<code>null</code> not permitted).
 * @param widthRatio  the maximum label width as a percentage (of the
 *                    category space or the range space).
 */
public CategoryLabelPosition(RectangleAnchor categoryAnchor,
        TextBlockAnchor labelAnchor, CategoryLabelWidthType widthType,
        float widthRatio) {
    // argument checking delegated...
    this(categoryAnchor, labelAnchor, TextAnchor.CENTER, 0.0, widthType,
            widthRatio);
}
 
Example 18
Source File: CategoryLabelPosition.java    From ccu-historian with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Creates a new category label position record.
 *
 * @param categoryAnchor  the category anchor (<code>null</code> not
 *                        permitted).
 * @param labelAnchor  the label anchor (<code>null</code> not permitted).
 */
public CategoryLabelPosition(RectangleAnchor categoryAnchor,
                             TextBlockAnchor labelAnchor) {
    // argument checking delegated...
    this(categoryAnchor, labelAnchor, TextAnchor.CENTER, 0.0,
            CategoryLabelWidthType.CATEGORY, 0.95f);
}
 
Example 19
Source File: ItemLabelPosition.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Creates a new position record (with zero rotation).
 *
 * @param itemLabelAnchor  the item label anchor (<code>null</code> not
 *                         permitted).
 * @param textAnchor  the text anchor (<code>null</code> not permitted).
 */
public ItemLabelPosition(ItemLabelAnchor itemLabelAnchor,
                         TextAnchor textAnchor) {
    this(itemLabelAnchor, textAnchor, TextAnchor.CENTER, 0.0);
}
 
Example 20
Source File: ItemLabelPosition.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Creates a new position record (with zero rotation).
 *
 * @param itemLabelAnchor  the item label anchor (<code>null</code> not
 *                         permitted).
 * @param textAnchor  the text anchor (<code>null</code> not permitted).
 */
public ItemLabelPosition(ItemLabelAnchor itemLabelAnchor,
                         TextAnchor textAnchor) {
    this(itemLabelAnchor, textAnchor, TextAnchor.CENTER, 0.0);
}