![]() |
||
Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate |
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.cells.Style
public class Style
Represents display styles of Excel spreadsheets.
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
copy(Style style)
Copies from another style. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
Color |
getBorderColor(int borderType)
Gets the color of the specified border. |
int |
getBorderLine(int borderType)
Gets the border line type of the specified boder. |
Color |
getColor()
Gets the cell shading color. |
java.lang.String |
getCustom()
Gets the custom number format string. |
Font |
getFont()
Gets the font of the style. |
short |
getHAlignment()
Gets the horizontal alignment type. |
int |
getIndent()
Gets the indent level. |
java.lang.String |
getName()
Gets the style name. |
int |
getNumber()
Gets the built-in display format of numbers and dates. |
Color |
getPatternColor()
Gets the pattern color. |
short |
getPatternStyle()
Gets the pattern style. |
int |
getRotation()
Gets the rotation degrees. |
int |
getTextDirection()
Gets the text direction type. |
int |
getVAlignment()
Gets the vertical alignment type. |
boolean |
isCellLocked()
Checks whether the cell is locked. |
boolean |
isFormulaHidden()
Checks if the formula is hidden. |
boolean |
isShrinked()
Checks if the text is shrunk to fit. |
boolean |
isTextWrapped()
Checks if the text is wrapped. |
void |
setBorderColor(int borderType,
Color color)
Sets the color of the specified border. |
void |
setBorderLine(int borderType,
int borderLineType)
Sets the border line type of the specified border. |
void |
setCellLocked(boolean bLocked)
Sets whether cells to be locked or not. |
void |
setColor(Color color)
Sets the cell shading color. |
void |
setCustom(java.lang.String custom)
Sets the custom number format string. |
void |
setFont(Font font)
Sets the font of the style. |
void |
setFormulaHidden(boolean bHidden)
Sets whether formulas to be hidden or not. |
void |
setHAlignment(short horAlignmentType)
Sets the horizontal text alignment type. |
void |
setIndent(int indent)
Sets the indent level. |
void |
setName(java.lang.String name)
Sets the name of the style. |
void |
setNumber(int number)
Sets the built-in display format of numbers and dates. Use built-in numbers for better performance. |
void |
setPatternColor(Color color)
Sets the pattern color. |
void |
setPatternStyle(short patternType)
Sets the pattern style. |
void |
setRotation(int rotation)
Sets the rotation degrees. |
void |
setShrinked(boolean bShrinked)
Sets whether the text should be shrunk to fit or not. |
void |
setTextDirection(int directionType)
Sets the text direction type. |
void |
setTextWrapped(boolean bWrapped)
Sets whether the text should be wrapped. |
void |
setVAlignment(short verAlignmentType)
Sets the vertical text alignment type. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void copy(Style style)
style
- the style to copy from.
java.lang.IllegalArgumentException
- if the style is null.public java.lang.Object clone()
clone
in class java.lang.Object
Object.clone()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object).
public Font getFont()
public java.lang.String getName()
public java.lang.String getCustom()
public boolean isCellLocked()
public boolean isFormulaHidden()
public boolean isTextWrapped()
public boolean isShrinked()
public int getNumber()
setNumber(int)
public short getHAlignment()
HorizontalAlignmentType
public int getVAlignment()
VerticalAlignmentType
public int getRotation()
public int getIndent()
public int getTextDirection()
TextDirectionType
public short getPatternStyle()
PatternType
public Color getColor()
public Color getPatternColor()
public int getBorderLine(int borderType)
borderType
- which border to get.
java.lang.IllegalArgumentException
- if the border type is invalid.BorderType
,
BorderLineType
public Color getBorderColor(int borderType)
borderType
- which border to get.
java.lang.IllegalArgumentException
- if the border type is invalid.BorderType
,
BorderLineType
public void setFont(Font font)
font
- font of the style.public void setName(java.lang.String name)
name
- style name. "" does not make sense and is treated as null.
java.lang.IllegalArgumentException
- if the style name is invalid.public void setCustom(java.lang.String custom)
custom
- the custom format string.
Empty string does not make sense and will be treated as null.public void setCellLocked(boolean bLocked)
bLocked
- true for locked.public void setFormulaHidden(boolean bHidden)
bHidden
- true for hidden.public void setTextWrapped(boolean bWrapped)
bWrapped
- true for wrapped.public void setShrinked(boolean bShrinked)
bShrinked
- public void setNumber(int number)
Value | Type | Format String |
---|---|---|
0 | General | General |
1 | Decimal | 0 |
2 | Decimal | 0.00 |
3 | Decimal | #,##0 |
4 | Decimal | #,##0.00 |
5 | Currency | "$"#,##0_);("$"#,##0) |
6 | Currency | "$"#,##0_);[Red]("$"#,##0) |
7 | Currency | "$"#,##0.00_);("$"#,##0.00) |
8 | Currency | "$"#,##0.00_);[Red]("$"#,##0.00) |
9 | Percent | 0% |
10 | Percent | 0.00% |
11 | Scientific | 0.00E+00 |
12 | Fraction | # ?/? |
13 | Fraction | # ??/?? |
14 | Date | M/D/YY |
15 | Date | D-MMM-YY |
16 | Date | D-MMM |
17 | Date | MMM-YY |
18 | Time | h:mm AM/PM |
19 | Time | h:mm:ss AM/PM |
20 | Time | h:mm |
21 | Time | h:mm:ss |
22 | Date/Time | M/D/YY h:mm |
37 | Accounting | _(#,##0_);(#,##0) |
38 | Accounting | _(#,##0_);[Red](#,##0) |
39 | Accounting | _(#,##0.00_);(#,##0.00) |
40 | Accounting | _(#,##0.00_);[Red](#,##0.00) |
41 | Currency | _("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_) |
42 | Currency | _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_) |
43 | Currency | _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_) |
44 | Currency | _("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_) |
45 | Time | mm:ss |
46 | Time | [h]:mm:ss |
47 | Time | mm:ss.0 |
48 | Scientific | ##0.0E+0 |
49 | Text | @ |
number
- the built-in formatting number.
java.lang.IllegalArgumentException
- if number is invalid.public void setHAlignment(short horAlignmentType)
horAlignmentType
- the horizontal text alignment type.
java.lang.IllegalArgumentException
- if the horizontal text alignment type is invalid.HorizontalAlignmentType
public void setVAlignment(short verAlignmentType)
verAlignmentType
- the vertical text alignment type.
java.lang.IllegalArgumentException
- if the vertical alignment type is invalid.VerticalAlignmentType
public void setRotation(int rotation)
rotation
- the rotation degrees(-90 to 90, and 255).
255 means letters are stacked top-to-bottom, but not rotated.
java.lang.IllegalArgumentException
- invalid rotation degrees.public void setIndent(int indent)
indent
- the indent level(0-15).
java.lang.IllegalArgumentException
- if the indent level is invalid.public void setTextDirection(int directionType)
directionType
- the direction type.
java.lang.IllegalArgumentException
- if the direction type is invalid.TextDirectionType
public void setPatternStyle(short patternType)
patternType
- the pattern style type.
java.lang.IllegalArgumentException
- if the pattern style type is invalid.PatternType
public void setColor(Color color)
color
- the cell shading color.public void setPatternColor(Color color)
color
- the pattern color.public void setBorderLine(int borderType, int borderLineType)
borderType
- which border to set.borderLineType
- border line type of the specified border.
java.lang.IllegalArgumentException
- if any of the parameters is invalid.BorderType
,
BorderLineType
public void setBorderColor(int borderType, Color color)
borderType
- which border to set.color
- color of the specified border.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |