Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.cells
Class Comment

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

public class Comment
extends java.lang.Object

Encapsulates the object that represents a cell comment.


Method Summary
 void addHyperlink(java.lang.String address)
          Adds a hyperlink to the mso drawing object.
 int getColumn()
          Gets the column index of the comment.
 ShapeFill getFill()
          Gets a object that contains fill formatting properties for the specified shape.
 Font getFont()
          Gets the font of comment.
 int getHeight()
          Gets the height, in unit of pixel.
 double getHeightCM()
          Gets the height, in unit of centimeters.
 float getHeightInch()
          Gets the height, in unit of inches.
 int getHeightInChart()
          Gets the height, in units of 1/4000 of the chart area.
 Hyperlink getHyperlink()
          Gets a hyperlink from the mso drawing object.
 int getLeft()
          Gets the horizontal offset of textbox from its left column, in unit of pixel.
 double getLeftCM()
          Gets the horizontal offset of textbox from its left column, in unit of centimeters.
 float getLeftInch()
          Gets the horizontal offset of textbox from its left column, in unit of inches.
 int getLeftInChart()
          Gets the horizontal offset of textbox from its left column, in units of 1/4000 of the chart area.
 ShapeLine getLine()
          Gets a object that contains line formatting properties for the shape.
 java.lang.String getNote()
          Gets the content of comment.
 int getPlacement()
          Gets the way the drawing obejct is attached to the cells below it.
 int getRow()
          Gets the row index of the comment.
 int getTop()
          Gets the vertical offset of textbox from its top row, in unit of pixel.
 double getTopCM()
          Gets the vertical offset of textbox from its top row, in unit of centimeters.
 float getTopInch()
          Gets the vertical offset of textbox from its top row, in unit of inches.
 int getTopInChart()
          Gets the vertical offset of textbox from its top row, in units of 1/4000 of the chart area.
 int getUpperLeftColumn()
          Gets the upper left column index.
 int getUpperLeftRow()
          Gets the upper left row index.
 int getWidth()
          Gets the widthx, in unit of pixel.
 double getWidthCM()
          Gets the width, in unit of centimeters.
 float getWidthInch()
          Gets the width, in unit of inches.
 int getWidthInChart()
          Gets the widthx, in units of 1/4000 of the chart area.
 boolean hasLine()
          Indicates whether shape has border line.
 boolean isFilled()
          Indicates whether shape is filled.
 boolean isVisible()
          Indicates whether the comment is visible or not.
 void setColumn(int column)
          Sets the column index of the comment.
 void setFilled(boolean isFilled)
          Sets whether shape is filled.
 void setFont(Font font)
          Sets the font of comment.
 void setHasLine(boolean hasLine)
          Sets whether shape has border line.
 void setHeight(int height)
          Sets the height, in unit of pixel.
 void setHeightCM(double height)
          Sets the height, in unit of centimeters.
 void setHeightInch(double height)
          Sets the height, in unit of inches.
 void setHeightInChart(int height)
          Sets the height, in units of 1/4000 of the chart area.
 void setLeft(int left)
          Sets the horizontal offset of textbox from its left column, in unit of pixel.
 void setLeftCM(double left)
          Sets the horizontal offset of textbox from its left column, in unit of centimeters.
 void setLeftInch(double left)
          Sets the horizontal offset of textbox from its left column, in unit of inches.
 void setLeftInChart(int left)
          Sets the horizontal offset of textbox from its left column, in units of 1/4000 of the chart area.
 void setNote(java.lang.String note)
          Sets the content of comment.
 void setPlacement(byte placementType)
          Sets the way the drawing obejct is attached to the cells below it.
 void setRow(int row)
          Sets the row index of the comment.
 void setTop(int top)
          Sets the vertical offset of textbox from its top row, in unit of pixel.
 void setTopCM(double top)
          Sets the vertical offset of textbox from its top row, in unit of centimeters.
 void setTopInch(double top)
          Sets the vertical offset of textbox from its top row, in unit of inches.
 void setTopInChart(int top)
          Sets the vertical offset of textbox from its top row, in units of 1/4000 of the chart area.
 void setUpperLeftColumn(int column)
          Sets the upper left column index.
 void setUpperLeftRow(int row)
          Sets the upper left row index.
 void setVisible(boolean isVisible)
          Sets whether the comment is visible or not.
 void setWidth(int width)
          Sets the width, in unit of pixel.
 void setWidthCM(double width)
          Sets the width, in unit of centimeters.
 void setWidthInch(double width)
          Sets the width, in unit of inches.
 void setWidthInChart(int width)
          Sets the width, 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

getColumn

public int getColumn()
Gets the column index of the comment.

Returns:
the column index of the comment.

