ActiveXLS v6.4.0 API Documentation

ActiveXLS
Class ExcelComment

System.Object
  extended byActiveXLS.ExcelComment

public class ExcelComment
extends System.Object

This class stores the comment information extends text, font name, font size, font style, foreground and comment position.


Constructor Summary
ExcelComment()
          Defines an instance of the Excel comment.
ExcelComment(System.String text)
          Defines an instance of the Excel comment having the specified text.
ExcelComment(System.String text, int width, int height)
          Defines an instance of the Excel comment having the specified text and size.
ExcelComment(System.String text, System.String fontName, int fontSize, bool isBold, bool isItalic, System.Drawing.Color foreground)
          Defines an instance of the Excel comment having the specified text and font settings.
 
Method Summary
 ExcelComment Clone()
          Creates and returns a copy of this object.
 System.String getFont()
          Returns the font name of the comment text.
 int getFontSize()
          Returns the font size of the comment text.
 System.Drawing.Color getForeground()
          Returns the foreground of the comment text.
 int getHeight()
          Returns the comment height.
 int getHorizontalOffset()
          Returns the comment horizontal offset (the distance - in pixels - between the left border of the left upper corner cell to the left border of the comment).
 int getLeftUpperCornerColumn()
          Returns the column number where the left upper corner of the comment is anchored
 int getLeftUpperCornerRow()
          Returns the row number where the left upper corner of the comment is anchored
 System.String getText()
          Returns the text of the comment.
 int getUnderlineStyle()
          Returns the underline style of the comment text.
 int getVerticalOffset()
          Returns the comment vertical offset (the distance - in pixels - between the top border of the left upper corner cell to the top border of the comment).
 int getWidth()
          Returns the comment width.
 bool IsBold()
          Returns the bold setting of the comment text.
 bool IsItalic()
          Returns the italic setting of the comment text.
 void setBold(bool isBold)
          Sets the bold option of the comment text.
 void setFont(System.String fontName)
          Sets the font name of the comment text.
 void setFontSize(int fontSize)
          Sets the font size of the comment text.
 void setForeground(System.Drawing.Color color)
          Sets the foreground of the comment text.
 void setItalic(bool isItalic)
          Sets the italic option of the comment text.
 void setLeftUpperCorner(int row, int column)
          Sets the left upper corner of the comment.
 void setLeftUpperCorner(System.String cellReference)
          Sets the left upper corner of the comment.
 void setLeftUpperOffset(int horizontalOffset, int verticalOffset)
          Sets the left upper corner offsets of the comment.
 void setSize(int commentWidth, int commentHeight)
          Sets the comment size.
 void setText(System.String text)
          Sets the text of the comment.
 void setUnderlineStyle(int underlineStyle)
          Sets the underline style of the comment text.
 

Constructor Detail

ExcelComment

public ExcelComment()
Defines an instance of the Excel comment.


ExcelComment

public ExcelComment(System.String text)
Defines an instance of the Excel comment having the specified text.

Parameters:
text - the text of the comment

ExcelComment

public ExcelComment(System.String text,
                    int width,
                    int height)
Defines an instance of the Excel comment having the specified text and size.

Parameters:
text - the text of the comment
width - the comment width
height - the comment height

ExcelComment

public ExcelComment(System.String text,
                    System.String fontName,
                    int fontSize,
                    bool isBold,
                    bool isItalic,
                    System.Drawing.Color foreground)
Defines an instance of the Excel comment having the specified text and font settings.

Parameters:
text - the text of the comment
fontName - the font name of the comment text
fontSize - the font size of the comment text
isBold - the bold option of the comment text
isItalic - the italic option of the comment text
foreground - the foreground of the comment text
Method Detail

getText

public System.String getText()
Returns the text of the comment.

Returns:
the text of the comment
See Also:
setText(System.String)

setText

public void setText(System.String text)
Sets the text of the comment.

Parameters:
text - the text of the comment
See Also:
getText()

setLeftUpperCorner

public void setLeftUpperCorner(int row,
                               int column)
Sets the left upper corner of the comment.

Parameters:
row - the row number where the left upper corner of the comment is anchored
column - the column number where the left upper corner of the comment is anchored
See Also:
setLeftUpperCorner(String), setLeftUpperCorner(int,int), setLeftUpperOffset(int, int), setSize(int, int), getLeftUpperCornerRow(), getLeftUpperCornerColumn()

setLeftUpperCorner

public void setLeftUpperCorner(System.String cellReference)
Sets the left upper corner of the comment.

Parameters:
cellReference - the cell reference where the left upper corner of the comment is anchored
See Also:
setLeftUpperCorner(String), setLeftUpperCorner(int,int), setLeftUpperOffset(int, int), setSize(int, int), getLeftUpperCornerRow(), getLeftUpperCornerColumn()

