| 
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectli.netcat.chart.util.AbstractPart
li.netcat.chart.util.TextPart
li.netcat.chart.util.LabelPart
The LabelPart is used to write an arbitrary text to the chart. It can
 have a constant text or retrieves it's text from a chart model using a key.
 It's also possible to specify an angle that rotates this label part by an
 arbitrary value.
| Field Summary | |
static int | 
BASELINE
Equal to ChartConstants.BASELINE | 
static int | 
BOTTOM
Equal to ChartConstants.BOTTOM | 
static int | 
CENTER
Equal to ChartConstants.CENTER | 
static int | 
LEFT
Equal to ChartConstants.LEFT | 
static int | 
RIGHT
Equal to ChartConstants.RIGHT | 
static int | 
TOP
Equal to ChartConstants.TOP | 
| Fields inherited from class li.netcat.chart.util.AbstractPart | 
BACKGROUND, FOREGROUND, PERSPECTIVE | 
| Constructor Summary | |
LabelPart(ChartModel chartModel,
          java.lang.String key)
Constructs a new instance of a LabelPart that uses the given key to retrieve the
 text from the given chart model. | 
|
LabelPart(java.lang.String text)
Constructs a new instance of a LabelPart using the given constant text.  | 
|
| Method Summary | |
 float | 
getAngleDegrees()
Returns the angle in degrees. 0 refers to normal, horizontal text, 90 is vertical (turned anticlockwise).  | 
 ChartModel | 
getChartModel()
Returns the chart model that provides the text.  | 
 int | 
getHorizontalTextAlignment()
Returns the horizontal alignment of the text.  | 
 java.lang.String | 
getKey()
Returns the key that is used to retrieve the text from the chart model.  | 
 Layout | 
getLayout(java.awt.Graphics g)
Returns an instance of a layout that is able to report the bounds of this part and is able to paint this part.  | 
 int | 
getVerticalTextAlignment()
Returns the vertical alignment of the text.  | 
 void | 
onChartModelChange(ChartModelEvent event)
Callback method that gets invoked when a change in the chart model occurs.  | 
 void | 
setAngleDegrees(float angle)
Sets the angle in degrees. 0 refers to normal, horizontal text, 90 is vertical (turned anticlockwise).  | 
 void | 
setChartModel(ChartModel chartModel)
Sets the chart model that provides the text.  | 
 void | 
setHorizontalTextAlignment(int horizontalTextAlignment)
Sets the horizontal alignment of the text.  | 
 void | 
setKey(java.lang.String key)
Sets the key that is used to retrieve the text from the chart model.  | 
 void | 
setVerticalTextAlignment(int verticalTextAlignment)
Sets the vertical alignment of the text.  | 
| Methods inherited from class li.netcat.chart.util.TextPart | 
getTextLook, setTextLook | 
| Methods inherited from class li.netcat.chart.util.AbstractPart | 
getChart, getPerspective, invalidate, setChart, setPerspective | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final int TOP
ChartConstants.TOP
public static final int LEFT
ChartConstants.LEFT
public static final int BOTTOM
ChartConstants.BOTTOM
public static final int RIGHT
ChartConstants.RIGHT
public static final int CENTER
ChartConstants.CENTER
public static final int BASELINE
ChartConstants.BASELINE
| Constructor Detail | 
public LabelPart(java.lang.String text)
LabelPart using the given constant text. Internally this
 text is saved as the key.
text - The text that gets displayed.
public LabelPart(ChartModel chartModel,
                 java.lang.String key)
LabelPart that uses the given key to retrieve the
 text from the given chart model.
chartModel - The chart model that provides the text.key - The key that is used to retrieve the text.| Method Detail | 
public java.lang.String getKey()
null, the key is directly used as a constant text.
null.public void setKey(java.lang.String key)
null, the key is directly used as a constant text.
key - The new key, can be null.public ChartModel getChartModel()
null, the key is directly used as a constant text.
public void setChartModel(ChartModel chartModel)
null, the key is directly used as a constant text.
chartModel - The chart model that provides the text.public int getHorizontalTextAlignment()
LEFT, CENTER or RIGHT.public void setHorizontalTextAlignment(int horizontalTextAlignment)
horizontalTextAlignment - Specify one of LEFT, CENTER or RIGHT.public int getVerticalTextAlignment()
TOP, CENTER, BASELINE or BOTTOM.public void setVerticalTextAlignment(int verticalTextAlignment)
public float getAngleDegrees()
public void setAngleDegrees(float angle)
public void onChartModelChange(ChartModelEvent event)
ChartModelListener
onChartModelChange in interface ChartModelListenerevent - The description of the event.public Layout getLayout(java.awt.Graphics g)
Part
getLayout in interface Partg - The relevant graphics object.
null.
  | 
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||