WorksheetDesign
Inheritance: java.lang.Object, com.aspose.gridweb.Control, com.aspose.gridweb.WebWorksheet
public class WorksheetDesign extends WebWorksheet
Inherited from WebWorksheet. Used in design-time only.
Constructors
Constructor | Description |
---|---|
WorksheetDesign() | Default constructor. |
WorksheetDesign(MainWeb mw, GridWorksheet gwk) | the constructor with MainWeb and GridWorksheet |
Methods
Method | Description |
---|---|
autoFitColumn(int columnIndex) | Autofits the column width. |
autoFitColumn(int columnIndex, int startRow, int endRow) | Autofits the column width. |
cancelNewBindRow() | Cancels and deletes the new added bind row. |
commitNewBindRow() | Commits the new added bind row and add it to the datasource. |
copy(WebWorksheet source) | Copies from another worksheet object. |
createAutoGenratedColumns() | After setting a datasource for the worksheet, call this method to generate the bind columns automatically. |
createNewBindRow() | Creates a new bind row and bind to the datasource. |
createSubtotal(int columnNameRowIndex, int dataRows, int groupByColumnIndex, int subtotalFunction, int[] subtotalColumnIndexList, String functionLabel, GridTableItemStyle grandCellStyle, GridTableItemStyle subtotalCellStyle, int numberType, String customString) | Creates subtotal in the sheet. |
dataBind() | Bind the sheet to the DataSource. |
deleteBindRow(int rowNum) | Deletes a bind row. |
equals(Object arg0) | |
freezePanes(int row, int column, int freezedRows, int freezedColumns) | Freezes panes at the specified cell in the worksheet. |
getBindStartColumn() | In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource. |
getBindStartRow() | In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource. |
getBindingSource() | The actually binding datasource object at run-time. |
getClass() | |
getCurrentBindRows() | Gets the binding rows number in data-binding mode. |
getDataMember() | Gets the DataMember from the multi-member DataSource. |
getDataSource() | Gets the DataSource. |
getEnableCreateBindColumnHeader() | In data-binding mode, indicates whether to create bind column header captions in the sheet. |
getIndex() | Gets the index of itself within the worksheets. |
getName() | Gets the name of the sheet. |
getUniqueID() | Gets the UniqueID in the Control |
getValidations() | Gets the data validation setting collection in the worksheet. |
getVisible() | Indicates whether this sheet’s name is shown in the sheet tabs of the control. |
groupRows(int firstIndex, int lastIndex) | Groups rows. |
groupRows(int firstIndex, int lastIndex, boolean isHidden) | Groups rows. |
hashCode() | |
isProtected() | Gets whether the worksheet is protected. |
notify() | |
notifyAll() | |
setAllCellsEditable() | Makes all cells editable.this is extended attribute |
setAllCellsReadonly() | Makes all cells readonly.this is extended attribute notice this attribute can not keep in actual cell,if you want to keep protect please use setProtect |
setBindStartColumn(int value) | In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource. |
setBindStartRow(int value) | In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource. |
setCurrentBindRows(int value) | Gets the binding rows number in data-binding mode. |
setDataMember(String value) | Sets the DataMember from the multi-member DataSource. |
setDataSource(Object value) | Sets the DataSource. |
setEditableRange(int startRow, int startColumn, int rows, int columns) | Makes a range of cells editable. http://docs.aspose.com:8082/docs/display/cellsnet/Protecting+Cells Make all cells read only by calling the SetAllCellsReadonly method. |
setEnableCreateBindColumnHeader(boolean value) | In data-binding mode, indicates whether to create bind column header captions in the sheet. |
setName(String value) | Sets the name of the sheet. |
setProtected(boolean value) | Sets whether the worksheet is protected. |
setReadonlyRange(int startRow, int startColumn, int rows, int columns) | Makes a range of cells readonly. http://docs.aspose.com:8082/docs/display/cellsnet/Protecting+Cells First make all cells editable by calling the SetAllCellsEditable method. |
setVisible(boolean value) | Indicates whether this sheet’s name is shown in the sheet tabs of the control. |
toString() | |
unfreezePanes() | Unfreezes panes in the worksheet. |
ungroupRows(int firstIndex, int lastIndex) | Ungroups rows. |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
WorksheetDesign()
public WorksheetDesign()
Default constructor.
WorksheetDesign(MainWeb mw, GridWorksheet gwk)
public WorksheetDesign(MainWeb mw, GridWorksheet gwk)
the constructor with MainWeb and GridWorksheet
Parameters:
Parameter | Type | Description |
---|---|---|
mw | MainWeb | |
gwk | GridWorksheet |
autoFitColumn(int columnIndex)
public void autoFitColumn(int columnIndex)
Autofits the column width.
Remarks
AutoFitColumn is an imprecise function.
Parameters:
Parameter | Type | Description |
---|---|---|
columnIndex | int | Column index. |
autoFitColumn(int columnIndex, int startRow, int endRow)
public void autoFitColumn(int columnIndex, int startRow, int endRow)
Autofits the column width. This method autofits a column based on content in a range of cells within the column from startRow to endRow. AutoFitColumn is an imprecise function.
Parameters:
Parameter | Type | Description |
---|---|---|
columnIndex | int | column index, zero based |
startRow | int | start row index, zero based |
endRow | int | end row index, zero based |
cancelNewBindRow()
public int cancelNewBindRow()
Cancels and deletes the new added bind row.
Returns: int - The row index. If there is no new created bind row, returns -1.
commitNewBindRow()
public int commitNewBindRow()
Commits the new added bind row and add it to the datasource.
Returns: int - The row index of the new row. If no row is created, returns -1.
copy(WebWorksheet source)
public void copy(WebWorksheet source)
Copies from another worksheet object.
Parameters:
Parameter | Type | Description |
---|---|---|
source | WebWorksheet | The other sheet. |
createAutoGenratedColumns()
public void createAutoGenratedColumns()
After setting a datasource for the worksheet, call this method to generate the bind columns automatically.
createNewBindRow()
public int createNewBindRow()
Creates a new bind row and bind to the datasource.
Returns: int - The row index of the new row. If no row is created, returns -1.
createSubtotal(int columnNameRowIndex, int dataRows, int groupByColumnIndex, int subtotalFunction, int[] subtotalColumnIndexList, String functionLabel, GridTableItemStyle grandCellStyle, GridTableItemStyle subtotalCellStyle, int numberType, String customString)
public void createSubtotal(int columnNameRowIndex, int dataRows, int groupByColumnIndex, int subtotalFunction, int[] subtotalColumnIndexList, String functionLabel, GridTableItemStyle grandCellStyle, GridTableItemStyle subtotalCellStyle, int numberType, String customString)
Creates subtotal in the sheet.
Parameters:
Parameter | Type | Description |
---|---|---|
columnNameRowIndex | int | The row index of the column name row. |
dataRows | int | The number of the data rows. |
groupByColumnIndex | int | The column index of the column to be grouped. |
subtotalFunction | int | SubtotalFunction. The subtotal function type. |
subtotalColumnIndexList | int[] | The column indexes to be subtotaled. |
functionLabel | java.lang.String | The label of subtotal function. |
grandCellStyle | GridTableItemStyle | The style of the grand total line. |
subtotalCellStyle | GridTableItemStyle | The style of the subtotal line. |
numberType | int | NumberType. The number type of the subtotal result cells. |
customString | java.lang.String | The custome format string of the subtotal result cells. Can be null. |
dataBind()
public void dataBind()
Bind the sheet to the DataSource.
deleteBindRow(int rowNum)
public int deleteBindRow(int rowNum)
Deletes a bind row.
Parameters:
Parameter | Type | Description |
---|---|---|
rowNum | int | The row index. |
Returns: int - The deleted row index. If no bind row is deleted, returns -1.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
freezePanes(int row, int column, int freezedRows, int freezedColumns)
public void freezePanes(int row, int column, int freezedRows, int freezedColumns)
Freezes panes at the specified cell in the worksheet.
Remarks
Row index and column index cannot all be zero. Number of rows and number of columns also cannot all be zero.
The first two parameters specify the freezed position and the last two parameters specify the area freezed on the left top pane.
Parameters:
Parameter | Type | Description |
---|---|---|
row | int | Row index. |
column | int | Column index. |
freezedRows | int | Number of visible rows in top pane, no more than row index. |
freezedColumns | int | Number of visible columns in left pane, no more than column index. |
getBindStartColumn()
public int getBindStartColumn()
In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.
Returns: int
getBindStartRow()
public int getBindStartRow()
In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.
Returns: int
getBindingSource()
public Iterable getBindingSource()
The actually binding datasource object at run-time. It is a DataView object when the DataSource property is a DataSet, DataTable or DataView object.
Returns: java.lang.Iterable
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getCurrentBindRows()
public int getCurrentBindRows()
Gets the binding rows number in data-binding mode.
Returns: int
getDataMember()
public String getDataMember()
Gets the DataMember from the multi-member DataSource. Generally it represents a DataTable object of a DataSet.
Returns: java.lang.String
getDataSource()
public Object getDataSource()
Gets the DataSource. Generally it’s a DataSet object.
Returns: java.lang.Object
getEnableCreateBindColumnHeader()
public boolean getEnableCreateBindColumnHeader()
In data-binding mode, indicates whether to create bind column header captions in the sheet.
Returns: boolean
getIndex()
public int getIndex()
Gets the index of itself within the worksheets.
Returns: int
getName()
public String getName()
Gets the name of the sheet.
Returns: java.lang.String
getUniqueID()
public String getUniqueID()
Gets the UniqueID in the Control
Returns: java.lang.String
getValidations()
public GridValidationCollection getValidations()
Gets the data validation setting collection in the worksheet.
Returns: GridValidationCollection
getVisible()
public boolean getVisible()
Indicates whether this sheet’s name is shown in the sheet tabs of the control.
Returns: boolean
groupRows(int firstIndex, int lastIndex)
public void groupRows(int firstIndex, int lastIndex)
Groups rows.
Parameters:
Parameter | Type | Description |
---|---|---|
firstIndex | int | The first row index to be grouped. |
lastIndex | int | The last row index to be grouped. |
groupRows(int firstIndex, int lastIndex, boolean isHidden)
public void groupRows(int firstIndex, int lastIndex, boolean isHidden)
Groups rows.
Parameters:
Parameter | Type | Description |
---|---|---|
firstIndex | int | The first row index to be grouped. |
lastIndex | int | The last row index to be grouped. |
isHidden | boolean | Specifies if the grouped rows are hidden. |
hashCode()
public native int hashCode()
Returns: int
isProtected()
public boolean isProtected()
Gets whether the worksheet is protected. When a worksheet is protected, all the cells can not be edit except the cell whose IsLocked property is false.
Returns: boolean
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setAllCellsEditable()
public void setAllCellsEditable()
Makes all cells editable.this is extended attribute
setAllCellsReadonly()
public void setAllCellsReadonly()
Makes all cells readonly.this is extended attribute notice this attribute can not keep in actual cell,if you want to keep protect please use setProtect
setBindStartColumn(int value)
public void setBindStartColumn(int value)
In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setBindStartRow(int value)
public void setBindStartRow(int value)
In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setCurrentBindRows(int value)
public void setCurrentBindRows(int value)
Gets the binding rows number in data-binding mode.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setDataMember(String value)
public void setDataMember(String value)
Sets the DataMember from the multi-member DataSource. Generally it represents a DataTable object of a DataSet.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setDataSource(Object value)
public void setDataSource(Object value)
Sets the DataSource. Generally it’s a DataSet object.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.Object |
setEditableRange(int startRow, int startColumn, int rows, int columns)
public void setEditableRange(int startRow, int startColumn, int rows, int columns)
Makes a range of cells editable. http://docs.aspose.com:8082/docs/display/cellsnet/Protecting+Cells Make all cells read only by calling the SetAllCellsReadonly method. then call this method to Specify the range of cells that to be editable
Parameters:
Parameter | Type | Description |
---|---|---|
startRow | int | The start row of the range. |
startColumn | int | The start column of the range. |
rows | int | The number of the rows. |
columns | int | The number of the columns. |
setEnableCreateBindColumnHeader(boolean value)
public void setEnableCreateBindColumnHeader(boolean value)
In data-binding mode, indicates whether to create bind column header captions in the sheet.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setName(String value)
public void setName(String value)
Sets the name of the sheet.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setProtected(boolean value)
public void setProtected(boolean value)
Sets whether the worksheet is protected. When a worksheet is protected, all the cells can not be edit except the cell whose IsLocked property is false.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setReadonlyRange(int startRow, int startColumn, int rows, int columns)
public void setReadonlyRange(int startRow, int startColumn, int rows, int columns)
Makes a range of cells readonly. http://docs.aspose.com:8082/docs/display/cellsnet/Protecting+Cells First make all cells editable by calling the SetAllCellsEditable method. then call this method to Specify the range of cells that to be readonly
Parameters:
Parameter | Type | Description |
---|---|---|
startRow | int | The start row of the range. |
startColumn | int | The start column of the range. |
rows | int | The number of the rows. |
columns | int | The number of the columns. |
setVisible(boolean value)
public void setVisible(boolean value)
Indicates whether this sheet’s name is shown in the sheet tabs of the control.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
toString()
public String toString()
Returns: java.lang.String
unfreezePanes()
public void unfreezePanes()
Unfreezes panes in the worksheet.
ungroupRows(int firstIndex, int lastIndex)
public void ungroupRows(int firstIndex, int lastIndex)
Ungroups rows.
Remarks
Only removes outter group info.
Parameters:
Parameter | Type | Description |
---|---|---|
firstIndex | int | The first row index to be ungrouped. |
lastIndex | int | The last row index to be ungrouped. |
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 |