|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jniwrapper.win32.jexcel.BaseWrapper
com.jniwrapper.win32.jexcel.ApplicationAwareWrapper
com.jniwrapper.win32.jexcel.RangePresentation
com.jniwrapper.win32.jexcel.Range
This class represents a range of cells in a Worksheet
.
Nested Class Summary | |
static class |
Range.FindLookIn
This class is an enumeration of information types to be searched. |
static class |
Range.SearchAttributes
This class is used for specification find attributes. |
Field Summary | |
protected com.jniwrapper.win32.excel.Font |
_font
|
protected com.jniwrapper.win32.excel.Interior |
_interior
|
protected static com.jniwrapper.util.Logger |
_log
|
protected com.jniwrapper.win32.excel.Range |
_pureRange
|
protected com.jniwrapper.win32.excel.Range |
_range
|
Constructor Summary | |
Range(Cell cell)
Creates a range that contains a single cell. |
Method Summary | |
java.util.Set |
cells()
Returns the set of range cells. |
void |
clear()
Clears the content of the cell or range. |
void |
delete()
Deletes the object. |
void |
delete(int shift)
Delete range from worksheet. |
void |
delete(com.jniwrapper.win32.excel.XlDeleteShiftDirection direction)
Deletes the object. |
boolean |
equals(java.lang.Object obj)
|
Cell |
find(java.util.Date what,
Range.SearchAttributes attributes)
Returns the first cell that contains the data specified by what argument. |
Cell |
find(double what,
Range.SearchAttributes attributes)
Returns the first cell that contains the data specified by what argument. |
Cell |
find(long what,
Range.SearchAttributes attributes)
Returns the first cell that contains the data specified by what argument. |
Cell |
find(java.lang.String what,
Range.SearchAttributes attributes)
Returns the first cell that contains the data specified by what argument. |
Cell |
findNext()
Returns the cell that contains the next occurrence of the data. |
java.lang.String |
getAddress()
Returns the absolute address of the cell or range. |
Application |
getApplication()
Returns the application object. |
Border |
getBorder(Border.Kind kind)
Returns the border of interest. |
int |
getCellCount()
Returns the number of cells in the range. |
java.util.List |
getCells()
Returns the list of range cells in default CellsOrder.LEFT2RIGHT_TOP2BOTTOM order. |
java.util.List |
getCells(CellsOrder cellsOrder)
Returns the list of cells, sorted in the specified order. |
int |
getColumnCount()
Returns the number of columns in the range. |
java.lang.String |
getColumnName()
Returns the column name of this range. |
double |
getColumnWidth()
Returns the column width. |
Range |
getEntireColumn()
Returns the range that represents an entire column. |
Font |
getFont()
Returns the text font. |
java.lang.String |
getFormula()
Returns formula of this range. |
java.lang.String |
getFormulaArray()
Returns formula array of this range. |
TextAlignment |
getHorizontalAlignment()
Returns the horizontal text alignment kind. |
java.awt.Color |
getInteriorColor()
Returns the interior color. |
InteriorPattern |
getInteriorPattern()
Returns the interior pattern kind. |
java.awt.Color |
getInteriorPatternColor()
Returns the interior pattern color. |
Range |
getIntersection(Range range)
Returns the intersection of the current range and the specified one. |
java.lang.String |
getName()
Returns the name of the range. |
java.lang.String |
getNumberFormat()
Returns the string representation of the number format. |
com.jniwrapper.win32.automation.OleMessageLoop |
getOleMessageLoop()
Returns the message loop thread for processing native peer function calls. |
Worksheet |
getParent()
Returns the parent worksheet. |
com.jniwrapper.win32.excel.Range |
getPeer()
Returns the appropriate native peer. |
int |
getRowCount()
Returns the number of rows in the range. |
double |
getRowHeight()
Returns the row height. |
TextOrientation |
getTextOrientation()
Returns the text orientation kind. |
com.jniwrapper.win32.automation.types.Variant[][] |
getValues()
Bulk operation method. |
TextAlignment |
getVerticalAlignment()
Returns the vertical text alignment kind. |
Range |
include(Range range)
Enlarges the range by adding a new range specified by the range parameter. |
Range |
include(java.lang.String range)
Enlarges the range by adding a new range specified by its string representation. |
boolean |
intersects(Range range)
Returns true if the current range intersects the range specified by the range parameter. |
boolean |
isAutoDelete()
|
boolean |
isLocked()
|
void |
merge()
Merges all cells of the range, at that all data in cells will be lost. |
void |
print(int copies)
Prints the specified number of copies of the range. |
void |
release()
Releases this wrapper object. |
void |
setAutoDelete(boolean value)
|
void |
setAutoFit()
Sets autofit behavior for cells, columns or rows. |
void |
setBorder(Border.Kind kind,
Border border)
Sets up the specified kind of border. |
void |
setColumnWidth(double width)
Sets up the column width. |
void |
setFont(Font font)
Sets up the text font. |
void |
setFormula(java.lang.String formula)
Set formula to this range. |
void |
setFormulaArray(java.lang.String formula)
Set formula array to this range. |
void |
setHorizontalAlignment(TextAlignment textAlignment)
Sets up the horizontal text alignment kind. |
void |
setInteriorColor(java.awt.Color color)
Sets up the interior color. |
void |
setInteriorPattern(InteriorPattern pattern)
Sets up the interior pattern kind. |
void |
setInteriorPatternColor(java.awt.Color color)
Sets up the interior pattern color. |
void |
setLocked(boolean value)
|
void |
setName(java.lang.String rangeName)
Sets up the range name, so that the range become named and could be accessed by the name. |
void |
setNumberFormat(java.lang.String numberFormat)
Sets up the number format. |
protected void |
setOleMessageLoop(com.jniwrapper.win32.automation.OleMessageLoop oleMessageLoop)
|
void |
setRowHeight(double height)
Sets up the row height. |
void |
setTextOrientation(TextOrientation textOrientation)
Sets up the text orientation kind. |
void |
setValue2(com.jniwrapper.win32.automation.types.Variant value)
Sets cell content in the range. |
void |
setVerticalAlignment(TextAlignment textAlignment)
Sets up the vertical text alignment kind. |
void |
setWrapText(boolean value)
Sets wrapText for cells, columns or rows. |
void |
sort(int row,
boolean ascending,
boolean caseSensitive)
Sorts columns of the range in accordance with data of the specified row. |
void |
sort(java.lang.String columnName,
boolean ascending,
boolean caseSensitive)
Sorts rows of the range in accordance with data of the specified column identified by given name. |
java.lang.String |
toString()
|
void |
unmerge()
Un-merges cells of the range. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final com.jniwrapper.util.Logger _log
protected com.jniwrapper.win32.excel.Range _range
protected com.jniwrapper.win32.excel.Range _pureRange
protected com.jniwrapper.win32.excel.Interior _interior
protected com.jniwrapper.win32.excel.Font _font
Constructor Detail |
public Range(Cell cell)
cell
- Cell
Method Detail |
public Range include(Range range)
range
parameter.
range
- is the range to be included.
public Range include(java.lang.String range)
range
- is the string representation of the range to be included.
public int getCellCount()
public int getColumnCount()
public int getRowCount()
public com.jniwrapper.win32.automation.types.Variant[][] getValues()
public boolean intersects(Range range)
range
parameter.
range
- is the range to be checked for intersection.
range
parameter.public Range getIntersection(Range range)
null
.
range
-
null
.public void merge()
public void unmerge()
public java.util.List getCells()
CellsOrder.LEFT2RIGHT_TOP2BOTTOM
order.
Each element of the list is an instance of Cell
class.
Cell
public java.util.List getCells(CellsOrder cellsOrder)
Cell
class.
cellsOrder
- specifies how to sort the cells in the list.
public java.util.Set cells()
Cell
class.
Cell
public void print(int copies) throws javax.print.PrintException
copies
- is the number of copies to be printed.
java.lang.IllegalArgumentException
- if number of copies is negative.
javax.print.PrintException
- if print problems occured.Application.setActivePrinter(String)
public Cell find(java.lang.String what, Range.SearchAttributes attributes)
what
argument.
If the range doesn't contain the specified string the return value is null
.
To find the next occurrence of the data in the range use findNext()
method.
what
- specifies the string to be found.attributes
- specifies search attributes.
what
argument.Range.SearchAttributes
,
findNext()
public Cell find(java.util.Date what, Range.SearchAttributes attributes)
what
argument.
If the range doesn't contain the specified date the return value is null
.
To find the next occurrence of the data in the range use findNext()
method.
what
- specifies the date to be found.attributes
- specifies search attributes.
what
argument.Range.SearchAttributes
,
findNext()
public Cell find(long what, Range.SearchAttributes attributes)
what
argument.
If the range doesn't contain the specified long
value
the return value is null
.
To find the next occurrence of the data in the range use findNext()
method.
what
- specifies the long
value to be found.attributes
- specifies search attributes.
what
argument.Range.SearchAttributes
,
findNext()
public Cell find(double what, Range.SearchAttributes attributes)
what
argument.
If the range doesn't contain the specified double
value
the return value is null
.
To find the next occurrence of the data in the range use findNext()
method.
what
- specifies the double
value to be found.attributes
- specifies search attributes.
what
argument.Range.SearchAttributes
,
findNext()
public Cell findNext()
find(java.lang.String, com.jniwrapper.win32.jexcel.Range.SearchAttributes)
method.
find(java.lang.String, com.jniwrapper.win32.jexcel.Range.SearchAttributes)
public void sort(java.lang.String columnName, boolean ascending, boolean caseSensitive) throws ExcelException
columnName
- sort rows in accordance to data of the column identified by given name.ascending
- if true
the data will be sorted in ascending order,
otherwise in descending order.caseSensitive
- if true
the data will be case-sensitive sorted.
ExcelException
- if the cells cannot be sorted.public void sort(int row, boolean ascending, boolean caseSensitive) throws ExcelException
row
- sort columns in accordance to data of this row.ascending
- if true
the data will be sorted in ascending order,
otherwise in descending order.caseSensitive
- if true
the data will be case-sensitive sorted.
ExcelException
- if the cells cannot be thrown.public boolean equals(java.lang.Object obj)
public void setFormulaArray(java.lang.String formula)
formula
- formula stringpublic java.lang.String getFormulaArray()
public void setFormula(java.lang.String formula)
formula
- formula stringpublic java.lang.String getFormula()
public void delete(com.jniwrapper.win32.excel.XlDeleteShiftDirection direction)
direction
- Specifies how to shift cells to replace deleted cells.public void delete()
public void setLocked(boolean value)
public boolean isLocked()
public void release()
com.jniwrapper.win32.jexcel.ApplicationAwareWrapper
public java.lang.String getAddress()
public java.lang.String getColumnName()
public Font getFont()
public void setFont(Font font)
font
- is the font to be set up.public Border getBorder(Border.Kind kind)
kind
- specifies which fragment of border to return.
java.lang.IllegalArgumentException
- if the kind argument is null
.public void setBorder(Border.Kind kind, Border border)
kind
- specifies the border kind.border
- is the border to be set up.
java.lang.IllegalArgumentException
- if any parameter is null
.public TextAlignment getVerticalAlignment()
TextAlignment
public void setVerticalAlignment(TextAlignment textAlignment)
textAlignment
- is the vertical text alignment kind to be set up.
java.lang.IllegalArgumentException
- if the target text alignment is null
or cannot be applied.TextAlignment
public TextAlignment getHorizontalAlignment()
TextAlignment
public void setHorizontalAlignment(TextAlignment textAlignment)
textAlignment
- is the horizontal text alignment kind to be set up.
java.lang.IllegalArgumentException
- if the target text alignment is null
or cannot be applied.TextAlignment
public void setAutoFit()
public void setWrapText(boolean value)
value
- specifies whether text should be wrapped or notpublic Range getEntireColumn()
public TextOrientation getTextOrientation()
TextOrientation
public void setTextOrientation(TextOrientation textOrientation)
textOrientation
- is the text orientation kind to be set up.
java.lang.IllegalArgumentException
- if the tanget text orientation is null
TextOrientation
public Worksheet getParent()
Worksheet
public void setName(java.lang.String rangeName)
rangeName
- is the name to be set up.
java.lang.IllegalArgumentException
- if the target range name is null
or cannot be set up.public void delete(int shift)
shift
- - XlDeleteShiftDirection constant which specifies shifting direction.public java.lang.String getName()
null
.
public double getColumnWidth()
public void setColumnWidth(double width)
width
- is the column width to be set up.
java.lang.IllegalArgumentException
- if the specified width is negative or cannot be set up.public double getRowHeight()
public void setRowHeight(double height)
height
- is the row height to be set up.
java.lang.IllegalArgumentException
- if the specified height is negative or cannot be set up.public void setValue2(com.jniwrapper.win32.automation.types.Variant value)
value
- - simple value or SimpleArray wrapped into Variantpublic java.lang.String getNumberFormat()
public void setNumberFormat(java.lang.String numberFormat)
numberFormat
- is the string representation of the number format to be set up.
java.lang.IllegalArgumentException
- if the specified number format cannot be set up.public void clear()
public void setInteriorPattern(InteriorPattern pattern)
pattern
- is the interior pattern kind to be set up.InteriorPattern
public InteriorPattern getInteriorPattern()
public void setInteriorColor(java.awt.Color color)
color
- is the color to be set up.public java.awt.Color getInteriorColor()
public void setInteriorPatternColor(java.awt.Color color)
color
- is the color to be set up.public java.awt.Color getInteriorPatternColor()
public java.lang.String toString()
public com.jniwrapper.win32.excel.Range getPeer()
public Application getApplication()
public com.jniwrapper.win32.automation.OleMessageLoop getOleMessageLoop()
protected void setOleMessageLoop(com.jniwrapper.win32.automation.OleMessageLoop oleMessageLoop)
public void setAutoDelete(boolean value)
setAutoDelete
in interface com.jniwrapper.AutoDeleteParameter
public boolean isAutoDelete()
isAutoDelete
in interface com.jniwrapper.AutoDeleteParameter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |