|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jxcell.CellFormat
public class CellFormat
this class present creating and returning information about cell formats.
Field Summary | |
---|---|
static short |
BorderDashDot
|
static short |
BorderDashDotDot
|
static short |
BorderDashed
|
static short |
BorderDotted
|
static short |
BorderDouble
|
static short |
BorderHair
|
static short |
BorderMedium
|
static short |
BorderMediumDash
|
static short |
BorderMediumDashDot
|
static short |
BorderMediumDashDotDot
|
static short |
BorderNone
|
static short |
BorderSlantedDashDot
|
static short |
BorderThick
|
static short |
BorderThin
|
static short |
HorizontalAlignmentCenter
|
static short |
HorizontalAlignmentCenterAcrossCells
|
static short |
HorizontalAlignmentFill
|
static short |
HorizontalAlignmentGeneral
|
static short |
HorizontalAlignmentJustify
|
static short |
HorizontalAlignmentLeft
|
static short |
HorizontalAlignmentRight
|
static short |
OrientationClockwise
Text is rotated clockwise. |
static short |
OrientationCounterClockwise
Text is rotated counter clockwise. |
static short |
OrientationNone
No orientation, use normal text. |
static short |
OrientationTopToBottom
Text is stacked top to bottom. |
static short |
PatternNull
|
static short |
PatternSolid
|
static short |
UnderlineDouble
Double Underline |
static short |
UnderlineNone
No Underline |
static short |
UnderlineSingle
Single Underline |
static short |
VerticalAlignmentBottom
|
static short |
VerticalAlignmentCenter
|
static short |
VerticalAlignmentJustify
|
static short |
VerticalAlignmentTop
|
Constructor Summary | |
---|---|
CellFormat(com.jxcell.ss.CellFormat cfmt)
|
Method Summary | |
---|---|
void |
copy(CellFormat rs)
|
short |
getBottomBorder()
Returns the border style for the bottom edge of the cell. |
int |
getBottomBorderColor()
Returns the color used to display the bottom edge of the cell. |
java.lang.String |
getCustomFormat()
Returns the number format. |
java.lang.String |
getCustomFormatLocal()
Returns the number format associated with a cell in the local language. |
int |
getCustomFormatType()
Returns the number format type. |
int |
getFontCharSet()
Returns the charset of the font. |
int |
getFontColor()
Returns the color used to display the font. |
java.lang.String |
getFontName()
Returns the name of the font. |
double |
getFontSize()
Returns the size of the font in points. |
short |
getFontUnderline()
Returns the underline attribute of the font. |
short |
getHorizontalAlignment()
Returns the type of horizontal alignment. |
short |
getHorizontalInsideBorder()
Returns the border style for the horizontal inside border. |
int |
getHorizontalInsideBorderColor()
Returns the color used to display the horizontal inside border. |
int |
getIndent()
Returns the indent attribute |
short |
getLeftBorder()
Returns the border style for the left edge of the cell. |
int |
getLeftBorderColor()
Returns the color used to display the left edge of the cell. |
boolean |
getMergeCells()
Returns the merge cells setting. |
short |
getOrientation()
Returns the orientation type. |
short |
getPattern()
Returns the pattern type. |
int |
getPatternBG()
Returns the color used to display the pattern background. |
int |
getPatternFG()
Returns the color used to display the pattern foreground. |
short |
getRightBorder()
Returns the border style for the right edge of the cell. |
int |
getRightBorderColor()
Returns the color used to display the right edge of the cell. |
short |
getTopBorder()
Returns the border style for the top edge of the cell. |
int |
getTopBorderColor()
Returns the color used to display the top edge of the cell. |
short |
getVerticalAlignment()
Returns the type of vertical alignment. |
short |
getVerticalInsideBorder()
Returns the border style for the vertical inside border. |
int |
getVerticalInsideBorderColor()
Returns the color used to display the vertical inside border. |
void |
init()
reset the format settings,this will clear all setting had been set before |
boolean |
isFontBold()
Returns whether the font is bold. |
boolean |
isFontItalic()
Returns whether the font is italic. |
boolean |
isFontStrikeout()
Returns whether the font is strikeout. |
boolean |
isHidden()
Returns whether the active cell is hidden |
boolean |
isLocked()
Returns whether the active cell is locked |
boolean |
isPatternAuto()
|
boolean |
isShrinkToFit()
Returns whether ShrinkToFit is enabled. |
boolean |
isUndefined(int item)
|
boolean |
isWordWrap()
Returns whether word wrap is enabled. |
void |
setBottomBorder(short bottom)
Sets the style for the bottom border. |
void |
setBottomBorderColor(java.awt.Color bottom)
|
void |
setBottomBorderColor(int bottom)
Sets the color used to display the bottom edge of the cell. |
void |
setCellFormats(Action action)
|
void |
setCustomFormat(java.lang.String format)
Sets the number format string. |
void |
setCustomFormatLocal(java.lang.String format)
Sets the number format string in the user's local language. |
void |
setFontBold(boolean bold)
Sets the bold attribute of the font. |
void |
setFontCharSet(int charset)
Sets the font charset. |
void |
setFontColor(java.awt.Color color)
|
void |
setFontColor(int color)
Sets the color used to display the font. |
void |
setFontItalic(boolean italic)
Sets the italic attribute of the font. |
void |
setFontName(java.lang.String name)
Sets the font name. |
void |
setFontSize(double size)
Sets the font size in points. |
void |
setFontStrikeout(boolean bold)
Sets the strikeout attribute of the font. |
void |
setFontUnderline(short underline)
Sets the underline attribute of the font. |
void |
setHidden(boolean hidden)
Sets the hidden cell flag |
void |
setHorizontalAlignment(short alignment)
Sets the horizontal alignment. |
void |
setHorizontalInsideBorder(short horizontalInside)
Sets the horizontal inside border style. |
void |
setHorizontalInsideBorderColor(int horizontalInside)
Sets the color of the horizontal inside border. |
void |
setIndent(int indent)
Set the indent attribute |
void |
setLeftBorder(short left)
Sets the style for the left border. |
void |
setLeftBorderColor(java.awt.Color left)
|
void |
setLeftBorderColor(int left)
Sets the color used to display the left edge of the cell. |
void |
setLocked(boolean locked)
Sets the locked cell flag |
void |
setMergeCells(boolean mergeCells)
Sets the mergeCells attribute. |
void |
setOrientation(short orientation)
Sets the orientation type. |
void |
setPattern(short pattern)
Sets the pattern type. |
void |
setPatternAuto(boolean auto)
|
void |
setPatternBG(java.awt.Color bg)
|
void |
setPatternBG(int bg)
Sets the color used to display the pattern background. |
void |
setPatternFG(java.awt.Color fg)
|
void |
setPatternFG(int fg)
Sets the color used to display the pattern foreground. |
void |
setRightBorder(short right)
Sets the style for the right border. |
void |
setRightBorderColor(java.awt.Color right)
|
void |
setRightBorderColor(int right)
Sets the color used to display the right edge of the cell. |
void |
setShrinkToFit(boolean shrinktofit)
Sets the ShrinkToFit attribute. |
void |
setTopBorder(short top)
Sets the style for the top edge of the cell. |
void |
setTopBorderColor(java.awt.Color top)
|
void |
setTopBorderColor(int top)
Sets the color used to display the top edge of the cell. |
void |
setUndefined(int item,
boolean flag)
|
void |
setValidationRule(Book book1,
java.lang.String calcformula,
int i,
int j)
|
void |
setValidationText(java.lang.String s)
|
void |
setVerticalAlignment(short alignment)
Sets the type of vertical alignment. |
void |
setVerticalInsideBorder(short verticalInside)
Sets the border style for the vertical inside border. |
void |
setVerticalInsideBorderColor(int verticalInside)
Sets the color used to display the vertical inside border. |
void |
setWordWrap(boolean wrap)
Sets the wordwrap attribute. |
void |
useAllFormats()
Sets all format settings are used. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short BorderNone
public static final short BorderThin
public static final short BorderMedium
public static final short BorderDashed
public static final short BorderDotted
public static final short BorderThick
public static final short BorderDouble
public static final short BorderHair
public static final short BorderMediumDash
public static final short BorderDashDot
public static final short BorderMediumDashDot
public static final short BorderDashDotDot
public static final short BorderMediumDashDotDot
public static final short BorderSlantedDashDot
public static final short HorizontalAlignmentGeneral
public static final short HorizontalAlignmentLeft
public static final short HorizontalAlignmentCenter
public static final short HorizontalAlignmentRight
public static final short HorizontalAlignmentFill
public static final short HorizontalAlignmentJustify
public static final short HorizontalAlignmentCenterAcrossCells
public static final short VerticalAlignmentTop
public static final short VerticalAlignmentCenter
public static final short VerticalAlignmentBottom
public static final short VerticalAlignmentJustify
public static final short PatternNull
public static final short PatternSolid
public static final short OrientationNone
public static final short OrientationTopToBottom
public static final short OrientationCounterClockwise
public static final short OrientationClockwise
public static final short UnderlineNone
public static final short UnderlineSingle
public static final short UnderlineDouble
Constructor Detail |
---|
public CellFormat(com.jxcell.ss.CellFormat cfmt)
Method Detail |
---|
public void setCellFormats(Action action)
public void copy(CellFormat rs)
public int getCustomFormatType()
public java.lang.String getCustomFormat()
public java.lang.String getCustomFormatLocal()
public void setCustomFormat(java.lang.String format) throws CellException
format
- the string defining the number format
CellException
- exceptionpublic void setCustomFormatLocal(java.lang.String format) throws CellException
format
- the string defining the number format
CellException
- exceptionpublic boolean getMergeCells()
public void setMergeCells(boolean mergeCells)
mergeCells
- Indicates whether cells are to be merged.public java.lang.String getFontName()
public void setFontName(java.lang.String name)
name
- a string that designates the font name.public int getFontCharSet()
public void setFontCharSet(int charset)
charset
- the font charset.public double getFontSize()
public void setFontSize(double size)
size
- double value indicating the font size.public boolean isFontItalic()
public void setFontItalic(boolean italic)
italic
- true = set font to italic.public short getFontUnderline()
public void setFontUnderline(short underline)
underline
- font underline setting.
Underline Constants
UnderlineNone UnderlineSingle UnderlineDoublepublic boolean isFontBold()
public void setFontBold(boolean bold)
bold
- true = set font to bold.public boolean isFontStrikeout()
public void setFontStrikeout(boolean bold)
bold
- true = set font to bold.public int getFontColor()
public void setFontColor(int color)
color
- integer describing the font color as a four-byte integer in the format 0x00RRGGBB.public void setFontColor(java.awt.Color color)
public boolean isShrinkToFit()
public void setShrinkToFit(boolean shrinktofit)
shrinktofit
- true or false.public boolean isWordWrap()
public void setWordWrap(boolean wrap)
wrap
- true or false.public short getPattern()
public void setPattern(short pattern)
pattern
- a number corresponding to the excel patterns.public int getPatternBG()
public void setPatternBG(int bg)
bg
- an integer describing the font color as a four-byte integer in the format 0x00RRGGBB.public void setPatternBG(java.awt.Color bg)
public int getPatternFG()
public void setPatternFG(int fg)
fg
- an integer describing the font color as a four-byte integer in the format 0x00RRGGBB.public void setPatternFG(java.awt.Color fg)
public short getHorizontalAlignment()
public void setHorizontalAlignment(short alignment) throws CellException
alignment
- short designating the type of horizontal alignment.
Horizontal Alignment Constants HorizontalAlignmentGeneral HorizontalAlignmentLeft HorizontalAlignmentCenter
HorizontalAlignmentRight HorizontalAlignmentFill HorizontalAlignmentJustify
HorizontalAlignmentCenterAcrossCells
CellException
public short getVerticalAlignment()
public void setVerticalAlignment(short alignment) throws CellException
alignment
- one of the following vertical alignment types.
Vertical Alignment Constants VerticalAlignmentTop VerticalAlignmentCenter
VerticalAlignmentBottom VerticalAlignmentJustify
CellException
public short getTopBorder()
public void setTopBorder(short top)
top
- one of the following border styles:
BorderNone = 0
BorderThin = 1
BorderMedium = 2
BorderDashed = 3
BorderDotted = 4
BorderThick = 5
BorderDouble = 6
BorderHair = 7
BorderMediumDash = 8
BorderDashDot = 9
BorderMediumDashDot = 10
BorderDashDotDot = 11
BorderMediumDashDotDot = 12
BorderSlantedDashDot = 13public int getTopBorderColor()
public void setTopBorderColor(int top)
top
- an int that describes the border color as a four-byte integer in the format 0x00RRGGBB.public void setTopBorderColor(java.awt.Color top)
public short getBottomBorder()
public void setBottomBorder(short bottom)
bottom
- one of the following border styles:
BorderNone = 0
BorderThin = 1
BorderMedium = 2
BorderDashed = 3
BorderDotted = 4
BorderThick = 5
BorderDouble = 6
BorderHair = 7
BorderMediumDash = 8
BorderDashDot = 9
BorderMediumDashDot = 10
BorderDashDotDot = 11
BorderMediumDashDotDot = 12
BorderSlantedDashDot = 13public int getBottomBorderColor()
public void setBottomBorderColor(int bottom)
bottom
- an int that describes the border color as a four-byte integer in the format 0x00RRGGBB.public void setBottomBorderColor(java.awt.Color bottom)
public short getLeftBorder()
public void setLeftBorder(short left)
left
- one of the following border styles:
BorderNone = 0
BorderThin = 1
BorderMedium = 2
BorderDashed = 3
BorderDotted = 4
BorderThick = 5
BorderDouble = 6
BorderHair = 7
BorderMediumDash = 8
BorderDashDot = 9
BorderMediumDashDot = 10
BorderDashDotDot = 11
BorderMediumDashDotDot = 12
BorderSlantedDashDot = 13public int getLeftBorderColor()
public void setLeftBorderColor(int left)
left
- an int that describes the border color as a four-byte integer in the format 0x00RRGGBB.public void setLeftBorderColor(java.awt.Color left)
public short getRightBorder()
public void setRightBorder(short right)
right
- one of the following border styles:
BorderNone = 0
BorderThin = 1
BorderMedium = 2
BorderDashed = 3
BorderDotted = 4
BorderThick = 5
BorderDouble = 6
BorderHair = 7
BorderMediumDash = 8
BorderDashDot = 9
BorderMediumDashDot = 10
BorderDashDotDot = 11
BorderMediumDashDotDot = 12
BorderSlantedDashDot = 13public int getRightBorderColor()
public void setRightBorderColor(int right)
right
- an int that describes the border color as a four-byte integer in the format 0x00RRGGBB.public void setRightBorderColor(java.awt.Color right)
public short getHorizontalInsideBorder()
public void setHorizontalInsideBorder(short horizontalInside)
horizontalInside
- short integer representing one of the following border styles:
BorderNone = 0
BorderThin = 1
BorderMedium = 2
BorderDashed = 3
BorderDotted = 4
BorderThick = 5
BorderDouble = 6
BorderHair = 7
BorderMediumDash = 8
BorderDashDot = 9
BorderMediumDashDot = 10
BorderDashDotDot = 11
BorderMediumDashDotDot = 12
BorderSlantedDashDot = 13public int getHorizontalInsideBorderColor()
public void setHorizontalInsideBorderColor(int horizontalInside)
horizontalInside
- an int representing the color as a four-byte integer in the format 0x00RRGGBB.public short getVerticalInsideBorder()
public void setVerticalInsideBorder(short verticalInside)
verticalInside
- One of the following border styles:
BorderNone = 0
BorderThin = 1
BorderMedium = 2
BorderDashed = 3
BorderDotted = 4
BorderThick = 5
BorderDouble = 6
BorderHair = 7
BorderMediumDash = 8
BorderDashDot = 9
BorderMediumDashDot = 10
BorderDashDotDot = 11
BorderMediumDashDotDot = 12
BorderSlantedDashDot = 13public int getVerticalInsideBorderColor()
public void setVerticalInsideBorderColor(int verticalInside)
verticalInside
- an int that describes the border color as a four-byte integer in the format 0x00RRGGBB.public void setOrientation(short orientation) throws CellException
orientation
- the orientation setting.
Orientation Constants
OrientationNone OrientationTopToBottom OrientationCounterClockwise
OrientationClockwise eOrientationAuto
CellException
- if argument is invalid.public short getOrientation()
public boolean isLocked()
public void setLocked(boolean locked)
locked
- true to lock the cellpublic boolean isHidden()
public void setHidden(boolean hidden)
hidden
- true to lock the cellpublic void useAllFormats()
public void init()
public boolean isUndefined(int item) throws CellException
CellException
public void setUndefined(int item, boolean flag) throws CellException
CellException
public boolean isPatternAuto()
public void setPatternAuto(boolean auto)
public void setValidationRule(Book book1, java.lang.String calcformula, int i, int j) throws CellException
CellException
public void setValidationText(java.lang.String s)
public void setIndent(int indent)
indent
- sizepublic int getIndent()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |