Package quadbase.util
Interface ILegend
- All Superinterfaces:
IGradientPropertySet,IGradientSupport,IPlot
This interface contains methods to modify properties associated with the primary and secondary
chart legends.
A handle to a legend object for the primary axis can be obtained by calling the gethLegend
method defined in QbChart.
A handle to a legend object for the secondary axis can be obtained by calling the gethLegend method defined in the ISecondaryChart interface.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean[]areItemsHidden(int colIndex) Returns the boolean state of the items in the legend.booleanReturns whether or not the labels in the legend are displayed in reverse order.booleanReturns whether or not data point symbols are drawn in the legend.gethText()This function is used to get a handle to the IText object for modifying the font-related properties of the legend.intReturns the layout of the primary or secondary legend.intReturns the line space set by the setLineSpacing methodintReturns the number of columns are displayed in legend when fixed-column layout is in usedintreturn the symbol size ratio default value is 100%booleanReturns whether or not a line is drawn behind the symbol in the legend.booleanReturns the display status of the primary or secondary legend in the chart.voidsetDrawSymbols(boolean drawSym) Sets the state of the data point symbols in the legend.voidsetDrawSymbolWithLine(boolean drawSymWithLine) Sets the state of drawing a line behind the data point symbols in the legend.voidsetItemsHidden(int colIndex, boolean[] b) Sets the boolean state of the items in the legend.voidsetLabelsReversed(boolean b) Enables/Disables the display of legend labels in reverse order.voidsetLayout(int x) Sets the layout of the primary/secondary legend to horizontal, vertical, square or fixed column.voidsetLineSpacing(int gap) Adds a set amount of white space between legend lines Default value is 0voidsetNumberOfFixedColumn(int val) Sets the number of columns are displayed in legend when fixed-column layout is in usedvoidsetSymbolSizeRatio(int ratio) set the symbol size ratio default value is 100%voidSets the title of the legend in the chart without secondary axis.voidsetVisible(boolean b) Sets the display status of the primary or secondary legend in the chart.Methods inherited from interface quadbase.util.IGradientPropertySet
set3DShadingEnabled, setGradientCyclic, setGradientDesColor, setGradientEnabled, setGradientEndX, setGradientEndY, setGradientShade, setGradientStartX, setGradientStartYMethods inherited from interface quadbase.util.IGradientSupport
getGradientDesColor, getGradientEndX, getGradientEndY, getGradientShade, getGradientStartX, getGradientStartY, is3DShadingEnabled, isGradientCyclic, isGradientEnabledMethods inherited from interface quadbase.util.IPlot
getAppearance, getBackgroundColor, getBorderColor, getBorderThickness, getCutCornerWidth, getDepth, getDialBGImageRelativeURL, getDialBGImageURL, getDialBGRatio, getDialBGState, getDialFGImageRelativeURL, getDialFGImageURL, getDialFGRatio, getDialFGState, getPosition, getRelativeHeight, getRelativeWidth, isBackgroundVisible, isBorderVisible, setAppearance, setBackgroundColor, setBackgroundVisible, setBorderColor, setBorderThickness, setBorderVisible, setCutCornerWidth, setDepth, setDialBGImage, setDialBGImage, setDialBGRatio, setDialBGState, setDialFGImage, setDialFGImage, setDialFGRatio, setDialFGState, setPosition, setRelativeHeight, setRelativeWidth
-
Method Details
-
gethText
IText gethText()This function is used to get a handle to the IText object for modifying the font-related properties of the legend.Associated QbChart properties:
LEGEND_FONT SLEGEND_FONT LEGEND_FONTCOLOR SLEGEND_FONTCOLOR LEGEND_FONTANGLE SLEGEND_FONTANGLE
- Returns:
- A handle to IText for modifying font properties associated with the legend text.
-
setTitle
Sets the title of the legend in the chart without secondary axis.- Parameters:
t- The title string for the legend.
-
setLineSpacing
void setLineSpacing(int gap) Adds a set amount of white space between legend lines Default value is 0- Parameters:
gap- the amount of space added between legend lines
-
getLineSpacing
int getLineSpacing()Returns the line space set by the setLineSpacing method -
isVisible
boolean isVisible()Returns the display status of the primary or secondary legend in the chart.Associated QbChart property:
DRAW_LEGEND DRAW_SLEGEND
- Returns:
- True if the legend is visible, false otherwise.
-
setVisible
void setVisible(boolean b) Sets the display status of the primary or secondary legend in the chart.- Parameters:
b- The display status for the legend.
-
getLayout
int getLayout()Returns the layout of the primary or secondary legend.Associated QbChart property:
LEGEND_LAYOUT SLEGEND_LAYOUT
- Returns:
- The layout as: QbChart.HORIZONTAL, QbChart.VERTICAL, QbChart.SQUARE_LEGEND or QbChart.FIXED_COLUMN
-
setLayout
void setLayout(int x) Sets the layout of the primary/secondary legend to horizontal, vertical, square or fixed column.- Parameters:
x- QbChart.VERTICAL, QbChart.HORIZONTAL, QbChart.SQUARE_LEGEND or QbChart.FIXED_COLUMN
-
getNumberOfFixedColumn
int getNumberOfFixedColumn()Returns the number of columns are displayed in legend when fixed-column layout is in used- Returns:
- number of column
-
setNumberOfFixedColumn
void setNumberOfFixedColumn(int val) Sets the number of columns are displayed in legend when fixed-column layout is in used- Parameters:
val- number of column
-
areLabelsReversed
boolean areLabelsReversed()Returns whether or not the labels in the legend are displayed in reverse order.Associated QbChart property:
LEGEND_REVERSELABEL SLEGEND_REVERSELABEL
- Returns:
- True if legend labels are displayed in reverse order, false otherwise.
-
setLabelsReversed
void setLabelsReversed(boolean b) Enables/Disables the display of legend labels in reverse order.- Parameters:
b- Set to true to display labels in reverse order, false otherwise.
-
areItemsHidden
boolean[] areItemsHidden(int colIndex) Returns the boolean state of the items in the legend.Associated QbChart property: HIDE_LEGENDITEMS
- Parameters:
colIndex- The column number of the category or secondary value column used in the chart.- Returns:
- An array of booleans, where each element in the array contains the display status of the corresponding legend item. The size of the array is equal to the number of points in the category column.
-
setItemsHidden
void setItemsHidden(int colIndex, boolean[] b) Sets the boolean state of the items in the legend.- Parameters:
colIndex- The column number of the category or secondary value column used in the chart.b- The array of booleans containing the display status of each element in the legend.- See Also:
-
setDrawSymbols
void setDrawSymbols(boolean drawSym) Sets the state of the data point symbols in the legend. If set to true, the symbols are drawn in the legend.- Parameters:
drawSym- Set to true if symbols should be drawn in the legend.
-
areSymbolsDrawn
boolean areSymbolsDrawn()Returns whether or not data point symbols are drawn in the legend.- Returns:
- True if symbols are drawn, false otherwise.
-
setDrawSymbolWithLine
void setDrawSymbolWithLine(boolean drawSymWithLine) Sets the state of drawing a line behind the data point symbols in the legend. If set to true, a line is drawn behind the symbol in the legend.- Parameters:
drawSymWithLine- Set to true if line should be drawn behind the symbols in the legend.
-
isDrawSymbolWithLine
boolean isDrawSymbolWithLine()Returns whether or not a line is drawn behind the symbol in the legend.- Returns:
- True if line is drawn behind the symbol, false otherwise.
-
setSymbolSizeRatio
void setSymbolSizeRatio(int ratio) set the symbol size ratio default value is 100%- Parameters:
ratio-
-
getSymbolSizeRatio
int getSymbolSizeRatio()return the symbol size ratio default value is 100%- Returns:
- the symbol size ratio
-