com.extentech.ExtenXLS
Class RowHandle

java.lang.Object
  extended by com.extentech.ExtenXLS.RowHandle

public class RowHandle
extends Object

The RowHandle provides access to a Worksheet Row and its Cells.
Use the RowHandle to work with individual Rows in an XLS file.
With a RowHandle you can:

get a handle to the Cells in a row
set the default formatting for a Row

Since:
1.3
Version:
4.1
Author:
John McMahon -- Copyright ©2011Extentech Inc.
See Also:
WorkBookHandle, WorkSheetHandle, FormulaHandle

Field Summary
 com.extentech.formats.XLS.Row myRow
           
 
Method Summary
 boolean containsVerticalMergeRange()
          Determines if the row passes through a vertical merge range
 CellHandle[] getCells()
          Returns the array of Cells in this Row
 CellHandle[] getCells(boolean cached)
          Returns the array of Cells in this Row
 int[] getColDimensions()
          return the min/max columns defined for this row
 FormatHandle getFormatHandle()
          Gets the FormatHandle for this Row.
 int getFormatId()
          gets the current default row format id.
 int getHeight()
          Return the row height of an existing row.
static int getHeight(com.extentech.formats.XLS.Boundsheet sheet, int row)
          Return the row height of an existing row.
 int getHeightInChars()
          returns the row height in Excel units
 String getJSON()
          Get the JSON object for this row.
 int getOutlineLevel()
          Returns the Outline level (depth) of the row
 int getRowNumber()
          Returns the row number of this RowHandle
 boolean isCollapsed()
          Returns whether the row is collapsed
 boolean isHidden()
          Returns whether the row is hidden
 void setBackgroundColor(Color colr)
           
 void setCollapsed(boolean b)
          Set whether the row is collapsed.
 void setFormatId(int i)
          sets the default format id for the Row's Cells
 void setHeight(int newHeight)
          Sets the row height in twips (1/20th of a point)
 void setHeightInChars(int newHeight)
          sets the row height in Excel units.
 void setHidden(boolean b)
          Set whether the row is hidden
 void setOutlineLevel(int x)
          Set the Outline level (depth) of the row
 String toString()
          Returns the String representation of this Row
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myRow

public com.extentech.formats.XLS.Row myRow
Method Detail

getHeight

public int getHeight()
Return the row height of an existing row. These values are returned in twips, 1/20th of a character.

Returns:
int Height of Row in twips

getHeightInChars

public int getHeightInChars()
returns the row height in Excel units

Returns:
int row height in Excel units

getHeight

public static int getHeight(com.extentech.formats.XLS.Boundsheet sheet,
                            int row)
Return the row height of an existing row. These values are returned in twips, 1/20th of a character.

Parameters:
sheet -
row -
Returns:

setHeightInChars

public void setHeightInChars(int newHeight)
sets the row height in Excel units.

Parameters:
double - i - row height value in Excel units

setHeight

public void setHeight(int newHeight)
Sets the row height in twips (1/20th of a point)

Parameters:
newHeight -

containsVerticalMergeRange

public boolean containsVerticalMergeRange()
Determines if the row passes through a vertical merge range

Returns:

setFormatId

public void setFormatId(int i)
sets the default format id for the Row's Cells

Parameters:
int - Format Id for all Cells in Row

getFormatHandle

public FormatHandle getFormatHandle()
Gets the FormatHandle for this Row.

Returns:
FormatHandle - a Format object to apply to this Row

getFormatId

public int getFormatId()
gets the current default row format id. May be overwritten by contained cells

Returns:
format id of row

getCells

public CellHandle[] getCells(boolean cached)
Returns the array of Cells in this Row

Parameters:
cache - cellhandles flag
Returns:
Cell[] all Cells in this Row

getCells

public CellHandle[] getCells()
Returns the array of Cells in this Row

Returns:
Cell[] all Cells in this Row

getJSON

public String getJSON()
Get the JSON object for this row.

Returns:

toString

public String toString()
Returns the String representation of this Row

Overrides:
toString in class Object

getRowNumber

public int getRowNumber()
Returns the row number of this RowHandle


setCollapsed

public void setCollapsed(boolean b)
Set whether the row is collapsed. Will hide the current row, and all contiguous rows with the same outline level.

Parameters:
x -

setHidden

public void setHidden(boolean b)
Set whether the row is hidden

Parameters:
b -

setOutlineLevel

public void setOutlineLevel(int x)
Set the Outline level (depth) of the row

Parameters:
x -

getOutlineLevel

public int getOutlineLevel()
Returns the Outline level (depth) of the row

Returns:

isCollapsed

public boolean isCollapsed()
Returns whether the row is collapsed

Returns:

isHidden

public boolean isHidden()
Returns whether the row is hidden

Returns:

setBackgroundColor

public void setBackgroundColor(Color colr)

getColDimensions

public int[] getColDimensions()
return the min/max columns defined for this row

Returns:


Copyright © 2011 Extentech Inc. All Rights Reserved.