setColumn

public void setColumn(int column)
Sets the column index of the comment.

Parameters:
column - the column index of the comment.
Throws:
CellsException - if Comments has been removed.

getFont

public Font getFont()
Gets the font of comment.

Returns:
the font of comment.
Throws:
CellsException - if Comments has been removed.

setFont

public void setFont(Font font)
Sets the font of comment.

Parameters:
font - the font of comment.
Throws:
CellsException - if Comments has been removed.

isVisible

public boolean isVisible()
Indicates whether the comment is visible or not.

Returns:
whether the comment is visible or not.

setVisible

public void setVisible(boolean isVisible)
Sets whether the comment is visible or not.

Parameters:
isVisible - whether the comment is visible or not.
Throws:
CellsException - if Comments has been removed.

getNote

public java.lang.String getNote()
Gets the content of comment.

Returns:
the content of comment.

setNote

public void setNote(java.lang.String note)
Sets the content of comment.

Parameters:
note - the content of comment.
Throws:
CellsException - if Comments has been removed.

getRow

public int getRow()
Gets the row index of the comment.

Returns:
the row index of the comment.

setRow

public void setRow(int row)
Sets the row index of the comment.

Parameters:
row - the row index of the comment.
Throws:
CellsException - if Comments has been removed.

getFill

public ShapeFill getFill()
Gets a object that contains fill formatting properties for the specified shape.

Returns:
ShapeFill Object.

getLine

public ShapeLine getLine()
Gets a object that contains line formatting properties for the shape.

Returns:
ShapeLine Obejct.

isFilled

public boolean isFilled()
Indicates whether shape is filled.

Returns:
whether shape is filled.

setFilled

public void setFilled(boolean isFilled)
Sets whether shape is filled.

Parameters:
isFilled - whether shape is filled.

getHyperlink

public Hyperlink getHyperlink()
Gets a hyperlink from the mso drawing object.

Returns:
a hyperlink. Return null if the hyperlink has not bean set.

addHyperlink

public void addHyperlink(java.lang.String address)
Adds a hyperlink to the mso drawing object.

Parameters:
address - address of this hyperlink.This parameter can't be empty.

hasLine

public boolean hasLine()
Indicates whether shape has border line.

Returns:
whether shape has border line.

setHasLine

public void setHasLine(boolean hasLine)
Sets whether shape has border line.

Parameters:
hasLine - whether shape has border line.

getUpperLeftColumn

public int getUpperLeftColumn()
Gets the upper left column index.

Returns:
the upper leftcolumn index.

setUpperLeftColumn

public void setUpperLeftColumn(int column)
Sets the upper left column index.

Parameters:
column - the upper left column index .

getUpperLeftRow

public int getUpperLeftRow()
Gets the upper left row index.

Returns:
the upper left row index.

setUpperLeftRow

public void setUpperLeftRow(int row)
Sets the upper left row index.

Parameters:
row - the upper left row index.

getHeight

public int getHeight()
Gets the height, in unit of pixel.

Returns:
the height, in unit of pixel.

setHeight

public void setHeight(int height)
Sets the height, in unit of pixel.

Parameters:
height - the height, in unit of pixel.

getHeightInChart

public int getHeightInChart()
Gets the height, in units of 1/4000 of the chart area.

Returns:
the height, in units of 1/4000 of the chart area.

setHeightInChart

public void setHeightInChart(int height)
Sets the height, in units of 1/4000 of the chart area. This method only effects when the drawing object is in the chart.

Parameters:
height - the height, in units of 1/4000 of the chart area.
Throws:
java.lang.IllegalArgumentException - if height > 4000;

getHeightInch

public float getHeightInch()
Gets the height, in unit of inches.

Returns:
the height, in unit of inches.

setHeightInch

public void setHeightInch(double height)
Sets the height, in unit of inches.

Parameters:
height - the heigh, in unit of inches.

getHeightCM

public double getHeightCM()
Gets the height, in unit of centimeters.

Returns:
the height, in unit of centimeters.

setHeightCM

public void setHeightCM(double height)
Sets the height, in unit of centimeters.

Parameters:
height - the height, in unit of centimeters.

getWidth

public int getWidth()
Gets the widthx, in unit of pixel.

Returns:
the width, in unit of pixel.

setWidth

public void setWidth(int width)
Sets the width, in unit of pixel.

Parameters:
width - the width, in unit of pixel.

getWidthInChart

public int getWidthInChart()
Gets the widthx, in units of 1/4000 of the chart area.

Returns:
the width, in units of 1/4000 of the chart area.

setWidthInChart

public void setWidthInChart(int width)
Sets the width, in units of 1/4000 of the chart area. This method only effects when the drawing object is in the chart.

