GridTableItemStyle
Inheritance: java.lang.Object, com.aspose.gridweb.WebStyle, com.aspose.gridweb.WebTableItemStyle
public class GridTableItemStyle extends WebTableItemStyle
Inherited from System.Web.UI.WebControls.TableItemStyle. Encapsulates the styles of a WebCell.
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);
Constructors
Constructor | Description |
---|---|
GridTableItemStyle() | Default constructor. |
Methods
Method | Description |
---|---|
copyFrom(WebStyle s) | Copies from another style object. |
equals(Object arg0) | |
getBackColor() | Gets the BackColor in the style |
getBackImageAttributes() | Background image attributes. |
getBackImageUrl() | Background image url. |
getBorderColor() | Gets the BorderColor in the style |
getBorderStyle() | Gets the BorderStyle in the style |
getBorderWidth() | Gets the BorderWidth in the style |
getBottomBorderStyle() | Specifies the style of the cell’s bottom border. |
getClass() | |
getCssClass() | Gets the CssClass in the style |
getCustom() | Gets the custom format, null or empty string means no custom format. |
getFont() | Gets the Font in the style |
getForeColor() | Gets the ForeColor in the style |
getHeight() | Gets the Height in the style |
getHorizontalAlign() | Gets the HorizontalAlign in the style |
getIndentLevel() | Gets indent level. |
getLeftBorderStyle() | Specifies the style of the cell’s left border. |
getNumberType() | Gets the display format of numbers and dates. |
getQuotePrefix() | Indicates whether the cell’s value starts with single quote mark. |
getRightBorderStyle() | Specifies the style of the cell’s right border. |
getRotationAngle() | Gets Rotation attribute. |
getTopBorderStyle() | Specifies the style of the cell’s top border. |
getVerticalAlign() | Gets the VerticalAlign in the style |
getWidth() | Gets the Width in the style |
getWrap() | Gets the Wrap in the style |
hashCode() | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
isLocked() | Gets a value indicating whether a cell can be modified or not when its worksheet is protected. |
mergeWith(WebStyle s) | Merges with another style object. |
notify() | |
notifyAll() | |
setBackColor(Color value) | Sets the BackColor in the style |
setBackImageAttributes(String value) | Background image attributes. |
setBackImageUrl(String value) | Background image url. |
setBorderColor(Color value) | Sets the BorderColor in the style |
setBorderStyle(int value) | Sets the BorderStyle in the style |
setBorderWidth(Unit value) | Sets the BorderWidth in the style |
setBottomBorderStyle(WebBorderStyle value) | Specifies the style of the cell’s bottom border. |
setCssClass(String value) | Sets the CssClass in the style |
setCustom(String value) | Sets the custom format, null or empty string means no custom format. |
setForeColor(Color value) | Sets the ForeColor in the style |
setHeight(Unit value) | Sets the Height in the style |
setHorizontalAlign(int value) | Sets the HorizontalAlign in the style |
setIndentLevel(int value) | Sets indent level. |
setLeftBorderStyle(WebBorderStyle value) | Specifies the style of the cell’s left border. |
setLocked(boolean value) | Sets a value indicating whether a cell can be modified or not when its worksheet is protected. |
setNumberType(int value) | Sets the display format of numbers and dates. |
setQuotePrefix(boolean value) | Indicates whether the cell’s value starts with single quote mark. |
setRightBorderStyle(WebBorderStyle value) | Specifies the style of the cell’s right border. |
setRotationAngle(short value) | Sets Rotation attribute. |
setTopBorderStyle(WebBorderStyle value) | Specifies the style of the cell’s top border. |
setVerticalAlign(int value) | Sets the VerticalAlign in the style |
setWidth(Unit value) | Sets the Width in the style |
setWrap(boolean value) | Sets the Wrap in the style |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
GridTableItemStyle()
public GridTableItemStyle()
Default constructor.
copyFrom(WebStyle s)
public void copyFrom(WebStyle s)
Copies from another style object.
Parameters:
Parameter | Type | Description |
---|---|---|
s | WebStyle | another style object |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getBackColor()
public Color getBackColor()
Gets the BackColor in the style
Returns: Color
getBackImageAttributes()
public String getBackImageAttributes()
Background image attributes.
Returns: java.lang.String
getBackImageUrl()
public String getBackImageUrl()
Background image url.
Returns: java.lang.String
getBorderColor()
public Color getBorderColor()
Gets the BorderColor in the style
Returns: Color
getBorderStyle()
public int getBorderStyle()
Gets the BorderStyle in the style
See BorderStyle.
Returns: int
getBorderWidth()
public Unit getBorderWidth()
Gets the BorderWidth in the style
Returns: Unit
getBottomBorderStyle()
public WebBorderStyle getBottomBorderStyle()
Specifies the style of the cell’s bottom border.
Returns: WebBorderStyle
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getCssClass()
public String getCssClass()
Gets the CssClass in the style
Returns: java.lang.String
getCustom()
public String getCustom()
Gets the custom format, null or empty string means no custom format.
Returns: java.lang.String
getFont()
public FontInfo getFont()
Gets the Font in the style
Returns: FontInfo
getForeColor()
public Color getForeColor()
Gets the ForeColor in the style
Returns: Color
getHeight()
public Unit getHeight()
Gets the Height in the style
Returns: Unit
getHorizontalAlign()
public int getHorizontalAlign()
Gets the HorizontalAlign in the style
See HorizontalAlign.
Returns: int
getIndentLevel()
public int getIndentLevel()
Gets indent level.
Remarks
Returns: int
getLeftBorderStyle()
public WebBorderStyle getLeftBorderStyle()
Specifies the style of the cell’s left border.
Returns: WebBorderStyle
getNumberType()
public int getNumberType()
Gets the display format of numbers and dates. The formatting patterns are different for different regions.
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 | @ |
Returns: int
getQuotePrefix()
public boolean getQuotePrefix()
Indicates whether the cell’s value starts with single quote mark.
Returns: boolean
getRightBorderStyle()
public WebBorderStyle getRightBorderStyle()
Specifies the style of the cell’s right border.
Returns: WebBorderStyle
getRotationAngle()
public short getRotationAngle()
Gets Rotation attribute.
Remarks
0: Not rotated.
255: Top to Bottom.
-90: Downward.
90: Upward.
You can set 255 or value ranged from -90 to 90.
Returns: short
getTopBorderStyle()
public WebBorderStyle getTopBorderStyle()
Specifies the style of the cell’s top border.
Returns: WebBorderStyle
getVerticalAlign()
public int getVerticalAlign()
Gets the VerticalAlign in the style
See VerticalAlign.
Returns: int
getWidth()
public Unit getWidth()
Gets the Width in the style
Returns: Unit
getWrap()
public boolean getWrap()
Gets the Wrap in the style
Returns: boolean
hashCode()
public int hashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
Returns: int - A hash code for the current Style.
isLocked()
public boolean isLocked()
Gets a value indicating whether a cell can be modified or not when its worksheet is protected. When its worksheet is protected and IsLocked is true, the cell can not be edit. When its worksheet is protected and IsLocked is false, the cell can be edit.
Returns: boolean
mergeWith(WebStyle s)
public void mergeWith(WebStyle s)
Merges with another style object.
Parameters:
Parameter | Type | Description |
---|---|---|
s | WebStyle | another style object |
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setBackColor(Color value)
public void setBackColor(Color value)
Sets the BackColor in the style
Parameters:
Parameter | Type | Description |
---|---|---|
value | Color |
setBackImageAttributes(String value)
public void setBackImageAttributes(String value)
Background image attributes.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setBackImageUrl(String value)
public void setBackImageUrl(String value)
Background image url.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setBorderColor(Color value)
public void setBorderColor(Color value)
Sets the BorderColor in the style
Parameters:
Parameter | Type | Description |
---|---|---|
value | Color |
setBorderStyle(int value)
public void setBorderStyle(int value)
Sets the BorderStyle in the style
See BorderStyle.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setBorderWidth(Unit value)
public void setBorderWidth(Unit value)
Sets the BorderWidth in the style
Parameters:
Parameter | Type | Description |
---|---|---|
value | Unit |
setBottomBorderStyle(WebBorderStyle value)
public void setBottomBorderStyle(WebBorderStyle value)
Specifies the style of the cell’s bottom border.
Parameters:
Parameter | Type | Description |
---|---|---|
value | WebBorderStyle |
setCssClass(String value)
public void setCssClass(String value)
Sets the CssClass in the style
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setCustom(String value)
public void setCustom(String value)
Sets the custom format, null or empty string means no custom format.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setForeColor(Color value)
public void setForeColor(Color value)
Sets the ForeColor in the style
Parameters:
Parameter | Type | Description |
---|---|---|
value | Color |
setHeight(Unit value)
public void setHeight(Unit value)
Sets the Height in the style
Parameters:
Parameter | Type | Description |
---|---|---|
value | Unit |
setHorizontalAlign(int value)
public void setHorizontalAlign(int value)
Sets the HorizontalAlign in the style
See HorizontalAlign.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setIndentLevel(int value)
public void setIndentLevel(int value)
Sets indent level.
Remarks
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setLeftBorderStyle(WebBorderStyle value)
public void setLeftBorderStyle(WebBorderStyle value)
Specifies the style of the cell’s left border.
Parameters:
Parameter | Type | Description |
---|---|---|
value | WebBorderStyle |
setLocked(boolean value)
public void setLocked(boolean value)
Sets a value indicating whether a cell can be modified or not when its worksheet is protected. When its worksheet is protected and IsLocked is true, the cell can not be edit. When its worksheet is protected and IsLocked is false, the cell can be edit.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setNumberType(int value)
public void setNumberType(int value)
Sets the display format of numbers and dates. The formatting patterns are different for different regions.
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 | @ |
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setQuotePrefix(boolean value)
public void setQuotePrefix(boolean value)
Indicates whether the cell’s value starts with single quote mark.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setRightBorderStyle(WebBorderStyle value)
public void setRightBorderStyle(WebBorderStyle value)
Specifies the style of the cell’s right border.
Parameters:
Parameter | Type | Description |
---|---|---|
value | WebBorderStyle |
setRotationAngle(short value)
public void setRotationAngle(short value)
Sets Rotation attribute.
Remarks
0: Not rotated.
255: Top to Bottom.
-90: Downward.
90: Upward.
You can set 255 or value ranged from -90 to 90.
Parameters:
Parameter | Type | Description |
---|---|---|
value | short |
setTopBorderStyle(WebBorderStyle value)
public void setTopBorderStyle(WebBorderStyle value)
Specifies the style of the cell’s top border.
Parameters:
Parameter | Type | Description |
---|---|---|
value | WebBorderStyle |
setVerticalAlign(int value)
public void setVerticalAlign(int value)
Sets the VerticalAlign in the style
See VerticalAlign.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setWidth(Unit value)
public void setWidth(Unit value)
Sets the Width in the style
Parameters:
Parameter | Type | Description |
---|---|---|
value | Unit |
setWrap(boolean value)
public void setWrap(boolean value)
Sets the Wrap in the style
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |