Example usage for org.jfree.chart.title Title setVerticalAlignment

List of usage examples for org.jfree.chart.title Title setVerticalAlignment

Introduction

In this page you can find the example usage for org.jfree.chart.title Title setVerticalAlignment.

Prototype

public void setVerticalAlignment(VerticalAlignment alignment) 

Source Link

Document

Sets the vertical alignment for the title, and notifies any registered listeners of the change.

Usage

From source file:org.operamasks.faces.render.graph.ChartRenderer.java

private void setTitlePosition(Title title, PositionType position) {
    switch (position) {
    case Top:/*w w w .j  ava  2 s .c om*/
        title.setPosition(RectangleEdge.TOP);
        break;
    case Bottom:
        title.setPosition(RectangleEdge.BOTTOM);
        break;
    case Left:
        title.setPosition(RectangleEdge.LEFT);
        break;
    case Right:
        title.setPosition(RectangleEdge.RIGHT);
        break;
    case TopLeft:
        title.setPosition(RectangleEdge.TOP);
        title.setHorizontalAlignment(HorizontalAlignment.LEFT);
        break;
    case TopRight:
        title.setPosition(RectangleEdge.TOP);
        title.setHorizontalAlignment(HorizontalAlignment.RIGHT);
        break;
    case BottomLeft:
        title.setPosition(RectangleEdge.BOTTOM);
        title.setHorizontalAlignment(HorizontalAlignment.LEFT);
        break;
    case BottomRight:
        title.setPosition(RectangleEdge.BOTTOM);
        title.setHorizontalAlignment(HorizontalAlignment.RIGHT);
        break;
    case LeftTop:
        title.setPosition(RectangleEdge.LEFT);
        title.setVerticalAlignment(VerticalAlignment.TOP);
        break;
    case LeftBottom:
        title.setPosition(RectangleEdge.LEFT);
        title.setVerticalAlignment(VerticalAlignment.BOTTOM);
        break;
    case RightTop:
        title.setPosition(RectangleEdge.RIGHT);
        title.setVerticalAlignment(VerticalAlignment.TOP);
        break;
    case RightBottom:
        title.setPosition(RectangleEdge.RIGHT);
        title.setVerticalAlignment(VerticalAlignment.BOTTOM);
        break;
    }
}