EspressChart
v 5.5

quadbase.util
Interface ILegend

All Superinterfaces:
IPlot

public interface ILegend
extends 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:
ISecondaryChart

Method Summary
 boolean[] areItemsHidden(int colIndex)
          Returns the boolean state of the items in the legend.
 boolean areLabelsReversed()
          Returns whether or not the labels in the legend are displayed in reverse order.
 boolean areSymbolsDrawn()
          Returns whether or not data point symbols are drawn in the legend.
 IText gethText()
          This function is used to get a handle to the IText object for modifying the font-related properties of the legend.
 int getLayout()
          Returns the layout of the primary or secondary legend.
 int getSymbolSizeRatio()
          return the symbol size ratio default value is 100%
 boolean isVisible()
          Returns the display status of the primary or secondary legend in the chart.
 void setDrawSymbols(boolean drawSym)
          Sets the state of the data point symbols in the legend.
 void setItemsHidden(int colIndex, boolean[] b)
          Sets the boolean state of the items in the legend.
 void setLabelsReversed(boolean b)
          Enables/Disables the display of legend labels in reverse order.
 void setLayout(int x)
          Sets the layout of the primary/secondary legend to horizontal or vertical.
 void setSymbolSizeRatio(int ratio)
          set the symbol size ratio default value is 100%
 void setVisible(boolean b)
          Sets the display status of the primary or secondary legend in the chart.
 
Methods inherited from interface quadbase.util.IPlot
getAppearance, getBackgroundColor, getBorderColor, getBorderThickness, getDepth, getPosition, getRelativeHeight, getRelativeWidth, isBackgroundVisible, isBorderVisible, setAppearance, setBackgroundColor, setBackgroundVisible, setBorderColor, setBorderThickness, setBorderVisible, setDepth, setPosition, setRelativeHeight, setRelativeWidth
 

Method Detail

gethText

public 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.

isVisible

public 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

public 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

public int getLayout()
Returns the layout of the primary or secondary legend.

Associated QbChart property:


   LEGEND_LAYOUT
   SLEGEND_LAYOUT
 
Returns:
The layout as: QbChart.HORIZONTAL or QbChart.VERTICAL

setLayout

public void setLayout(int x)
Sets the layout of the primary/secondary legend to horizontal or vertical.
Parameters:
x - QbChart.VERTICAL or QbChart.HORIZONTAL

areLabelsReversed

public 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

public 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

public 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

public 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:
ILegend#areItemsHidded

setDrawSymbols

public 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

public boolean areSymbolsDrawn()
Returns whether or not data point symbols are drawn in the legend.
Returns:
True if symbols are drawn, false otherwise.

setSymbolSizeRatio

public void setSymbolSizeRatio(int ratio)
set the symbol size ratio default value is 100%
Parameters:
ratio -  

getSymbolSizeRatio

public int getSymbolSizeRatio()
return the symbol size ratio default value is 100%
Returns:
the symbol size ratio

EspressChart
v 5.5