Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.cells
Class Legend

java.lang.Object
  extended by com.aspose.cells.Legend

public class Legend
extends java.lang.Object

Encapsulates the object that represents the chart legend.


Method Summary
 Area getArea()
          Gets the Area.
 Line getBorder()
          Gets the border Line.
 Font getFont()
          Gets a Font object of the chart legend.
 int getHeight()
          Sets the height of frame, in units of 1/4000 of the chart area.
 int getPosition()
          Gets the legend position type.
 int getWidth()
          Gets the width of frame,in units of 1/4000 of the chart area.
 int getX()
          Gets the x coordinate of the upper left corner in units of 1/4000 of the chart area.
 int getY()
          Gets the y coordinate of the upper left corner in units of 1/4000 of the chart area.
 void setFont(Font font)
          Sets a Font object of the chart legend.
 void setHeight(int height)
          Sets the height of frame,in units of 1/4000 of the chart area.
 void setPosition(int legendPositionType)
          Sets the legend position type.
 void setWidth(int width)
          Sets the width of frame,in units of 1/4000 of the chart area.
 void setX(int x)
          Sets the x coordinate of the upper left corner in units of 1/4000 of the chart area.
 void setY(int y)
          Sets the y coordinate of the upper left corner in units of 1/4000 of the chart area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPosition

public int getPosition()
Gets the legend position type.

Returns:
the legend position type.
Throws:
CellsException - if chart has bean removed.
See Also:
setPosition(int)

setPosition

public void setPosition(int legendPositionType)
Sets the legend position type.

Parameters:
legendPositionType - the legend position type. It could be one of the following values:
LegendPositionType.BOTTOM
LegendPositionType.CORNER
LegendPositionType.TOP
LegendPositionType.RIGHT
LegendPositionType.LEFT
LegendPositionType.NOT_DOCKED
Throws:
java.lang.IllegalArgumentException - if legend position type is invalid.
CellsException - if chart has bean removed.

getFont

public Font getFont()
Gets a Font object of the chart legend.

Returns:
a Font object of the chart legend.
Throws:
CellsException - if chart has bean removed.

setFont

public void setFont(Font font)
Sets a Font object of the chart legend.

Parameters:
font - a Font object of the chart legend
Throws:
CellsException - if chart has bean removed.

getX

public int getX()
Gets the x coordinate of the upper left corner in units of 1/4000 of the chart area.

Returns:
the x coordinate of the upper left corner.

setX

public void setX(int x)
Sets the x coordinate of the upper left corner in units of 1/4000 of the chart area.

Parameters:
x - the x coordinate of the upper left corner.
Throws:
CellsException - if chart has bean removed.
java.lang.IllegalArgumentException - if x > 4000;

getY

public int getY()
Gets the y coordinate of the upper left corner in units of 1/4000 of the chart area.

Returns:
the y coordinate of the upper left corner.

setY

public void setY(int y)
Sets the y coordinate of the upper left corner in units of 1/4000 of the chart area.

Parameters:
y - the y coordinate of the upper left corner.
Throws:
CellsException - if chart has bean removed.
java.lang.IllegalArgumentException - if y > 4000;

getHeight

public int getHeight()
Sets the height of frame, in units of 1/4000 of the chart area.

Returns:
the height of frame.

setHeight

public void setHeight(int height)
Sets the height of frame,in units of 1/4000 of the chart area.

Parameters:
height - the height of frame.
Throws:
CellsException - if chart has bean removed.

getWidth

public int getWidth()
Gets the width of frame,in units of 1/4000 of the chart area.

Returns:
the width of frame.

setWidth

public void setWidth(int width)
Sets the width of frame,in units of 1/4000 of the chart area.

Parameters:
width - the width of frame.
Throws:
CellsException - if chart has bean removed.
java.lang.IllegalArgumentException - if width > 4000;

getBorder

public Line getBorder()
Gets the border Line.

Returns:
the border Line.
Throws:
CellsException - if chart has bean removed.

getArea

public Area getArea()
Gets the Area.

Returns:
the Area.
Throws:
CellsException - if chart has bean removed.