|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjaxcent.JaxcentObject
jaxcent.JaxcentHtmlElement
jaxcent.HtmlTable
The class HtmlTable corresponds to TABLE tags on the page.
Constructor Summary | |
HtmlTable(JaxcentPage page,
SearchType searchType,
java.lang.String str)
Search for HTML element on page by specified search type and search string. |
|
HtmlTable(JaxcentPage page,
SearchType searchType,
java.lang.String[] attributes,
java.lang.String[] values)
Create new HTML element on page using the specified attributes and values. |
|
HtmlTable(JaxcentPage page,
SearchType searchType,
java.lang.String str,
int index)
Search for HTML Element on page by specified search type and search string, and search index. |
|
HtmlTable(JaxcentPage page,
SearchType searchType,
java.lang.String tag,
java.lang.String text)
Create new HTML Element on page using the specified tag. |
|
HtmlTable(JaxcentPage page,
SearchType searchType,
java.lang.String text,
java.lang.String[] attributes,
java.lang.String[] values)
Create new HTML element on page using the specified text and attributes and values. |
|
HtmlTable(JaxcentPage page,
java.lang.String id)
Search for HTML element on page by specified ID |
Method Summary | |
void |
addDeleteButtons(int firstRow,
int lastRow,
java.lang.String buttonHtml,
java.lang.String buttonStyles)
Add Delete button(s) to table rows. |
void |
deleteAllRows()
Remove all Rows. |
void |
deleteFromBottom(int n)
Remove N rows from bottom. |
void |
deleteFromTop(int n)
Remove N rows from top. |
void |
deleteRow(int index)
Delete the row at the specified index. |
void |
disableCellEditing(int firstRow,
int firstCol,
int lastRow,
int lastCol)
Disable table cells in-place editing. |
void |
enableCellEditing(int firstRow,
int firstCol,
int lastRow,
int lastCol,
boolean doubleClick,
boolean allowHtmlInput,
java.lang.String editorStyles)
Make table cells editable in-place. |
int |
getBorder()
Retrieve the "border" property |
java.lang.String |
getCaption()
Retrieve the "caption" property |
java.lang.String |
getCellContent(int rowIndex,
int cellIndex)
Retrieve HTML content of a cell. |
int |
getCellPadding()
Retrieve the "cellPadding" property |
int |
getCellSpacing()
Retrieve the "cellSpacing" property |
java.lang.String |
getFrame()
Retrieve the "frame" property |
int |
getNumRows()
Returns the number of rows in the table. |
HtmlTableRow |
getRow(int index)
Return the row at the specified index. |
java.lang.String[] |
getRowContent(int rowIndex,
int cellIndex,
int numCells)
Retrieve HTML content of a row, starting at a given cellIndex and for a given number of cells. |
java.lang.String |
getRules()
Retrieve the "rules" property |
java.lang.String[][] |
getTableContent(int rowIndex,
int cellIndex,
int numRows,
int[] numCells)
Retrieve HTML content of multiple rows, starting at a given cellIndex and for the specified number of cells from each row. |
java.lang.String |
getWidth()
Retrieve the "width" property |
void |
includeInFormData(java.lang.String saveKeyName)
Mark table for its data being sent along with form data. |
HtmlTableRow |
insertRow(int index,
java.lang.String[] innerHTML)
Insert a row in the table at the specified index. |
HtmlTableRow |
insertRow(int index,
java.lang.String[] innerHTML,
java.lang.String[][] attributes,
java.lang.String[][] values)
Insert a row in the table at the specified index, and set attributes of each new cell as specified. |
protected void |
onBlur()
Override to handle the "blur" event |
protected void |
onCellEdited(int rowIndex,
int cellIndex,
java.lang.String oldContent,
java.lang.String newContent)
Override to handle cell in-place editing. |
protected void |
onClick()
Override to handle the "click" event |
protected void |
onFocus()
Override to handle the "focus" event |
protected void |
onMouseDown()
Override to handle the "mouseDown" event |
protected void |
onMouseUp()
Override to handle the "mouseUp" event |
protected void |
onRowDeleted(int rowIndex)
Override to handle row deletion. |
void |
setBorder(int value)
Set the "border" property |
void |
setCaption(java.lang.String value)
Set the "caption" property |
void |
setCellContent(int rowIndex,
int cellIndex,
java.lang.String html)
Set HTML content of a cell. |
void |
setCellPadding(int value)
Set the "cellPadding" property |
void |
setCellSpacing(int value)
Set the "cellSpacing" property |
void |
setCellStyles(int firstRow,
int firstCol,
int lastRow,
int lastCol,
java.lang.String cellStyleAttributes)
Set cell STYLE attributes of specified cells. |
void |
setFrame(java.lang.String value)
Set the "frame" property |
void |
setRowContent(int rowIndex,
int firstCellIndex,
java.lang.String[] html)
Replace HTML content of a row, starting at a given cell index. |
void |
setRules(java.lang.String value)
Set the "rules" property |
void |
setTableContent(int firstRowIndex,
int firstCellIndex,
java.lang.String[][] html)
Replace HTML content of table, starting at a given row/cell index. |
void |
setWidth(java.lang.String value)
Set the "width" property |
void |
startCellEdit(int rowIndex,
int cellIndex)
If cell in-place editing has been enabled on a cell, start in-place cell editing programmatically (instead of upon user click or double-click.) |
Methods inherited from class jaxcent.JaxcentHtmlElement |
checkNodeExists, deleteElement, getAttribute, getID, getInnerText, getStyle, getTag, hide, insertAfter, insertAtBeginning, insertAtBeginning, insertAtEnd, insertAtEnd, insertBefore, onDragDrop, setAttribute, setCssClass, setDraggable, setEnabled, setInnerText, setStyle, setStyle, setStyle, setStyle, setVisible, show |
Methods inherited from class jaxcent.JaxcentObject |
addJavaScriptVerification, getId, getProperty, getSelectedIndex, getSelectedValue, setId, setProperty, setProperty, setProperty, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HtmlTable(JaxcentPage page, java.lang.String id)
public HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String str)
public HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String str, int index)
public HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String tag, java.lang.String text) throws Jaxception
public HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String[] attributes, java.lang.String[] values) throws Jaxception
public HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String text, java.lang.String[] attributes, java.lang.String[] values) throws Jaxception
Method Detail |
protected void onCellEdited(int rowIndex, int cellIndex, java.lang.String oldContent, java.lang.String newContent)
enableCellEditing(int, int, int, int, boolean, boolean, java.lang.String)
protected void onRowDeleted(int rowIndex)
addDeleteButtons(int, int, java.lang.String, java.lang.String)
protected void onClick()
protected void onMouseDown()
protected void onMouseUp()
protected void onFocus()
protected void onBlur()
public int getNumRows() throws Jaxception
Jaxception
public HtmlTableRow getRow(int index) throws Jaxception
Jaxception
public void deleteRow(int index) throws Jaxception
Jaxception
public HtmlTableRow insertRow(int index, java.lang.String[] innerHTML) throws Jaxception
Jaxception
public HtmlTableRow insertRow(int index, java.lang.String[] innerHTML, java.lang.String[][] attributes, java.lang.String[][] values) throws Jaxception
Jaxception
public void deleteAllRows() throws Jaxception
Jaxception
public void deleteFromTop(int n) throws Jaxception
Jaxception
public void deleteFromBottom(int n) throws Jaxception
Jaxception
public void enableCellEditing(int firstRow, int firstCol, int lastRow, int lastCol, boolean doubleClick, boolean allowHtmlInput, java.lang.String editorStyles) throws Jaxception
onCellEdited
method.
firstRow
- First row where cells are to be made editable. (0-based. -1 means last row.)firstCol
- First column where cells are to be made editable. (0-based. -1 means last cell.)lastRow
- Last row where cells are to be made editable. (0-based. -1 means last row.)lastCol
- Last column where cells are to be made editable. (0-based. -1 means last cell.)doubleClick
- False to enable editing on single-click, true to enable editing on double-clicks.allowHtmlInput
- If true, user can enter HTML input, e.g. <B>user-input</B>
to enter bold text. If false, any < > & characters will be converted to escaped sequences.editorStyles
- Style attributes to be used on the editor. If null
or empty, default of "border: 1px solid lightblue; backbround-color: lightyellow;
" will be used.
Jaxception
onCellEdited(int, int, java.lang.String, java.lang.String)
public void disableCellEditing(int firstRow, int firstCol, int lastRow, int lastCol) throws Jaxception
Jaxception
public void addDeleteButtons(int firstRow, int lastRow, java.lang.String buttonHtml, java.lang.String buttonStyles) throws Jaxception
Delete
button(s) to table rows. Row deletes can be detected by
overriding the onRowDeleted
method.
firstRow
- First row to add a delete button. (0-based. -1 means last row.)lastRow
- Last row to add a delete button. (0-based. -1 means last row.)buttonHtml
- Text on the button. Can contain HTML markup. If null
or empty, defaults to "Delete
".buttonStyles
- Style attributes to be used on the button. For instance, "color: red; font-size: 8px;"
If null
or empty, button is created with standard attributes.
Jaxception
onRowDeleted(int)
public void setCellContent(int rowIndex, int cellIndex, java.lang.String html) throws Jaxception
Jaxception
public void setRowContent(int rowIndex, int firstCellIndex, java.lang.String[] html) throws Jaxception
Jaxception
public void setTableContent(int firstRowIndex, int firstCellIndex, java.lang.String[][] html) throws Jaxception
Jaxception
public void setCellStyles(int firstRow, int firstCol, int lastRow, int lastCol, java.lang.String cellStyleAttributes) throws Jaxception
Jaxception
public java.lang.String getCellContent(int rowIndex, int cellIndex) throws Jaxception
Jaxception
public java.lang.String[] getRowContent(int rowIndex, int cellIndex, int numCells) throws Jaxception
Jaxception
public java.lang.String[][] getTableContent(int rowIndex, int cellIndex, int numRows, int[] numCells) throws Jaxception
Jaxception
public void startCellEdit(int rowIndex, int cellIndex) throws Jaxception
Jaxception
public void includeInFormData(java.lang.String saveKeyName)
The data will also be saved in the session, if auto-session-data is set. However, the "includeInFormData" setting will not be saved and the table will not be automatically populated at next visit. Resetting the "includeInFormData" setting, as well as populating the table from the session, can be done in the page constructor.
public void setBorder(int value) throws Jaxception
Jaxception
public int getBorder() throws Jaxception
Jaxception
public void setCaption(java.lang.String value) throws Jaxception
Jaxception
public java.lang.String getCaption() throws Jaxception
Jaxception
public void setCellPadding(int value) throws Jaxception
Jaxception
public int getCellPadding() throws Jaxception
Jaxception
public void setCellSpacing(int value) throws Jaxception
Jaxception
public int getCellSpacing() throws Jaxception
Jaxception
public void setFrame(java.lang.String value) throws Jaxception
Jaxception
public java.lang.String getFrame() throws Jaxception
Jaxception
public void setRules(java.lang.String value) throws Jaxception
Jaxception
public java.lang.String getRules() throws Jaxception
Jaxception
public void setWidth(java.lang.String value) throws Jaxception
Jaxception
public java.lang.String getWidth() throws Jaxception
Jaxception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |