|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.quinncurtis.chart3djava.ChartObj
com.quinncurtis.chart3djava.GraphObj
com.quinncurtis.chart3djava.LegendItem
public class LegendItem
The LegendItem class contains the text and symbol used in displaying a single element of a chart legend.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
LegendItem()
The default LegendItem constructor. |
|
LegendItem(ChartText textitem,
GraphObj chartobj)
an LegendItem constructor creates a new object based on the source ChartText object, and the source nsymbol value. |
|
LegendItem(ChartText textitem,
int nsymbol)
The LegendItem constructor creates a new object based on the source ChartText object and the source nsymbol value. |
|
LegendItem(ChartText textitem,
int nsymbol,
GraphObj chartobj)
an LegendItem constructor creates a new object based on the source ChartText object, and the source nsymbol value. |
|
LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
ChartPlot chartobj,
int ngroup,
java.awt.Font thefont)
an LegendItem constructor creates a new object based on the source chart scale, a text string, a symbol value, an GraphObj object, a group number, and an explicit font. |
|
LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
GraphObj chartobj,
java.awt.Font thefont)
an LegendItem constructor creates a new object based on the source chart scale, a text string, a symbol value, an GraphObj object, and an explicit font. |
|
LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
int nsymbol,
ChartAttribute attrib,
java.awt.Font thefont)
an LegendItem constructor creates a new object based on the source chart scale, a text string, a symbol value, an ChartAttribute object, and an explicit font. |
|
LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
int nsymbol,
ChartPlot chartobj,
int ngroup,
java.awt.Font thefont)
an LegendItem constructor creates a new object based on the source chart scale, a text string, a symbol value, an GraphObj object, a group number, and an explicit font. |
|
LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
int nsymbol,
GraphObj chartobj,
java.awt.Font thefont)
an LegendItem constructor creates a new object based on the source chart scale, a text string, a symbol value, an GraphObj object, and an explicit font. |
|
| Method Summary | |
|---|---|
boolean |
checkIntersection(ChartPoint3D testpoint,
NearestPointData np)
The CheckIntersection method. |
java.lang.Object |
clone()
Returns an object that is a clone of this LegendItem object. |
void |
copy(LegendItem source)
Copies the source legend item object. |
void |
draw(java.awt.Graphics2D g2)
The draw method for this class. |
int |
errorCheck(int nerror)
Checks the legend item object for common errors. |
ChartSymbol3D |
getLegendItemSymbol()
Returns the ChartSymbol3D object used by the legend item. |
ChartText |
getLegendItemText()
Returns the ChartText object used by the legend item. |
double |
getResizeMultiplier()
Returns the resize multiplier used by the legend item. |
void |
setChartObjScale(PhysicalCoordinates transform)
Sets the reference to the PhysicalCoordinates object that the chart object is placed in. |
void |
setLegendItemSymbol(ChartSymbol3D symbol)
Sets the ChartSymbol3D object used by the legend item. |
void |
setLegendItemText(ChartText text)
Sets the ChartText object used by the legend item. |
void |
setResizeMultiplier(double multiplier)
Sets the resize multiplier used by the legend item. |
| Methods inherited from class com.quinncurtis.chart3djava.ChartObj |
|---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LegendItem()
public LegendItem(ChartText textitem,
int nsymbol)
textitem - A reference to an ChartText item used as the text for a legend item.nsymbol - The symbol used in the legend item. Use one of the chart symbol constants: NOSYMBOL,
SQUARE, TRIANGLE, DIAMOND, CROSS, PLUS, STAR, LINE, HBAR , VBAR, BAR3D, or CIRCLE.
public LegendItem(ChartText textitem,
int nsymbol,
GraphObj chartobj)
textitem - A reference to an ChartText item used as the text for a legend item.nsymbol - The symbol used in the legend item. Use one of the chart symbol constants: NOSYMBOL,
SQUARE, TRIANGLE, DIAMOND, CROSS, PLUS, STAR, LINE, HBAR , VBAR, BAR3D, or CIRCLE.chartobj - A reference to an GraphObj object. The color of the legend item is copied out of this
object.
public LegendItem(ChartText textitem,
GraphObj chartobj)
textitem - A reference to an ChartText item used as the text for a legend item.chartobj - A reference to an GraphObj object. The color of the legend item is copied out
of this object.
public LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
int nsymbol,
ChartAttribute attrib,
java.awt.Font thefont)
transform - The coordinate system for the new legend item object.stext - A string used as the text for a legend item.nsymbol - The symbol used in the legend item. Use one of the chart symbol constants: NOSYMBOL,
SQUARE, TRIANGLE, DIAMOND, CROSS, PLUS, STAR, LINE, HBAR , VBAR, BAR3D, or CIRCLE.attrib - A reference to an ChartAttribute object. The color of the legend item is copied out
of this object.thefont - A reference to the font that is to be used in the display of the legend item text.
public LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
int nsymbol,
GraphObj chartobj,
java.awt.Font thefont)
transform - The coordinate system for the new legend item object.stext - A string used as the text for a legend item.nsymbol - The symbol used in the legend item. Use one of the chart symbol constants:
NOSYMBOL, SQUARE, TRIANGLE, DIAMOND, CROSS, PLUS, STAR, LINE, HBAR , VBAR, BAR3D, or CIRCLE.chartobj - A reference to an GraphObj object. The color of the legend item is copied out
of attributes of this object.thefont - A reference to the font that is to be used in the display of the legend item text.
public LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
GraphObj chartobj,
java.awt.Font thefont)
transform - The coordinate system for the new legend item object.stext - A string used as the text for a legend item.chartobj - A reference to an GraphObj object. The color of the legend item is copied
out of attributes of this object.thefont - A reference to the font that is to be used in the display of the legend item text.
public LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
int nsymbol,
ChartPlot chartobj,
int ngroup,
java.awt.Font thefont)
transform - The coordinate system for the new legend item object.stext - A string used as the text for a legend item.nsymbol - The symbol used in the legend item. Use one of the chart symbol constants:
NOSYMBOL, SQUARE, TRIANGLE, DIAMOND, CROSS, PLUS, STAR, LINE, HBAR , VBAR, BAR3D, or CIRCLE.chartobj - A reference to an GraphObj object. The color of the legend item is copied
out of attributes for a particular group of this object.ngroup - The group number of the GraphObj that the color for this legend item is copied from.thefont - A reference to the font that is to be used in the display of the legend item text.
public LegendItem(PhysicalCoordinates transform,
java.lang.String stext,
ChartPlot chartobj,
int ngroup,
java.awt.Font thefont)
transform - The coordinate system for the new legend item object.stext - A string used as the text for a legend item.chartobj - A reference to an GraphObj object. The color of the legend item is
copied out of attributes for a particular group of this object.ngroup - The group number of the GraphObj that the color for this legend item
is copied from.thefont - A reference to the font that is to be used in the display of the legend item text.| Method Detail |
|---|
public int errorCheck(int nerror)
errorCheck in class GraphObjnerror - Current error state
public void setChartObjScale(PhysicalCoordinates transform)
setChartObjScale in class GraphObjtransform - A reference to the PhysicalCoordinates object that the chart object is placed inpublic void copy(LegendItem source)
source - The source legend item object.public java.lang.Object clone()
clone in class GraphObjpublic void draw(java.awt.Graphics2D g2)
draw in class GraphObjg2 - The graphics context.public ChartText getLegendItemText()
public void setLegendItemText(ChartText text)
text - Sets the ChartText object used by the legend item.public ChartSymbol3D getLegendItemSymbol()
public void setLegendItemSymbol(ChartSymbol3D symbol)
symbol - Sets the ChartSymbol3D object used by the legend item.public void setResizeMultiplier(double multiplier)
setResizeMultiplier in class GraphObjmultiplier - Sets the resize multiplier used by the legend item.public double getResizeMultiplier()
getResizeMultiplier in class GraphObj
public boolean checkIntersection(ChartPoint3D testpoint,
NearestPointData np)
checkIntersection in class GraphObjtestpoint - The test pointnp - Nearest point information for data based objects.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||