org.jfree.workbook
Class RowAttributes

java.lang.Object
  |
  +--org.jfree.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 start, int end)
          Standard constructor: uses default values.
RowAttributes(int start, int end, double height)
          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.
 int getMarginA()
          Returns margin A.
 int getMarginB()
          Returns margin B.
 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.
 boolean includesRow(int row)
          Returns true if this attributes record applies to the specified row.
 boolean isHardSize()
          Returns a flag indicating ???.
 boolean isHidden()
          Returns a flag indicating whether or not the row is hidden.
 void setHeight(double height)
          Sets the row height.
 
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 start,
                     int end)
Standard constructor: uses default values.

Parameters:
start - the start row.
end - the end row.

RowAttributes

public RowAttributes(int start,
                     int end,
                     double height)
Standard constructor.

Parameters:
start - the start row.
end - 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.

getMarginA

public int getMarginA()
Returns margin A.

Returns:
Margin A.

getMarginB

public int getMarginB()
Returns margin B.

Returns:
Margin B.

isHardSize

public boolean isHardSize()
Returns a flag indicating ???.

Returns:
A boolean.

isHidden

public boolean isHidden()
Returns a flag indicating whether or not the row is hidden.

Returns:
A boolean.

includesRow

public boolean includesRow(int row)
Returns true if this attributes record applies to the specified row.

Parameters:
row - the row.
Returns:
A boolean.

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.
Returns:
The row attributes.

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.
Returns:
The row attributes.

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.
Returns:
The row attributes.

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.
Returns:
An integer that indicates the relative order of the objects.