Style Intelligence v12.0

inetsoft.graph
Class LegendSpec

java.lang.Object
  extended by inetsoft.graph.LegendSpec
All Implemented Interfaces:
Serializable, Cloneable

public class LegendSpec
extends Object
implements Cloneable, Serializable

This class contains legend formatting attributes.

See Also:
Serialized Form

Constructor Summary
LegendSpec()
          Create a legend specification.
 
Method Summary
 Object clone()
          Make a copy of this object.
 Color getBackground()
          Get the background fill color.
 int getBorder()
          Get the border line style of the legends.
 Color getBorderColor()
          Get the legend border color.
 Point2D getPlotPosition()
          Get the position relative to the plot area.
 Point2D getPosition()
          Get the position of the legend.
 Dimension2D getPreferredSize()
          Get the preferred size of the legend.
 TextFrame getTextFrame()
          Get a text frame for mapping scale values to axis label.
 TextSpec getTextSpec()
          Get the text label attributes.
 String getTitle()
          Get the title to show on the legend.
 TextSpec getTitleTextSpec()
          Get the legend title text attributes.
 boolean isPartial()
          Check if items can be ignored if there is no sufficient space.
 boolean isTitleVisible()
          Check if the legend title should be displayed.
 boolean isVisible()
          Get the legend visibility.
 void setBackground(Color bg)
          Set the background fill color.
 void setBorder(int border)
          Set the border line style for the legends, e.g.
 void setBorderColor(Color borderColor)
          Set the legend border color.
 void setPartial(boolean partial)
          Set if items can be ignored if there is no sufficient space.
 void setPlotPosition(Point2D epos)
          Set the position relative to the plot area.
 void setPosition(Point2D position)
          Set the lower-left corner position for the legend.
 void setPreferredSize(Dimension2D preferredSize)
          Set the preferred size for the legend.
 void setTextFrame(TextFrame textFrame)
          Set a text frame to map scale values to axis labels.
 void setTextSpec(TextSpec textSpec)
          Set the text label attributes.
 void setTitle(String title)
          Set the legend title.
 void setTitleTextSpec(TextSpec textSpec)
          Set the legend title text attributes.
 void setTitleVisible(boolean vis)
          Set whether the legend title should be displayed.
 void setVisible(boolean visible)
          Set the legend visibility.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegendSpec

public LegendSpec()
Create a legend specification.

Method Detail

isVisible

public boolean isVisible()
Get the legend visibility.


setVisible

public void setVisible(boolean visible)
Set the legend visibility. A legend is displayed on a graph if the visible flag is true and there are more than one value for that legend.


getTitle

public String getTitle()
Get the title to show on the legend.


setTitle

public void setTitle(String title)
Set the legend title.


getPreferredSize

public Dimension2D getPreferredSize()
Get the preferred size of the legend.


setPreferredSize

public void setPreferredSize(Dimension2D preferredSize)
Set the preferred size for the legend.


getPosition

public Point2D getPosition()
Get the position of the legend.


setPosition

public void setPosition(Point2D position)
Set the lower-left corner position for the legend.

Parameters:
position - the point location in graph. If the value is between 0 and 1 (non-inclusive), it's treated as a proportion of the width/height. If the value is negative, it's the distance from the right/top of the graph.

setPlotPosition

public void setPlotPosition(Point2D epos)
Set the position relative to the plot area. If this position is specified, it overrides the regular position.


getPlotPosition

public Point2D getPlotPosition()
Get the position relative to the plot area.


getTextSpec

public TextSpec getTextSpec()
Get the text label attributes.


setTextSpec

public void setTextSpec(TextSpec textSpec)
Set the text label attributes.


setTextFrame

public void setTextFrame(TextFrame textFrame)
Set a text frame to map scale values to axis labels.


getTextFrame

public TextFrame getTextFrame()
Get a text frame for mapping scale values to axis label.


getBorder

public int getBorder()
Get the border line style of the legends.


setBorder

public void setBorder(int border)
Set the border line style for the legends, e.g. GraphConstants.THIN_LINE.


getBorderColor

public Color getBorderColor()
Get the legend border color.


setBorderColor

public void setBorderColor(Color borderColor)
Set the legend border color.


getTitleTextSpec

public TextSpec getTitleTextSpec()
Get the legend title text attributes.


setTitleTextSpec

public void setTitleTextSpec(TextSpec textSpec)
Set the legend title text attributes.


isTitleVisible

public boolean isTitleVisible()
Check if the legend title should be displayed.


setTitleVisible

public void setTitleVisible(boolean vis)
Set whether the legend title should be displayed.


getBackground

public Color getBackground()
Get the background fill color.


setBackground

public void setBackground(Color bg)
Set the background fill color.


setPartial

public void setPartial(boolean partial)
Set if items can be ignored if there is no sufficient space.


isPartial

public boolean isPartial()
Check if items can be ignored if there is no sufficient space.


clone

public Object clone()
Make a copy of this object.

Overrides:
clone in class Object

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.