com.java4less.rchart
Class ChartLabel

java.lang.Object
  |
  +--com.java4less.rchart.ChartLabel
All Implemented Interfaces:
com.java4less.rchart.IFloatingObject

public class ChartLabel
extends java.lang.Object
implements com.java4less.rchart.IFloatingObject

This is a private class used for rendering labels of scales, value in the chart ...


Field Summary
static java.lang.String layerId
          avoid overlapping of object in the same layer
 
Constructor Summary
ChartLabel(java.lang.String pformat, java.lang.String pvalue, boolean pvertical, boolean pCenter)
          Constructor
 
Method Summary
 java.lang.String getClickInfo()
          get the user information for click processing (this can be for example a http link)
 java.lang.String getName()
          get label name
 java.awt.Polygon getObjectBounds()
           
 java.lang.String getTip()
          get tip to be displayed when the cursor is on the label
 int getX()
           
 int getY()
           
 void initialize(ChartGraphics g, Chart c)
          get size required for painting
 void paint(ChartGraphics g, int x, int y, int width, int height)
          paint at a given position
 void setX(int x)
           
 void setY(int y)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layerId

public static final java.lang.String layerId
avoid overlapping of object in the same layer

See Also:
Constant Field Values
Constructor Detail

ChartLabel

public ChartLabel(java.lang.String pformat,
                  java.lang.String pvalue,
                  boolean pvertical,
                  boolean pCenter)
Constructor

Method Detail

initialize

public void initialize(ChartGraphics g,
                       Chart c)
get size required for painting


paint

public void paint(ChartGraphics g,
                  int x,
                  int y,
                  int width,
                  int height)
paint at a given position


getName

public java.lang.String getName()
get label name

Returns:

getClickInfo

public java.lang.String getClickInfo()
get the user information for click processing (this can be for example a http link)

Returns:

getTip

public java.lang.String getTip()
get tip to be displayed when the cursor is on the label

Returns:

getX

public int getX()
Specified by:
getX in interface com.java4less.rchart.IFloatingObject
See Also:
IFloatingObject

setX

public void setX(int x)
Specified by:
setX in interface com.java4less.rchart.IFloatingObject
See Also:
IFloatingObject

getY

public int getY()
Specified by:
getY in interface com.java4less.rchart.IFloatingObject
See Also:
IFloatingObject

setY

public void setY(int y)
Specified by:
setY in interface com.java4less.rchart.IFloatingObject
See Also:
IFloatingObject

getObjectBounds

public java.awt.Polygon getObjectBounds()
Specified by:
getObjectBounds in interface com.java4less.rchart.IFloatingObject
See Also:
IFloatingObject