getLeftUpperCornerRow

public int getLeftUpperCornerRow()
Returns the row number where the left upper corner of the comment is anchored

Returns:
the row number where the left upper corner of the comment is anchored
See Also:
setLeftUpperOffset(int, int), setSize(int, int), getLeftUpperCornerColumn()

getLeftUpperCornerColumn

public int getLeftUpperCornerColumn()
Returns the column number where the left upper corner of the comment is anchored

Returns:
the column number where the left upper corner of the comment is anchored
See Also:
setLeftUpperOffset(int, int), setSize(int, int), getLeftUpperCornerRow()

setLeftUpperOffset

public void setLeftUpperOffset(int horizontalOffset,
                               int verticalOffset)
Sets the left upper corner offsets of the comment.

Parameters:
horizontalOffset - the distance from the left border of the cell to the left border of the comment
verticalOffset - the distance from the top border of the cell to the top border of the comment
See Also:
setLeftUpperCorner(String), setLeftUpperCorner(int,int), setSize(int, int)

setSize

public void setSize(int commentWidth,
                    int commentHeight)
Sets the comment size.

Parameters:
commentWidth - the comment width
commentHeight - the comment height
See Also:
setLeftUpperCorner(String), setLeftUpperCorner(int,int), setLeftUpperOffset(int, int)

getHeight

public int getHeight()
Returns the comment height.

Returns:
the comment height.
See Also:
setSize(int, int), setLeftUpperCorner(String), setLeftUpperCorner(int,int), getWidth()

getWidth

public int getWidth()
Returns the comment width.

Returns:
the comment width.
See Also:
setSize(int, int), setLeftUpperCorner(String), setLeftUpperCorner(int,int), getHeight()

getHorizontalOffset

public int getHorizontalOffset()
Returns the comment horizontal offset (the distance - in pixels - between the left border of the left upper corner cell to the left border of the comment).

Returns:
the distance - in pixels - between the left border of the left upper corner cell to the left border of the comment.
See Also:
setLeftUpperOffset(int, int), setSize(int, int), getVerticalOffset()

getVerticalOffset

public int getVerticalOffset()
Returns the comment vertical offset (the distance - in pixels - between the top border of the left upper corner cell to the top border of the comment).

Returns:
the distance - in pixels - between the top border of the left upper corner cell to the top border of the comment
See Also:
setLeftUpperOffset(int, int), setSize(int, int), getHorizontalOffset()

getFont

public System.String getFont()
Returns the font name of the comment text.

Returns:
the font name of the comment text
See Also:
setFont(System.String)

setFont

public void setFont(System.String fontName)
Sets the font name of the comment text.

Parameters:
fontName - the font name of the comment text
See Also:
getFont()

getFontSize

public int getFontSize()
Returns the font size of the comment text.

Returns:
the font size of the comment text
See Also:
setFontSize(int)

setFontSize

public void setFontSize(int fontSize)
Sets the font size of the comment text.

Parameters:
fontSize - the font size of the comment text
See Also:
getFontSize()

getForeground

public System.Drawing.Color getForeground()
Returns the foreground of the comment text.

Returns:
the foreground of the comment text
See Also:
setForeground(System.Drawing.Color)

setForeground

public void setForeground(System.Drawing.Color color)
Sets the foreground of the comment text.

Parameters:
color - the foreground of the comment text
See Also:
getForeground()

IsBold

public bool IsBold()
Returns the bold setting of the comment text.

Returns:
the bold setting of the comment text
See Also:
setBold(bool)

setBold

public void setBold(bool isBold)
Sets the bold option of the comment text.

Parameters:
isBold - the bold option of the comment text
See Also:
IsBold()

IsItalic

public bool IsItalic()
Returns the italic setting of the comment text.

Returns:
the italic setting of the comment text
See Also:
setItalic(bool)

setItalic

public void setItalic(bool isItalic)
Sets the italic option of the comment text.

Parameters:
isItalic - the italic option of the comment text
See Also:
IsItalic()

getUnderlineStyle

public int getUnderlineStyle()
Returns the underline style of the comment text. Possible values are available in FontSettings class.

Returns:
the underline style of the comment text
See Also:
setUnderlineStyle(int)

setUnderlineStyle

public void setUnderlineStyle(int underlineStyle)
Sets the underline style of the comment text. Possible values are available in FontSettings class.

Parameters:
underlineStyle - underline style of the comment text
See Also:
getUnderlineStyle()

Clone

public ExcelComment Clone()
Creates and returns a copy of this object.

Returns:
a clone of this instance.

Copyright 2009 On Time Computing Solutions