org.swtchart.ILegend Interface Reference

A legend for chart. More...

Inheritance diagram for org.swtchart.ILegend:
Inheritance graph
[legend]

List of all members.

Public Member Functions

boolean isVisible ()
 Gets the visibility state.
void setBackground (Color color)
 Sets the background color of legend.
Color getBackground ()
 Gets the background color of legend.
void setForeground (Color color)
 Sets the foreground color of legend.
Color getForeground ()
 Gets the foreground color of legend.
Font getFont ()
 Gets the font.
void setFont (Font font)
 Sets the font.
int getPosition ()
 Gets the position of legend.
void setPosition (int position)
 Sets the position of legend.
Rectangle getBounds (String seriesId)
 Gets the rectangle associated with the given series id on legend.

Package Functions

void setVisible (boolean visible)
 Sets legend visible.

Detailed Description

A legend for chart.

Definition at line 16 of file ILegend.java.


Member Function Documentation

Color org.swtchart.ILegend.getBackground (  ) 

Gets the background color of legend.

Returns:
background color of legend.

Referenced by org.swtchart.internal.Legend.paintControl(), and org.swtchart.ext.internal.properties.LegendPage.selectValues().

Here is the caller graph for this function:

Rectangle org.swtchart.ILegend.getBounds ( String  seriesId  ) 

Gets the rectangle associated with the given series id on legend.

This method is typically used for mouse listener to check whether mouse cursor is on legend for a certain series.

Mouse listener can be added by casting ILegend to Control.

 Control legend = (Control) chart.getLegend();
 legend.addMouseListener(...);
 
Parameters:
seriesId the series id
Returns:
the rectangle associated with the given series id in pixels.

Implemented in org.swtchart.internal.Legend.

Referenced by org.swtchart.examples.advanced.LegendBoundsExample.createChart().

Here is the caller graph for this function:

Font org.swtchart.ILegend.getFont (  ) 
Color org.swtchart.ILegend.getForeground (  ) 

Gets the foreground color of legend.

Returns:
foreground color of legend.

Referenced by org.swtchart.internal.Legend.paintControl(), and org.swtchart.ext.internal.properties.LegendPage.selectValues().

Here is the caller graph for this function:

int org.swtchart.ILegend.getPosition (  ) 

Gets the position of legend.

Returns:
the position of legend.

Implemented in org.swtchart.internal.Legend.

boolean org.swtchart.ILegend.isVisible (  ) 

Gets the visibility state.

Returns:
true if legend is visible

Implemented in org.swtchart.internal.Legend.

Referenced by org.swtchart.ext.internal.properties.LegendPage.selectValues().

Here is the caller graph for this function:

void org.swtchart.ILegend.setBackground ( Color  color  ) 

Sets the background color of legend.

Parameters:
color the background color

Implemented in org.swtchart.internal.Legend.

Referenced by org.swtchart.ext.internal.properties.LegendPage.apply().

Here is the caller graph for this function:

void org.swtchart.ILegend.setFont ( Font  font  ) 

Sets the font.

Parameters:
font the font

Implemented in org.swtchart.internal.Legend.

Referenced by org.swtchart.ext.internal.properties.LegendPage.apply().

Here is the caller graph for this function:

void org.swtchart.ILegend.setForeground ( Color  color  ) 

Sets the foreground color of legend.

Parameters:
color the foreground color

Implemented in org.swtchart.internal.Legend.

Referenced by org.swtchart.ext.internal.properties.LegendPage.apply().

Here is the caller graph for this function:

void org.swtchart.ILegend.setPosition ( int  position  ) 

Sets the position of legend.

If the position is SWT.LEFT or SWT.RIGHT, the orientation of series on legend will be vertical. If the position is SWT.TOP or SWT.BOTTOM, the orientation will be horizontal.

Parameters:
position the position of legend that can be SWT.LEFT, SWT.RIGHT, SWT.TOP or SWT.BOTTOM.

Implemented in org.swtchart.internal.Legend.

void org.swtchart.ILegend.setVisible ( boolean  visible  )  [package]

Sets legend visible.

Parameters:
visible the visibility state

Implemented in org.swtchart.internal.Legend.

Referenced by org.swtchart.ext.internal.properties.LegendPage.apply().

Here is the caller graph for this function:


The documentation for this interface was generated from the following file:

Generated on 26 Oct 2015 for SWTChart.org by  doxygen 1.6.1