Namespace EasyXLS.Drawings
Class DrawingObject
- System.Object
-
- EasyXLS.Drawings.DrawingObject
-
- Direct Known Subclasses:
LineDrawingObject
public class DrawingObject extends System.Object
A drawing is a graphical object that can be included inside an Excel document, like shapes, images, textboxes, comments, charts and chart elements. This class stores the drawing shape.
-
-
Constructor Summary
Constructors Constructor Description DrawingObject()
Defines an instance of the drawing shape.
-
Method Summary
Modifier and Type Method Description int
getHeight()
Returns the height of the drawing object.int
getHorizontalOffset()
Returns the horizontal offset of the drawing objectdouble
getRelativeHeight()
Internal use onlydouble
getRelativeHorizontalOffset()
Internal use onlydouble
getRelativeVerticalOffset()
Internal use onlydouble
getRelativeWidth()
Internal use onlyint
getVerticalOffset()
Returns the vertical offset of the drawing objectint
getWidth()
Returns the width of the drawing object.void
setLeftUpperOffset(int horizontalOffset, int verticalOffset)
Sets the left upper corner offsets of the drawing object.void
setRelativeLeftUpperOffset(double horizontalOffset, double verticalOffset)
Internal use onlyvoid
setRelativeSize(double width, double height)
Internal use onlyvoid
setSize(int width, int height)
Sets the drawing object size.
-
-
-
Method Detail
-
setLeftUpperOffset
public void setLeftUpperOffset(int horizontalOffset, int verticalOffset)
Sets the left upper corner offsets of the drawing object.- Parameters:
horizontalOffset
- represents the distance from the left border of the cell to the left border of the object if the object is added to an ExcelWorksheet; if it is added to an ExcelChartSheet object, it will be the distance from the left margin of the chart to the left border of the objectverticalOffset
- represents the distance from the top border of the cell to the top border of the object if the object is added to an ExcelWorksheet; if it is added to an ExcelChartSheet object, it will be the distance from the left margin of the chart to the top border of the object- See Also:
setSize(int, int)
-
setRelativeLeftUpperOffset
public void setRelativeLeftUpperOffset(double horizontalOffset, double verticalOffset)
Internal use only
-
getHorizontalOffset
public int getHorizontalOffset()
Returns the horizontal offset of the drawing object- Returns:
- the distance - in pixels - from the left border of the cell to the left border of the object if the object is added to an ExcelWorksheet; if it is added to an ExcelChartSheet object, it returns the distance from the left margin of the chart to the left border of the object
- See Also:
setLeftUpperOffset(int, int)
,setSize(int, int)
,getVerticalOffset()
-
getRelativeHorizontalOffset
public double getRelativeHorizontalOffset()
Internal use only
-
getVerticalOffset
public int getVerticalOffset()
Returns the vertical offset of the drawing object- Returns:
- the distance - in pixels - from the top border of the cell to the top border of the object if the object is added to an ExcelWorksheet; if it is added to an ExcelChartSheet object, it returns the distance from the left margin of the chart to the top border of the object
- See Also:
setLeftUpperOffset(int, int)
,setSize(int, int)
,getHorizontalOffset()
-
getRelativeVerticalOffset
public double getRelativeVerticalOffset()
Internal use only
-
setSize
public void setSize(int width, int height)
Sets the drawing object size.- Parameters:
width
- the object widthheight
- the object height- See Also:
setLeftUpperOffset(int, int)
-
setRelativeSize
public void setRelativeSize(double width, double height)
Internal use only
-
getHeight
public int getHeight()
Returns the height of the drawing object.- Returns:
- the height of the drawing object.
- See Also:
setSize(int, int)
,setLeftUpperOffset(int, int)
,getWidth()
-
getRelativeHeight
public double getRelativeHeight()
Internal use only
-
getWidth
public int getWidth()
Returns the width of the drawing object.- Returns:
- the width of the drawing object.
- See Also:
setSize(int, int)
,setLeftUpperOffset(int, int)
,getHeight()
-
getRelativeWidth
public double getRelativeWidth()
Internal use only
-
-