|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujac.chart.BaseChartItem
org.ujac.chart.TextChartItem
public class TextChartItem
Name: ChartTextItem
Description: Holds the data, required to precisely place a texual chart item.
| Field Summary | |
|---|---|
static Color |
DEFAULT_TEXT_COLOR
The default text color. |
| Fields inherited from class org.ujac.chart.BaseChartItem |
|---|
outputArea, position |
| Constructor Summary | |
|---|---|
TextChartItem(ChartItemPosition position,
int maxWidth,
int hAlign,
String text,
Font font)
Constructs a ChartTextItem instance with specific attributes. |
|
TextChartItem(ChartItemPosition position,
int maxWidth,
int hAlign,
String text,
Font font,
Color color)
Constructs a ChartTextItem instance with specific attributes. |
|
TextChartItem(ChartItemPosition position,
int hAlign,
String text,
Font font)
Constructs a ChartTextItem instance with specific attributes. |
|
TextChartItem(ChartItemPosition position,
int hAlign,
String text,
Font font,
Color color)
Constructs a ChartTextItem instance with specific attributes. |
|
TextChartItem(ChartItemPosition position,
String text,
Font font)
Constructs a ChartTextItem instance with specific attributes. |
|
TextChartItem(ChartItemPosition position,
String text,
Font font,
Color color)
Constructs a ChartTextItem instance with specific attributes. |
|
TextChartItem(ChartItemPosition position,
String text,
Font font,
Color color,
boolean rotate)
Constructs a ChartTextItem instance with specific attributes. |
|
| Method Summary | |
|---|---|
Rectangle2D |
calculateOutputArea(Rectangle2D viewport,
Graphics2D graphics)
Calculates the position of the item. |
void |
draw(Rectangle2D viewport,
Graphics2D graphics)
Draws the item to the given graphic instance. |
Color |
getColor()
Getter method for the the property color. |
Font |
getFont()
Gets the item's font. |
int |
getHAlign()
Gets the item's horizontal alignment. |
int |
getMaxWidth()
Gets the maximum width of the item box. |
boolean |
getRotate()
Getter method for the the property angle. |
String |
getText()
Gets the item's text. |
TextChartItem |
setRotate(boolean rotate)
Setter method for the the property color. |
| Methods inherited from class org.ujac.chart.BaseChartItem |
|---|
alignItem, getHeight, getOutputArea, getPosition, getWidth, move, moveTo, resetMetrics |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Color DEFAULT_TEXT_COLOR
| Constructor Detail |
|---|
public TextChartItem(ChartItemPosition position,
String text,
Font font)
position - The position of the chart item.text - The text of the chart item.font - The font to render with.
public TextChartItem(ChartItemPosition position,
String text,
Font font,
Color color,
boolean rotate)
position - The position of the chart item.text - The text of the chart item.font - The font to render with.color - The text color to use.rotate - The rotation angle of the text.
public TextChartItem(ChartItemPosition position,
String text,
Font font,
Color color)
position - The position of the chart item.text - The text of the chart item.font - The font to render with.color - The text color to use.
public TextChartItem(ChartItemPosition position,
int hAlign,
String text,
Font font)
position - The position of the chart item.hAlign - The horizontal alignment of the text.text - The text of the chart item.font - The font to render with.
public TextChartItem(ChartItemPosition position,
int hAlign,
String text,
Font font,
Color color)
position - The position of the chart item.hAlign - The horizontal alignment of the text.text - The text of the chart item.font - The font to render with.color - The text color to use.
public TextChartItem(ChartItemPosition position,
int maxWidth,
int hAlign,
String text,
Font font)
position - The position of the chart item.maxWidth - The maximm width of the text item.hAlign - The horizontal alignment of the text.text - The text of the chart item.font - The font to render with.
public TextChartItem(ChartItemPosition position,
int maxWidth,
int hAlign,
String text,
Font font,
Color color)
position - The position of the chart item.maxWidth - The maximm width of the text item.hAlign - The horizontal alignment of the text.text - The text of the chart item.font - The font to render with.color - The text color to use.| Method Detail |
|---|
public String getText()
public int getMaxWidth()
public int getHAlign()
public Font getFont()
public Color getColor()
public boolean getRotate()
public TextChartItem setRotate(boolean rotate)
rotate - The new value for the property color.
public Rectangle2D calculateOutputArea(Rectangle2D viewport,
Graphics2D graphics)
calculateOutputArea in class BaseChartItemviewport - The viewport for chart output.graphics - The graphics object, needed to calculate the metrics.
public void draw(Rectangle2D viewport,
Graphics2D graphics)
viewport - The viewport for chart output.graphics - The graphics object, used for output.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||