|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.win32.jexcel.Cell
public class Cell
This class represents a cell of a Worksheet
.
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
|
Method Summary | |
---|---|
void |
clear()
Clears the content of the cell or range. |
void |
delete(int shift)
Delete range from worksheet. |
boolean |
equals(java.lang.Object obj)
|
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 |
getColumn()
Returns the column number of the cell. |
java.lang.String |
getColumnName()
Returns the column name of this range. |
double |
getColumnWidth()
Returns the column width. |
java.util.Date |
getDate()
If the cell contains data of a date type, the function returns a Date representation of the cell value. |
EntireRange |
getEntireColumn()
Returns the range that represents an entire column. |
EntireRange |
getEntireRow()
Returns the range that represents an entire row. |
Font |
getFont()
Returns the text font. |
java.lang.String |
getFormula()
Returns a formula that is contained in the cell or null
if the cell doesn't contain a formula. |
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. |
java.lang.Boolean |
getLogical()
If the cell contains a boolean data, the function returns a Boolean representation of the cell value. |
java.lang.String |
getName()
Returns the name of the range. |
java.lang.Number |
getNumber()
If the cell contains a numeric data, the function returns a Number representation of the cell value. |
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. |
protected com.jniwrapper.win32.excel.Range |
getRange()
|
int |
getRow()
Returns the row number of the cell. |
double |
getRowHeight()
Returns the row height. |
java.lang.String |
getString()
Returns a string representation of the cell value. |
java.lang.String |
getText()
Returns text value of this range. |
TextOrientation |
getTextOrientation()
Returns the text orientation kind. |
TextAlignment |
getVerticalAlignment()
Returns the vertical text alignment kind. |
boolean |
hasArray()
Returns true of the cell contains an array or false otherwise. |
boolean |
hasFormula()
Returns true of the cell contains a formula or false otherwise. |
boolean |
isAutoDelete()
|
boolean |
isEmpty()
Returns true if the cell is empty. |
boolean |
isError()
Returns true if the cell contains an error value. |
boolean |
isLogical()
Returns true if the cell contains a number or false otherwise. |
boolean |
isNumber()
Returns true if the cell contains a number or false otherwise. |
boolean |
isText()
Returns true if the cell contains a text or false otherwise. |
void |
release()
Releases this wrapper object. |
protected void |
releaseRangeResources()
|
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 |
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 |
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)
|
protected void |
setRange(com.jniwrapper.win32.excel.Range range)
|
void |
setRowHeight(double height)
Sets up the row height. |
void |
setTextOrientation(TextOrientation textOrientation)
Sets up the text orientation kind. |
void |
setValue(java.util.Date value)
Changes the cell value to the specified one. |
void |
setValue(double value)
Changes the cell value to the specified one. |
void |
setValue(long value)
Changes the cell value to the specified one. |
void |
setValue(java.lang.String value)
Changes the cell value to the specified one. |
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. |
java.lang.String |
toString()
|
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 _pureRange
protected com.jniwrapper.win32.excel.Interior _interior
protected com.jniwrapper.win32.excel.Font _font
Method Detail |
---|
public int getRow()
public int getColumn()
public void setValue(java.lang.String value)
value
- may a text, a formula or a number represented in the string format.public void setValue(long value)
value
- is any long
number.public void setValue(double value)
value
- is any double
number.public void setValue(java.util.Date value)
value
- is an instance of Date
class.public java.lang.String getFormula()
null
if the cell doesn't contain a formula.
null
if the cell doesn't contain a formula.public boolean hasFormula()
true
of the cell contains a formula or false
otherwise.
true
of the cell contains a formula or false
otherwise.public boolean hasArray()
true
of the cell contains an array or false
otherwise.
true
of the cell contains an array or false
otherwise.public boolean isError()
true
if the cell contains an error value.
true
if the cell contains an error value.public boolean isEmpty()
true
if the cell is empty.
true
if the cell is empty.public boolean isText()
true
if the cell contains a text or false
otherwise.
true
if the cell contains a text or false
otherwise.public boolean isNumber()
true
if the cell contains a number or false
otherwise.
true
if the cell contains a number or false
otherwise.public boolean isLogical()
true
if the cell contains a number or false
otherwise.
true
if the cell contains a number or false
otherwise.public java.lang.String getString()
public java.util.Date getDate()
Date
representation of the cell value.
Otherwise the function returns null
.
Date
representation of the cell value.public java.lang.Number getNumber()
Number
representation of the cell value.
Otherwise the function returns null
.
Number
representation of the cell value.public java.lang.Boolean getLogical()
Boolean
representation of the cell value.
Otherwise the function returns null
.
Boolean
representation of the cell value.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getColumnName()
public void release()
protected void releaseRangeResources()
public java.lang.String getAddress()
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 EntireRange getEntireColumn()
public EntireRange getEntireRow()
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 java.lang.String getText()
protected com.jniwrapper.win32.excel.Range getRange()
protected void setRange(com.jniwrapper.win32.excel.Range range)
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 |