com.jxcell
Class CommentShape

java.lang.Object
  extended by com.jxcell.CommentShape

public class CommentShape
extends java.lang.Object

This class represents a comment object.


Method Summary
 java.lang.String getAuthor()
          Comment's author.
 short getCol()
          Column of the commented cell.
 ShapePos getPosition()
          get the shape position
 short getRow()
          Row of the commented cell.
 java.lang.String getText()
          Comment text.
 void setAuthor(java.lang.String author)
          set author of the comment
 void setCol(short col)
          set column of the commented cell.
 void seText(java.lang.String text)
          set the text content of the comment
 void setFill(java.awt.Color color)
          Sets the fill background's color for this shape.
 void setPosition(double x1, double y1, double x2, double y2)
          set the shape position
 void setRow(short row)
          set row of the commented cell
 void setTextSelection(CellFormat cellFormat, int start, int end)
          Sets text selection formatting
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRow

public short getRow()
Row of the commented cell.

Returns:
row num

setRow

public void setRow(short row)
set row of the commented cell

Parameters:
row - row index

getCol

public short getCol()
Column of the commented cell.

Returns:
column

setCol

public void setCol(short col)
set column of the commented cell.

Parameters:
col - col index

getAuthor

public java.lang.String getAuthor()
Comment's author.

Returns:
Comment's author.

setAuthor

public void setAuthor(java.lang.String author)
set author of the comment

Parameters:
author - comment author

getText

public java.lang.String getText()
Comment text.

Returns:
Comment text.

seText

public void seText(java.lang.String text)
set the text content of the comment

Parameters:
text - comment content.

setTextSelection

public void setTextSelection(CellFormat cellFormat,
                             int start,
                             int end)
                      throws java.lang.Exception
Sets text selection formatting

Parameters:
cellFormat - cellformat object contain the font information
start - starting positon of selection.
end - ending positon of selection.
Throws:
java.lang.Exception - if the positions are invalid

setPosition

public void setPosition(double x1,
                        double y1,
                        double x2,
                        double y2)
                 throws java.lang.Exception
set the shape position

Parameters:
x1 - left position
y1 - top position
x2 - right position
y2 - bottom position
Throws:
java.lang.Exception - exception

getPosition

public ShapePos getPosition()
get the shape position

Returns:
shape position

setFill

public void setFill(java.awt.Color color)
Sets the fill background's color for this shape.