org.jfree.workbook
Class ColumnAttributes

java.lang.Object
  |
  +--org.jfree.workbook.ColumnAttributes
All Implemented Interfaces:
java.lang.Comparable

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

Stores the attributes for a range of columns (or sometimes just one column).


Field Summary
protected  int endColumn
          The ending column number (startColumn to Worksheet.MAX_COLUMNS-1).
protected  boolean hardSize
          Not sure what this is (Gnumeric uses it for something).
protected  boolean hidden
          Flag that indicates whether this column is hidden.
protected  int marginA
          The left margin.
protected  int marginB
          The right margin.
protected  int startColumn
          The starting column number (0 to Worksheet.MAX_COLUMNS-1).
protected  double width
          The column width in pts.
 
Constructor Summary
ColumnAttributes(int start, int end)
          Constructs a new ColumnAttributes object, using default values where necessary.
ColumnAttributes(int start, int end, double width)
          Constructs a new ColumnAttributes object.
 
Method Summary
 int compareTo(java.lang.Object other)
          Implements the Comparable interface.
 int getEndColumn()
          Returns the end column.
 int getMarginA()
          Returns margin A.
 int getMarginB()
          Returns margin B.
 ColumnAttributes getSplitFromColumn(int split)
          Returns a new ColumnAttributes object, based on this one but only from the specified column.
 ColumnAttributes getSplitToColumn(int split)
          Returns a new ColumnAttributes object, based on this one but only up to the specified column.
 int getStartColumn()
          Returns the start column.
 ColumnAttributes getSubset(int c1, int c2)
          Returns a new ColumnAttributes object, based on this one but only for the specified range of columns.
 double getWidth()
          Returns the column width.
 boolean isHardSize()
          Returns a flag indicating ???.
 boolean isHidden()
          Returns a flag indicating whether or not the column is hidden.
 void setWidth(double width)
          Sets the column width.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startColumn

protected int startColumn
The starting column number (0 to Worksheet.MAX_COLUMNS-1).


endColumn

protected int endColumn
The ending column number (startColumn to Worksheet.MAX_COLUMNS-1).


width

protected double width
The column width in pts.


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 column is hidden.

Constructor Detail

ColumnAttributes

public ColumnAttributes(int start,
                        int end)
Constructs a new ColumnAttributes object, using default values where necessary.

Parameters:
start - the start column.
end - the end column.

ColumnAttributes

public ColumnAttributes(int start,
                        int end,
                        double width)
Constructs a new ColumnAttributes object.

Parameters:
start - the start column.
end - the end column.
width - the column width.
Method Detail

getStartColumn

public int getStartColumn()
Returns the start column.

Returns:
The start column.

getEndColumn

public int getEndColumn()
Returns the end column.

Returns:
The end column.

getWidth

public double getWidth()
Returns the column width.

Returns:
The column width.

setWidth

public void setWidth(double width)
Sets the column width.

Parameters:
width - the new column width.

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 column is hidden.

Returns:
A boolean.

getSplitToColumn

public ColumnAttributes getSplitToColumn(int split)
Returns a new ColumnAttributes object, based on this one but only up to the specified column.

Parameters:
split - the column.
Returns:
The column attributes.

getSplitFromColumn

public ColumnAttributes getSplitFromColumn(int split)
Returns a new ColumnAttributes object, based on this one but only from the specified column.

Parameters:
split - the column.
Returns:
The column attributes.

getSubset

public ColumnAttributes getSubset(int c1,
                                  int c2)
Returns a new ColumnAttributes object, based on this one but only for the specified range of columns.

Parameters:
c1 - the start column.
c2 - the end column.
Returns:
The column 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 indicating the relative order of the objects.