|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.steema.teechart.TeeBase
com.steema.teechart.Shape
com.steema.teechart.TextShape
com.steema.teechart.TextShapePosition
com.steema.teechart.legend.Legend
public class Legend
Title: Legend class
Description: Accesses all Chart Legend characteristics
Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
Field Summary | |
---|---|
protected boolean |
columnWidthAuto
|
protected int[] |
columnWidths
|
protected int |
firstValue
|
protected int |
iLastValue
|
LegendStyle |
iLegendStyle
|
Fields inherited from class com.steema.teechart.TextShapePosition |
---|
bCustomPosition |
Fields inherited from class com.steema.teechart.TextShape |
---|
defaultText, drawText |
Fields inherited from class com.steema.teechart.Shape |
---|
bBevel, bBorderRound, bBrush, bImageBevel, bTransparent, defaultVisible, pPen, shadow, shapeBounds, visible |
Fields inherited from class com.steema.teechart.TeeBase |
---|
chart, InternalUse |
Constructor Summary | |
---|---|
Legend(IBaseChart c)
|
Method Summary | |
---|---|
protected int |
calcItemHeight()
|
int |
clicked(int x,
int y)
Returns the index of the clicked Legend Point. |
int |
clicked(Point p)
Returns the index of the clicked Legend Point. |
boolean |
doMouseDown(Point p)
|
protected boolean |
drawTitle()
|
java.lang.String |
formattedLegend(int seriesOrValueIndex)
Returns the text string corresponding to a Legend position. |
java.lang.String |
formattedValue(Series aSeries,
int valueIndex)
Returns the corresponding Legend text for the Series ValueIndex point. |
LegendAlignment |
getAlignment()
Defines the Legend position. |
boolean |
getCheckBoxes()
Enables/Disables the display of Legend check boxes. |
int |
getColorWidth()
|
int |
getColumnWidth(int column)
|
boolean |
getColumnWidthAuto()
Automatically calculates best fit of legend columns. |
boolean |
getCurrentPage()
Determines whether or not the Legend shows only the current page iItems when the Chart is divided into pages. |
ChartPen |
getDividingLines()
Specifies the Pen attributes used to draw lines separating Legend iItems. |
int |
getFirstValue()
Defines which is the first Legend item displayed. |
boolean |
getFontSeriesColor()
The legend text font color to that of the Series color. |
int |
getHorizMargin()
Speficies the number of screen pixels between Legend and Chart rectangles. |
boolean |
getInverted()
Draws the Legend iItems in opposite direction when true. |
int |
getLastValue()
Returns the index of the first displayed value at legend. |
LegendItems |
getLegendItems()
|
LegendStyle |
getLegendStyle()
Defines which iItems will be displayed in the Chart Legend. |
java.lang.String[] |
getLines()
Accesses the array of Text lines. |
int |
getMaxNumRows()
The Maximum number of Legend Rows displayed for a horizontal Legend (Chart Top or Bottom). |
boolean |
getResizeChart()
Automatically resizes Chart rectangle to prevent overlap with Legend. |
Series |
getSeries()
Determines which series is used as data for the Legend entries. |
LegendSymbol |
getSymbol()
Controls the width and position of the color rectangle associated with each Legend's item. |
java.lang.String |
getText()
Adds text to the Legend. |
LegendTextStyle |
getTextStyle()
Determines how Legend text iItems will be formatted. |
int |
getTextSymbolGap()
|
LegendTitle |
getTitle()
Sets the Title text and its characteristics at the top of the legend |
int |
getTopLeftPos()
Specifies the Legend's top position in percent of total chart height. |
boolean |
getUseMaxWidth()
|
boolean |
getVertical()
Is read only and returns true only if the legend is left or right aligned. |
int |
getVertMargin()
The vertical margin in pixels between Legend and Chart rectangle. |
int |
getVertSpacing()
The vertical spacing between Legend iItems (pixels). |
boolean |
hasCheckBoxes()
Returns true when the legend displays checkboxes and it is showing series names. |
void |
paint(IGraphics3D g,
Rectangle rect)
Paints the TextShape object on the Chart Canvas. |
protected java.lang.Object |
readResolve()
|
Rectangle |
resizeChartRect(Rectangle rect)
Returns the chart rectangle minus the space occupied by the Legend. |
void |
setAlignment(LegendAlignment value)
Defines the Legend position. |
void |
setChart(IBaseChart c)
Chart associated with this object. |
void |
setCheckBoxes(boolean value)
Displays the Legend check boxes when true. |
void |
setColorWidth(int value)
|
void |
setColumnWidth(int column,
int value)
|
void |
setColumnWidthAuto(boolean value)
Automatically calculates best fit of legend columns. |
void |
setCurrentPage(boolean value)
When true, the Legend shows only the current page iItems when the Chart is divided into pages. |
void |
setDividingLines(ChartPen value)
Internal use - serialization |
void |
setFirstValue(int value)
Determines which is the first Legend item displayed. |
void |
setFontSeriesColor(boolean value)
Sets the legend text font color to that of the Series color. |
void |
setHorizMargin(int value)
Speficies the number of screen pixels between Legend and Chart rectangles. |
void |
setInverted(boolean value)
Draws the Legend iItems in opposite direction when true. |
void |
setLegendStyle(LegendStyle value)
Defines which iItems will be displayed in the Chart Legend. |
void |
setLines(java.lang.String[] value)
Accesses the array of Text lines. |
void |
setMaxNumRows(int value)
Sets the Maximum number of Legend Rows displayed for a horizontal Legend (Chart Top or Bottom). |
void |
setResizeChart(boolean value)
Automatically resizes Chart rectangle to prevent overlap with Legend. |
void |
setSeries(Series value)
Determines which series is used as data for the Legend entries. |
void |
setSymbol(LegendSymbol value)
|
void |
setText(java.lang.String value)
Adds text to the Legend. |
void |
setTextStyle(LegendTextStyle value)
Specifies how Legend text iItems will be formatted. |
void |
setTextSymbolGap(int value)
|
void |
setTopLeftPos(int value)
Specifies the Legend's top position in percent of total chart height. |
void |
setUseMaxWidth(boolean value)
|
void |
setVertMargin(int value)
Determines the vertical margin in pixels between Legend and Chart rectangle. |
void |
setVertSpacing(int value)
Determines the vertical spacing between Legend iItems (pixels). |
Methods inherited from class com.steema.teechart.TextShapePosition |
---|
getCustomPosition, setCustomPosition, shouldSerializeBottom, shouldSerializeLeft, shouldSerializeRight, shouldSerializeTop |
Methods inherited from class com.steema.teechart.TextShape |
---|
assign, drawRectRotated, drawString, drawText, getAutoSize, getFont, getLinesLength, getShadowSize, getShapeStyle, getTextFormat, paint, paint, setAutoSize, setDrawText, setShadowSize, setShapeStyle, setTextFormat |
Methods inherited from class com.steema.teechart.Shape |
---|
assign, getBevel, getBevelInner, getBevelOuter, getBevelWidth, getBorderRound, getBottom, getBrush, getColor, getGradient, getHeight, getImage, getImageBevel, getImageMode, getImageTransparent, getLeft, getPen, getRight, getShadow, getShapeBounds, getTop, getTransparency, getTransparent, getVisible, getWidth, setBevel, setBevelInner, setBevelOuter, setBevelWidth, setBorderRound, setBottom, setBrush, setColor, setDefaultVisible, setHeight, setImage, setImageMode, setImageTransparent, setLeft, setPen, setRight, setShapeBounds, setTop, setTransparency, setTransparent, setVisible, setWidth |
Methods inherited from class com.steema.teechart.TeeBase |
---|
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public transient LegendStyle iLegendStyle
protected boolean columnWidthAuto
protected int[] columnWidths
protected transient int firstValue
protected transient int iLastValue
Constructor Detail |
---|
public Legend(IBaseChart c)
Method Detail |
---|
protected java.lang.Object readResolve()
readResolve
in class TextShape
public LegendTextStyle getTextStyle()
public int getLastValue()
public void setTextStyle(LegendTextStyle value)
value
- LegendTextStylepublic int getTextSymbolGap()
public void setTextSymbolGap(int value)
public Series getSeries()
public void setSeries(Series value)
value
- Seriespublic boolean getCheckBoxes()
public void setChart(IBaseChart c)
Shape
setChart
in class TextShape
c
- IBaseChartpublic void setCheckBoxes(boolean value)
value
- booleanpublic boolean getCurrentPage()
public void setCurrentPage(boolean value)
value
- booleanpublic boolean getFontSeriesColor()
public void setFontSeriesColor(boolean value)
value
- booleanpublic ChartPen getDividingLines()
public void setDividingLines(ChartPen value)
public LegendSymbol getSymbol()
public void setSymbol(LegendSymbol value)
public boolean getInverted()
public void setInverted(boolean value)
value
- booleanpublic LegendAlignment getAlignment()
public void setAlignment(LegendAlignment value)
value
- LegendAlignmentsLegLegendAlignment
public int getColumnWidth(int column)
public void setColumnWidth(int column, int value)
public boolean getColumnWidthAuto()
public void setColumnWidthAuto(boolean value)
value
- booleanpublic int getFirstValue()
public void setFirstValue(int value)
value
- intgetFirstValue()
public int getTopLeftPos()
public void setTopLeftPos(int value)
value
- intpublic int getMaxNumRows()
public void setMaxNumRows(int value)
value
- intpublic java.lang.String[] getLines()
TextShape
getLines
in class TextShape
public void setLines(java.lang.String[] value)
TextShape
setLines
in class TextShape
value
- String[]public java.lang.String getText()
getText
in class TextShape
public void setText(java.lang.String value)
setText
in class TextShape
value
- Stringpublic int getVertSpacing()
public void setVertSpacing(int value)
value
- intpublic int getHorizMargin()
public void setHorizMargin(int value)
value
- intpublic int getVertMargin()
public void setVertMargin(int value)
value
- intpublic boolean getResizeChart()
public void setResizeChart(boolean value)
value
- booleanpublic LegendStyle getLegendStyle()
public void setLegendStyle(LegendStyle value)
value
- LegendStylesgetLegendStyle()
public LegendTitle getTitle()
public boolean doMouseDown(Point p)
public int clicked(Point p)
p
- Point
public int clicked(int x, int y)
x
- inty
- int
protected int calcItemHeight()
protected boolean drawTitle()
public boolean hasCheckBoxes()
public boolean getVertical()
public int getColorWidth()
public void setColorWidth(int value)
public boolean getUseMaxWidth()
public void setUseMaxWidth(boolean value)
public Rectangle resizeChartRect(Rectangle rect)
rect
- Rectangle
public void paint(IGraphics3D g, Rectangle rect)
TextShape
paint
in class TextShape
g
- IGraphics3Drect
- Rectanglepublic java.lang.String formattedLegend(int seriesOrValueIndex)
seriesOrValueIndex
- int
public java.lang.String formattedValue(Series aSeries, int valueIndex)
aSeries
- SeriesvalueIndex
- int
public LegendItems getLegendItems()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |