public class GridTableItemStyle extends WebTableItemStyle
Example
GridWeb GridWeb1 = new GridWeb();
GridWorksheetCollection sheets = GridWeb1.getWorkSheets();
GridWorksheet sheet = sheets.add("demo1");
sheet.getCells().get(0,0).putValue("Demo Text");
GridTableItemStyle style = sheet.getCells().get(0, 0).getStyle();
style.getFont().setSize(FontUnit.point(72));
style.setWrap(false);
style.setBackColor(Color.getGray());
style.setBorderStyle(BorderStyle.SOLID);
style.setBorderWidth(Unit.pixel(1));
style.setBorderColor(Color.getSilver());
style.getRightBorderStyle().setBorderColor(Color.getBlack());
style.getRightBorderStyle().setBorderStyle(BorderStyle.SOLID);
style.getRightBorderStyle().setBorderWidth(Unit.pixel(1));
style.getBottomBorderStyle().setBorderColor(Color.getBlack());
style.getBottomBorderStyle().setBorderStyle(BorderStyle.SOLID);
style.getBottomBorderStyle().setBorderWidth(Unit.pixel(1));
sheet.getCells().get(0, 0).setStyle(style);
| Constructor and Description |
|---|
GridTableItemStyle()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyFrom(WebStyle s)
Copies from another style object.
|
java.lang.String |
getBackImageAttributes()
Background image attributes.
|
java.lang.String |
getBackImageUrl()
Background image url.
|
WebBorderStyle |
getBottomBorderStyle()
Specifies the style of the cell's bottom border.
|
java.lang.String |
getCustom()
Gets the custom format, null or empty string means no custom format.
|
int |
getIndentLevel()
Gets indent level.
|
WebBorderStyle |
getLeftBorderStyle()
Specifies the style of the cell's left border.
|
int |
getNumberType()
Gets the display format of numbers and dates.
|
boolean |
getQuotePrefix()
Indicates whether the cell's value starts with single quote mark.
|
WebBorderStyle |
getRightBorderStyle()
Specifies the style of the cell's right border.
|
short |
getRotationAngle()
Gets Rotation attribute.
|
WebBorderStyle |
getTopBorderStyle()
Specifies the style of the cell's top border.
|
int |
hashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
|
protected boolean |
isEmptyX()
Indicates whether the object is empty.
|
boolean |
isLocked()
Gets a value indicating whether a cell can be modified or not when its worksheet is protected.
|
void |
mergeWith(WebStyle s)
Merges with another style object.
|
void |
setBackImageAttributes(java.lang.String value)
Background image attributes.
|
void |
setBackImageUrl(java.lang.String value)
Background image url.
|
void |
setBottomBorderStyle(WebBorderStyle value)
Specifies the style of the cell's bottom border.
|
void |
setCustom(java.lang.String value)
Sets the custom format, null or empty string means no custom format.
|
void |
setIndentLevel(int value)
Sets indent level.
|
void |
setLeftBorderStyle(WebBorderStyle value)
Specifies the style of the cell's left border.
|
void |
setLocked(boolean value)
Sets a value indicating whether a cell can be modified or not when its worksheet is protected.
|
void |
setNumberType(int value)
Sets the display format of numbers and dates.
|
void |
setQuotePrefix(boolean value)
Indicates whether the cell's value starts with single quote mark.
|
void |
setRightBorderStyle(WebBorderStyle value)
Specifies the style of the cell's right border.
|
void |
setRotationAngle(short value)
Sets Rotation attribute.
|
void |
setTopBorderStyle(WebBorderStyle value)
Specifies the style of the cell's top border.
|
getHorizontalAlign, getVerticalAlign, getWrap, setHorizontalAlign, setVerticalAlign, setWrapgetBackColor, getBorderColor, getBorderStyle, getBorderWidth, getCssClass, getFont, getForeColor, getHeight, getWidth, setBackColor, setBorderColor, setBorderStyle, setBorderWidth, setCssClass, setForeColor, setHeight, setWidthpublic java.lang.String getBackImageUrl()
public void setBackImageUrl(java.lang.String value)
public java.lang.String getBackImageAttributes()
public void setBackImageAttributes(java.lang.String value)
public short getRotationAngle()
Remarks
0: Not rotated.
255: Top to Bottom.
-90: Downward.
90: Upward.
You can set 255 or value ranged from -90 to 90.public void setRotationAngle(short value)
Remarks
0: Not rotated.
255: Top to Bottom.
-90: Downward.
90: Upward.
You can set 255 or value ranged from -90 to 90.public int getIndentLevel()
Remarks
public void setIndentLevel(int value)
Remarks
public WebBorderStyle getLeftBorderStyle()
public void setLeftBorderStyle(WebBorderStyle value)
public WebBorderStyle getRightBorderStyle()
public void setRightBorderStyle(WebBorderStyle value)
public WebBorderStyle getTopBorderStyle()
public void setTopBorderStyle(WebBorderStyle value)
public WebBorderStyle getBottomBorderStyle()
public void setBottomBorderStyle(WebBorderStyle value)
public int getNumberType()
Remarks
For example, the formatting patterns represented by numbers for en_US region:| 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 | Percentage | 0% |
| 10 | Percentage | 0.00% |
| 11 | Scientific | 0.00E+00 |
| 12 | Fraction | # ?/? |
| 13 | Fraction | # ??/?? |
| 14 | Date | m/d/yyyy |
| 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 | Time | m/d/yyyy 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 | Accounting | _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_) |
| 42 | Currency | _($* #,##0_);_($* (#,##0);_($* "-"_);_(@_) |
| 43 | Accounting | _(* #,##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 | @ |
public void setNumberType(int value)
Remarks
For example, the formatting patterns represented by numbers for en_US region:| 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 | Percentage | 0% |
| 10 | Percentage | 0.00% |
| 11 | Scientific | 0.00E+00 |
| 12 | Fraction | # ?/? |
| 13 | Fraction | # ??/?? |
| 14 | Date | m/d/yyyy |
| 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 | Time | m/d/yyyy 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 | Accounting | _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_) |
| 42 | Currency | _($* #,##0_);_($* (#,##0);_($* "-"_);_(@_) |
| 43 | Accounting | _(* #,##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 | @ |
public java.lang.String getCustom()
public void setCustom(java.lang.String value)
public boolean isLocked()
public void setLocked(boolean value)
public void copyFrom(WebStyle s)
s - another style objectpublic void mergeWith(WebStyle s)
s - another style objectprotected boolean isEmptyX()
public boolean getQuotePrefix()
public void setQuotePrefix(boolean value)
public int hashCode()
hashCode in class java.lang.ObjectSee Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.