com.jrefinery.workbook
Class RowAttributes

java.lang.Object
  |
  +--com.jrefinery.workbook.RowAttributes
All Implemented Interfaces:
java.lang.Comparable

public class RowAttributes
extends java.lang.Object
implements java.lang.Comparable

Stores the attributes for a range of rows (or sometimes just one row).


Field Summary
protected  int endRow
          The ending row number (startRow to Worksheet.MAX_ROWS-1).
protected  boolean hardSize
          Not sure what this is (Gnumeric uses it for something).
protected  double height
          The row height.
protected  boolean hidden
          Flag that indicates whether this row is hidden.
protected  int marginA
          The left margin.
protected  int marginB
          The right margin.
protected  int startRow
          The starting row number (0 to Worksheet.MAX_ROWS-1).
 
Constructor Summary
RowAttributes(int startRow, int endRow)
          Standard constructor: uses default values.
RowAttributes(int startRow, int endRow, double width)
          Standard constructor.
 
Method Summary
 int compareTo(java.lang.Object other)
          Implements the Comparable interface.
 int getEndRow()
          Returns the end row.
 double getHeight()
          Returns the row height.
 RowAttributes getSplitFromRow(int split)
          Returns a new RowAttributes object, based on this one but only from the specified row.
 RowAttributes getSplitToRow(int split)
          Returns a new RowAttributes object, based on this one but only up to the specified row.
 int getStartRow()
          Returns the start row.
 RowAttributes getSubset(int r1, int r2)
          Returns a new RowAttributes object, based on this one but only for the specified range of rows.
 void setHeight(double height)
          Sets the row height.
 void writeRowInfo(java.io.PrintStream out, java.lang.String indent)
          Writes the rows element to the specified stream in the Gnumeric format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startRow

protected int startRow
The starting row number (0 to Worksheet.MAX_ROWS-1).

endRow

protected int endRow
The ending row number (startRow to Worksheet.MAX_ROWS-1).

height

protected double height
The row height.

marginA

protected int marginA
The left margin.

marginB

protected int marginB
The right margin.

hardSize

protected boolean hardSize
Not sure what this is (Gnumeric uses it for something).

hidden

protected boolean hidden
Flag that indicates whether this row is hidden.
Constructor Detail

RowAttributes

public RowAttributes(int startRow,
                     int endRow)
Standard constructor: uses default values.
Parameters:
startRow - The start row.
endRow - The end row.

RowAttributes

public RowAttributes(int startRow,
                     int endRow,
                     double width)
Standard constructor.
Parameters:
startRow - The start row.
endRow - The end row.
height - The row height.
Method Detail

getStartRow

public int getStartRow()
Returns the start row.
Returns:
The start row.

getEndRow

public int getEndRow()
Returns the end row.
Returns:
The end row.

getHeight

public double getHeight()
Returns the row height.
Returns:
The row height.

setHeight

public void setHeight(double height)
Sets the row height.
Parameters:
height - The new row height.

getSplitToRow

public RowAttributes getSplitToRow(int split)
Returns a new RowAttributes object, based on this one but only up to the specified row.
Parameters:
split - The row.

getSplitFromRow

public RowAttributes getSplitFromRow(int split)
Returns a new RowAttributes object, based on this one but only from the specified row.
Parameters:
split - The row.

getSubset

public RowAttributes getSubset(int r1,
                               int r2)
Returns a new RowAttributes object, based on this one but only for the specified range of rows.
Parameters:
r1 - The start row.
r2 - The end row.

compareTo

public int compareTo(java.lang.Object other)
Implements the Comparable interface.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
other - The object to compare against.

writeRowInfo

public void writeRowInfo(java.io.PrintStream out,
                         java.lang.String indent)
Writes the rows element to the specified stream in the Gnumeric format.
Parameters:
out - The output stream.
indent - The indentation.