OBEROn SDK

com.oberon.ooql.sdk
Class GraphStyler.Label

java.lang.Object
  extended by com.oberon.ooql.sdk.GraphStyler.Label
Enclosing class:
GraphStyler

public class GraphStyler.Label
extends java.lang.Object

Generic chart label


Constructor Summary
GraphStyler.Label(org.jdom.Element label)
          Generates a label from XML element tree
GraphStyler.Label(java.lang.String text)
          Generates a new label with default font placed on the canvas origin (0,0) position
GraphStyler.Label(java.lang.String text, GraphStyler.Point position)
          Generates a new label with default font
GraphStyler.Label(java.lang.String text, GraphStyler.Point position, GraphStyler.Font font, float angle)
          Generates a new label
 
Method Summary
 void fromXML(org.jdom.Element label)
          Loads the label parameters from XML element tree
 float getAngle()
          Get the label rotation angle (degrees)
 GraphStyler.Font getFont()
          Get the label font
 int getHorizontalAlign()
          Get the label horizontal alignment
 int getHorizontalPos()
          Get the label horizontal position on the chart canvas
 GraphStyler.Point getPosition()
          Get the label position on the chart canvas
 java.lang.String getText()
          Get the label text
 int getVerticalAlign()
          Get the label vertical alignment
 int getVerticalPos()
          Get the label vertical position on the chart canvas
 void setAngle(float angle)
          Set the label rotation angle (degrees)
 void setFont(GraphStyler.Font font)
          Set the label font
 void setHorizontalAlign(int align)
          Set the label horizontal alignment; see the TEXT ALIGNMENT constants
 void setHorizontalPos(int position)
          Set the label horizontal position on the chart canvas
 void setText(java.lang.String text)
          Set the label text
 void setVerticalAlign(int align)
          Set the label vertical alignment; see the TEXT ALIGNMENT constants
 void setVerticalPos(int position)
          Set the label vertical position on the chart canvas
 org.jdom.Element toXML(java.lang.String name)
          Return the label parameters as XML element tree
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphStyler.Label

public GraphStyler.Label(java.lang.String text)
Generates a new label with default font placed on the canvas origin (0,0) position

Parameters:
text - the label text

GraphStyler.Label

public GraphStyler.Label(java.lang.String text,
                         GraphStyler.Point position)
Generates a new label with default font

Parameters:
text - the label text
position - the label position on the chart canvas

GraphStyler.Label

public GraphStyler.Label(java.lang.String text,
                         GraphStyler.Point position,
                         GraphStyler.Font font,
                         float angle)
Generates a new label

Parameters:
text - the label text
position - the label position on the chart canvas
font - the label font
angle - the rotation angle

GraphStyler.Label

public GraphStyler.Label(org.jdom.Element label)
Generates a label from XML element tree

Method Detail

setText

public void setText(java.lang.String text)
Set the label text


getText

public java.lang.String getText()
Get the label text


getPosition

public GraphStyler.Point getPosition()
Get the label position on the chart canvas


setHorizontalPos

public void setHorizontalPos(int position)
Set the label horizontal position on the chart canvas


getHorizontalPos

public int getHorizontalPos()
Get the label horizontal position on the chart canvas


setVerticalPos

public void setVerticalPos(int position)
Set the label vertical position on the chart canvas


getVerticalPos

public int getVerticalPos()
Get the label vertical position on the chart canvas


setFont

public void setFont(GraphStyler.Font font)
Set the label font


getFont

public GraphStyler.Font getFont()
Get the label font


setAngle

public void setAngle(float angle)
Set the label rotation angle (degrees)


getAngle

public float getAngle()
Get the label rotation angle (degrees)


setHorizontalAlign

public void setHorizontalAlign(int align)
Set the label horizontal alignment; see the TEXT ALIGNMENT constants


getHorizontalAlign

public int getHorizontalAlign()
Get the label horizontal alignment


setVerticalAlign

public void setVerticalAlign(int align)
Set the label vertical alignment; see the TEXT ALIGNMENT constants


getVerticalAlign

public int getVerticalAlign()
Get the label vertical alignment


toXML

public org.jdom.Element toXML(java.lang.String name)
Return the label parameters as XML element tree

Parameters:
name - the root XML tag

fromXML

public void fromXML(org.jdom.Element label)
Loads the label parameters from XML element tree


OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.