public class RangeStyle
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 |
Modifier and Type | Method and Description |
---|---|
void |
copy(RangeStyle 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.
|
boolean |
getFontBold()
Returns whether the font is bold.
|
int |
getFontCharSet()
Returns the charset of the font.
|
int |
getFontColor()
Returns the color used to display the font.
|
boolean |
getFontItalic()
Returns whether the font is italic.
|
java.lang.String |
getFontName()
Returns the name of the font.
|
boolean |
getFontOutline()
Returns whether the font is Outline.
|
boolean |
getFontShadow()
Returns whether the font is Shadow.
|
int |
getFontSize()
Returns the size of the font in twips.
|
boolean |
getFontStrikeout()
Returns whether the font is strikeout.
|
short |
getFontUnderline()
Returns the underline attribute of the font.
|
int |
getFormatType()
Returns the number format type.
|
int |
getGradientShadingStyle()
Returns the gradient fill shading style.
|
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.
|
boolean |
isFontSubscript()
Returns whether the font is Subscript.
|
boolean |
isFontSuperscript()
Returns whether the font is Subscript.
|
boolean |
isHidden()
Returns whether the active cell is hiden
|
boolean |
isLocked()
Returns whether the active cell is locked
|
boolean |
isShrinkToFit()
Returns whether ShrinkToFit is enabled.
|
boolean |
isWordWrap()
Returns whether word wrap is enabled.
|
void |
resetFormat()
reset the format settings,this will clear all setting had been set before
|
void |
setBottomBorder(short bottom)
Sets the style for the bottom border.
|
void |
setBottomBorderColor(int bottom)
Sets the color used to display the bottom edge of the cell.
|
void |
setCustomFormat(java.lang.String format)
Sets the number format string.
|
void |
setDiagBorderAndColor(boolean bDiagonalUp,
boolean bDiagonalDown,
short border,
int color) |
void |
setFontBold(boolean bold)
Sets the bold attribute of the font.
|
void |
setFontCharSet(int charset)
Sets the font charset.
|
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 |
setFontOutline(boolean outline)
Sets the Outline attribute of the font.
|
void |
setFontShadow(boolean shadow)
Sets the Shadow attribute of the font.
|
void |
setFontSize(int size)
Sets the font size in twips.
|
void |
setFontStrikeout(boolean strikeout)
Sets the strikeout attribute of the font.
|
void |
setFontSubscript(boolean Subscript)
Sets the Subscript attribute of the font.
|
void |
setFontSuperscript(boolean superscript)
Sets the Subscript attribute of the font.
|
void |
setFontUnderline(short underline)
Sets the underline attribute of the font.
|
void |
setGradientTwoColor(int ShadingStyle,
int ShadingVariant,
int fg,
int bg)
Sets the gradient fill with two colors.
|
void |
setHidden(boolean hidden)
Sets the hiden 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(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 |
setPatternBG(int bg)
Sets the color used to display the pattern background.
|
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(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(int top)
Sets the color used to display the top edge of the cell.
|
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 |
useAllFormat()
Sets all format settings are used.
|
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
public void copy(RangeStyle rs)
public int getFormatType()
public java.lang.String getCustomFormat()
public void setCustomFormat(java.lang.String format) throws java.lang.Exception
format
- the string defining the number formatjava.lang.Exception
- 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 int getFontSize()
public void setFontSize(int size)
size
- an integer indicating the font size.public boolean getFontItalic()
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 getFontBold()
public void setFontBold(boolean bold)
bold
- true = set font to bold.public boolean isFontSubscript()
public void setFontSubscript(boolean Subscript)
Subscript
- true = set font to Subscript.public boolean isFontSuperscript()
public void setFontSuperscript(boolean superscript)
superscript
- true = set font to Subscript.public boolean getFontStrikeout()
public void setFontStrikeout(boolean strikeout)
strikeout
- true = set font to strikeout.public boolean getFontShadow()
public void setFontShadow(boolean shadow)
shadow
- true = set font to Shadow.public boolean getFontOutline()
public void setFontOutline(boolean outline)
outline
- true = set font to Outline.public int getFontColor()
public void setFontColor(int color)
color
- integer describing the font color as a four-byte integer in the format 0x00RRGGBB.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 getGradientShadingStyle()
public void setGradientTwoColor(int ShadingStyle, int ShadingVariant, int fg, int bg)
ShadingStyle
- number corresponding to gradient shading style.
Horizontal - 0 Vertical - 1 Diagonal Up - 2 Diagonal Down - 3 From Corner - 4 From Center - 5ShadingVariant
- number corresponding to gradient shading variants(1-4).fg
- first colorbg
- second colorpublic int getPatternBG()
public void setPatternBG(int bg)
bg
- an integer describing the font color as a four-byte integer in the format 0x00RRGGBB.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 short getHorizontalAlignment()
public void setHorizontalAlignment(short alignment)
alignment
- short designating the type of horizontal alignment.
Horizontal Alignment Constants HorizontalAlignmentGeneral HorizontalAlignmentLeft HorizontalAlignmentCenter
HorizontalAlignmentRight HorizontalAlignmentFill HorizontalAlignmentJustify
HorizontalAlignmentCenterAcrossCellspublic short getVerticalAlignment()
public void setVerticalAlignment(short alignment)
alignment
- one of the following vertical alignment types.
Vertical Alignment Constants VerticalAlignmentTop VerticalAlignmentCenter
VerticalAlignmentBottom VerticalAlignmentJustifypublic 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 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 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 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 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 setDiagBorderAndColor(boolean bDiagonalUp, boolean bDiagonalDown, short border, int color)
public void setOrientation(short orientation) throws java.lang.Exception
orientation
- the orientation setting.
Orientation Constants
OrientationNone OrientationTopToBottom OrientationCounterClockwise
OrientationClockwise eOrientationAutojava.lang.Exception
- 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 hide the cellpublic int getIndent()
public void setIndent(int indent)
indent
- sizepublic void useAllFormat()
public void resetFormat()