Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class Column

java.lang.Object
  extended by com.aspose.cells.Column

public class Column
extends java.lang.Object

Represents a single column in a worksheet.


Method Summary
 void applyStyle(Style style, StyleFlag flag)
          Applies formattings for a whole column.
 int compareTo(Column colTo)
          Compares this Column with another one for order.
 int compareTo(int indexTo)
          Compares this Column with another one that has given column index for order.
 int getIndex()
          Gets the index of this column.
 int getKey()
          Gets the comparable key of this Column.
 Style getRefStyle()
          Gets the style setting for the column.
 Style getStyle()
          Gets the style setting for the column.
 boolean isUsingDefaultWidth()
          Indicates whether column has default column width.
 void setKey(int key)
          Sets the comparable key of this Column.
 void setStyle(Style style)
          Sets a style to the column.
 void setUseDefaultWidth(boolean isUsingDefaultWidth)
          Sets whether column has default column width.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStyle

public Style getStyle()
Gets the style setting for the column.

Returns:
style of the column.
Throws:
CellsException - if the worksheet has been removed from the workbook.

setStyle

public void setStyle(Style style)
Sets a style to the column.

Parameters:
style - style to set.
Throws:
CellsException - if the worksheet has been removed from the workbook.

applyStyle

public void applyStyle(Style style,
                       StyleFlag flag)
Applies formattings for a whole column. Only modifies the styles of the column and cells in the column.

Parameters:
style - The style object which will be applied.
flag - Flags which indicates applied formatting properties.

getRefStyle

public Style getRefStyle()
Gets the style setting for the column.

Returns:
style of the column.
Throws:
CellsException - if the worksheet has been removed from the workbook.

getIndex

public final int getIndex()
Gets the index of this column.

Returns:
the index of this column.

isUsingDefaultWidth

public boolean isUsingDefaultWidth()
Indicates whether column has default column width.

Returns:
whether column has default column width.

setUseDefaultWidth

public void setUseDefaultWidth(boolean isUsingDefaultWidth)
Sets whether column has default column width.

Parameters:
isUsingDefaultWidth - column has default column width.

compareTo

public int compareTo(int indexTo)
Compares this Column with another one that has given column index for order.

Parameters:
indexTo - the column index to be compared with the column index of this Column.
Returns:
a negative integer, zero, or a positive integer as the column index of this Column is less than, equal to, or greater than the specified column index.

compareTo

public int compareTo(Column colTo)
Compares this Column with another one for order.

Parameters:
colTo - the Column to be compared with this one.
Returns:
a negative integer, zero, or a positive integer as the column index of this Column is less than, equal to, or greater than the column index of the specified Column object.

getKey

public int getKey()
Gets the comparable key of this Column. Same with getIndex().

Returns:
the comparable key of this Column, that is the column index.

setKey

public void setKey(int key)
Sets the comparable key of this Column. Only for inner usage. Does not make any change for this Column object.

Parameters:
key - key value.