Parameters:
width - the width, in units of 1/4000 of the chart area.
Throws:
java.lang.IllegalArgumentException - if width > 4000;

getWidthInch

public float getWidthInch()
Gets the width, in unit of inches.

Returns:
the width, in unit of inches.

setWidthInch

public void setWidthInch(double width)
Sets the width, in unit of inches.

Parameters:
width - the width, in unit of inches.

getWidthCM

public double getWidthCM()
Gets the width, in unit of centimeters.

Returns:
the width, in unit of centimeters.

setWidthCM

public void setWidthCM(double width)
Sets the width, in unit of centimeters.

Parameters:
width - the width, in unit of centimeters.

getLeft

public int getLeft()
Gets the horizontal offset of textbox from its left column, in unit of pixel.

Returns:
the horizontal offset of textbox from its left column, in unit of pixel.

setLeft

public void setLeft(int left)
Sets the horizontal offset of textbox from its left column, in unit of pixel.

Parameters:
left - the horizontal offset of textbox from its left column, in unit of pixel.

getLeftInChart

public int getLeftInChart()
Gets the horizontal offset of textbox from its left column, in units of 1/4000 of the chart area.

Returns:
the horizontal offset of textbox from its left column, in units of 1/4000 of the chart area.

setLeftInChart

public void setLeftInChart(int left)
Sets the horizontal offset of textbox from its left column, in units of 1/4000 of the chart area. This method only effects when the drawing object is in the chart.

Parameters:
left - the horizontal offset of textbox from its left column, in units of 1/4000 of the chart area.
Throws:
java.lang.IllegalArgumentException - if left > 4000;

getLeftInch

public float getLeftInch()
Gets the horizontal offset of textbox from its left column, in unit of inches.

Returns:
the horizontal offset of textbox from its left column, in unit of inches.

setLeftInch

public void setLeftInch(double left)
Sets the horizontal offset of textbox from its left column, in unit of inches.

Parameters:
left - the horizontal offset of textbox from its left column, in unit of inches.

getLeftCM

public double getLeftCM()
Gets the horizontal offset of textbox from its left column, in unit of centimeters.

Returns:
the horizontal offset of textbox from its left column, in unit of centimeters.

setLeftCM

public void setLeftCM(double left)
Sets the horizontal offset of textbox from its left column, in unit of centimeters.

Parameters:
left - the horizontal offset of textbox from its left column, in unit of centimeters.

getTop

public int getTop()
Gets the vertical offset of textbox from its top row, in unit of pixel.

Returns:
the vertical offset of textbox from its top row, in unit of pixel.

setTop

public void setTop(int top)
Sets the vertical offset of textbox from its top row, in unit of pixel.

Parameters:
top - the vertical offset of textbox from its top row, in unit of pixel.

getTopInChart

public int getTopInChart()
Gets the vertical offset of textbox from its top row, in units of 1/4000 of the chart area.

Returns:
the vertical offset of textbox from its top row, in units of 1/4000 of the chart area.

setTopInChart

public void setTopInChart(int top)
Sets the vertical offset of textbox from its top row, in units of 1/4000 of the chart area. This method only effects when the drawing object is in the chart.

Parameters:
top - the vertical offset of textbox from its top row, in units of 1/4000 of the chart area.
Throws:
java.lang.IllegalArgumentException - if top > 4000;

getTopInch

public float getTopInch()
Gets the vertical offset of textbox from its top row, in unit of inches.

Returns:
the vertical offset of textbox from its top row, in unit of inches.

setTopInch

public void setTopInch(double top)
Sets the vertical offset of textbox from its top row, in unit of inches.

Parameters:
top - the vertical offset of textbox from its top row, in unit of inches.

getTopCM

public double getTopCM()
Gets the vertical offset of textbox from its top row, in unit of centimeters.

Returns:
the vertical offset of textbox from its top row, in unit of centimeters.

setTopCM

public void setTopCM(double top)
Sets the vertical offset of textbox from its top row, in unit of centimeters.

Parameters:
top - the vertical offset of textbox from its top row, in unit of centimeters.

getPlacement

public int getPlacement()
Gets the way the drawing obejct is attached to the cells below it.

Returns:
the way the drawing obejct is attached to the cells below it.
See Also:
setPlacement(byte)

setPlacement

public void setPlacement(byte placementType)
Sets the way the drawing obejct is attached to the cells below it.

Parameters:
placementType - the way the drawing obejct is attached to the cells below it. It could be one of the following values:
PlacementType.FREE_FLOATING
PlacementType.MOVE
PlacementType.MOVE_AND_SIZE
Throws:
java.lang.IllegalArgumentException - if placementType is not member of PlacementType