org.apache.poi.xssf.usermodel.charts
Class XSSFManualLayout

java.lang.Object
  extended by org.apache.poi.xssf.usermodel.charts.XSSFManualLayout
All Implemented Interfaces:
ManualLayout

@Beta
public final class XSSFManualLayout
extends java.lang.Object
implements ManualLayout

Represents a SpreadsheetML manual layout.

Author:
Roman Kashitsyn

Constructor Summary
XSSFManualLayout(org.openxmlformats.schemas.drawingml.x2006.chart.CTLayout ctLayout)
          Create a new SpreadsheetML manual layout.
XSSFManualLayout(XSSFChart chart)
          Create a new SpreadsheetML manual layout for chart.
 
Method Summary
 org.openxmlformats.schemas.drawingml.x2006.chart.CTManualLayout getCTManualLayout()
          Return the underlying CTManualLayout bean.
 LayoutMode getHeightMode()
          Returns current height mode of this
 double getHeightRatio()
          Returns current fraction of the height of the chart.
 LayoutTarget getTarget()
          Returns current layout target.
 LayoutMode getWidthMode()
          Returns current width mode of this manual layout.
 double getWidthRatio()
          Returns current fraction of the width of the chart.
 double getX()
          Returns the x location of the chart element.
 LayoutMode getXMode()
          Returns current x-coordinnate layout mode.
 double getY()
          Returns current y location of the chart element.
 LayoutMode getYMode()
          Returns current y-coordinate layout mode.
 void setHeightMode(LayoutMode mode)
          Specifies how to interpret the Height element for this manual layout.
 void setHeightRatio(double ratio)
          Specifies the height (if Height Mode is Factor) or bottom (if Height Mode is edge) of the chart element as a fraction of the height of the chart.
 void setTarget(LayoutTarget target)
          Sets the layout target.
 void setWidthMode(LayoutMode mode)
          Specifies how to interpret the Width element for this manual layout.
 void setWidthRatio(double ratio)
          Specifies the width (if Width Mode is Factor) or right (if Width Mode is Edge) of the chart element as a fraction of the width of the chart.
 void setX(double x)
          Specifies the x location (left) of the chart element as a fraction of the width of the chart.
 void setXMode(LayoutMode mode)
          Sets the x-coordinate layout mode.
 void setY(double y)
          Specifies the y location (top) of the chart element as a fraction of the height of the chart.
 void setYMode(LayoutMode mode)
          Sets the y-coordinate layout mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSSFManualLayout

public XSSFManualLayout(org.openxmlformats.schemas.drawingml.x2006.chart.CTLayout ctLayout)
Create a new SpreadsheetML manual layout.

Parameters:
ctLayout - a Spreadsheet ML layout that should be used as base.

XSSFManualLayout

public XSSFManualLayout(XSSFChart chart)
Create a new SpreadsheetML manual layout for chart.

Parameters:
chart - a chart to create layout for.
Method Detail

getCTManualLayout

@Internal
public org.openxmlformats.schemas.drawingml.x2006.chart.CTManualLayout getCTManualLayout()
Return the underlying CTManualLayout bean.

Returns:
the underlying CTManualLayout bean.

setWidthRatio

public void setWidthRatio(double ratio)
Description copied from interface: ManualLayout
Specifies the width (if Width Mode is Factor) or right (if Width Mode is Edge) of the chart element as a fraction of the width of the chart.

Specified by:
setWidthRatio in interface ManualLayout
Parameters:
ratio - a fraction of the width of the chart.

getWidthRatio

public double getWidthRatio()
Description copied from interface: ManualLayout
Returns current fraction of the width of the chart.

Specified by:
getWidthRatio in interface ManualLayout
Returns:
fraction of the width of the chart or 0.0 if not set.

setHeightRatio

public void setHeightRatio(double ratio)
Description copied from interface: ManualLayout
Specifies the height (if Height Mode is Factor) or bottom (if Height Mode is edge) of the chart element as a fraction of the height of the chart.

Specified by:
setHeightRatio in interface ManualLayout
Parameters:
ratio - a fraction of the height of the chart.

getHeightRatio

public double getHeightRatio()
Description copied from interface: ManualLayout
Returns current fraction of the height of the chart.

Specified by:
getHeightRatio in interface ManualLayout
Returns:
fraction of the height of the chart or 0.0 if not set.

getTarget

public LayoutTarget getTarget()
Description copied from interface: ManualLayout
Returns current layout target.

Specified by:
getTarget in interface ManualLayout
Returns:
current layout target

setTarget

public void setTarget(LayoutTarget target)
Description copied from interface: ManualLayout
Sets the layout target.

Specified by:
setTarget in interface ManualLayout
Parameters:
target - new layout target.

getXMode

public LayoutMode getXMode()
Description copied from interface: ManualLayout
Returns current x-coordinnate layout mode.

Specified by:
getXMode in interface ManualLayout
Returns:
current x-coordinate layout mode.

setXMode

public void setXMode(LayoutMode mode)
Description copied from interface: ManualLayout
Sets the x-coordinate layout mode.

Specified by:
setXMode in interface ManualLayout
Parameters:
mode - new x-coordinate layout mode.

getYMode

public LayoutMode getYMode()
Description copied from interface: ManualLayout
Returns current y-coordinate layout mode.

Specified by:
getYMode in interface ManualLayout
Returns:
current y-coordinate layout mode.

setYMode

public void setYMode(LayoutMode mode)
Description copied from interface: ManualLayout
Sets the y-coordinate layout mode.

Specified by:
setYMode in interface ManualLayout
Parameters:
mode - new y-coordinate layout mode.

getX

public double getX()
Description copied from interface: ManualLayout
Returns the x location of the chart element.

Specified by:
getX in interface ManualLayout
Returns:
the x location (left) of the chart element or 0.0 if not set.

setX

public void setX(double x)
Description copied from interface: ManualLayout
Specifies the x location (left) of the chart element as a fraction of the width of the chart. If Left Mode is Factor, then the position is relative to the default position for the chart element.

Specified by:
setX in interface ManualLayout

getY

public double getY()
Description copied from interface: ManualLayout
Returns current y location of the chart element.

Specified by:
getY in interface ManualLayout
Returns:
the y location (top) of the chart element or 0.0 if not set.

setY

public void setY(double y)
Description copied from interface: ManualLayout
Specifies the y location (top) of the chart element as a fraction of the height of the chart. If Top Mode is Factor, then the position is relative to the default position for the chart element.

Specified by:
setY in interface ManualLayout

getWidthMode

public LayoutMode getWidthMode()
Description copied from interface: ManualLayout
Returns current width mode of this manual layout.

Specified by:
getWidthMode in interface ManualLayout
Returns:
width mode of this manual layout.

setWidthMode

public void setWidthMode(LayoutMode mode)
Description copied from interface: ManualLayout
Specifies how to interpret the Width element for this manual layout.

Specified by:
setWidthMode in interface ManualLayout
Parameters:
mode - new width layout mode of this manual layout.

getHeightMode

public LayoutMode getHeightMode()
Description copied from interface: ManualLayout
Returns current height mode of this

Specified by:
getHeightMode in interface ManualLayout
Returns:
height mode of this manual layout.

setHeightMode

public void setHeightMode(LayoutMode mode)
Description copied from interface: ManualLayout
Specifies how to interpret the Height element for this manual layout.

Specified by:
setHeightMode in interface ManualLayout
Parameters:
mode - new height mode of this manual layout.


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.