public final class TableUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BODY_NODENAME
HTML tag defining the root node of the area being edited.
|
static String |
CELL_DEFAULTHTML
HTML to be inserted in newly created table cells.
|
static String |
COL_HNODENAME
HTML tag defining a table heading cell.
|
static String |
COL_NODENAME
HTML tag defining a table cell.
|
static String |
ROW_NODENAME
HTML tag defining a table row.
|
static String |
TABLE_NODENAME
HTML tag defining a table.
|
static String |
TBODY_NODENAME
HTML tag defining a table body.
|
| Constructor and Description |
|---|
TableUtils() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.dom.client.Node |
getCaretNode(Document doc)
Get the node in which the caret is currently positioned.
|
com.google.gwt.dom.client.TableCellElement |
getCell(com.google.gwt.dom.client.Node node)
Browse node ancestors and return the first table cell element (TD or TH).
|
static TableUtils |
getInstance()
Get the instance in use.
|
com.google.gwt.dom.client.TableCellElement |
getNextCellInColumn(com.google.gwt.dom.client.TableCellElement cell)
Get next cell in cell's column.
|
com.google.gwt.dom.client.TableCellElement |
getNextCellInRow(com.google.gwt.dom.client.TableCellElement cell)
Get next cell in cell's row.
|
com.google.gwt.dom.client.TableCellElement |
getPreviousCellInColumn(com.google.gwt.dom.client.TableCellElement cell)
Get previous cell in cell's column.
|
com.google.gwt.dom.client.TableCellElement |
getPreviousCellInRow(com.google.gwt.dom.client.TableCellElement cell)
Get previous cell in cell's row.
|
Range |
getRange(Document doc)
Inspect a Document to get the currently selected Range.
|
com.google.gwt.dom.client.TableRowElement |
getRow(com.google.gwt.dom.client.Node node)
Browse node ancestors and return the first table row element.
|
com.google.gwt.dom.client.TableElement |
getTable(com.google.gwt.dom.client.Node node)
Browse node ancestors and return the first table element.
|
void |
insertCol(Document doc,
boolean insertBefore)
Insert a column in the currently edited table.
|
com.google.gwt.dom.client.TableRowElement |
insertRow(Document doc,
boolean insertBefore)
Insert a row in the currently edited table.
|
boolean |
isHeaderRow(com.google.gwt.dom.client.TableRowElement row)
Determine if the row is a header row.
|
void |
putCaretInNode(RichTextArea rta,
com.google.gwt.dom.client.Node node)
Put caret in the given HTML node.
|
public static final String BODY_NODENAME
public static final String TABLE_NODENAME
public static final String TBODY_NODENAME
public static final String ROW_NODENAME
public static final String COL_NODENAME
public static final String COL_HNODENAME
public static final String CELL_DEFAULTHTML
public static TableUtils getInstance()
public Range getRange(Document doc)
doc - Document to inspect.public com.google.gwt.dom.client.Node getCaretNode(Document doc)
doc - Document to get the caret from.public void putCaretInNode(RichTextArea rta, com.google.gwt.dom.client.Node node)
rta - wysiwyg RichTextAreanode - the node to put the caret in.public com.google.gwt.dom.client.TableElement getTable(com.google.gwt.dom.client.Node node)
node - the Node to inspect.public com.google.gwt.dom.client.TableRowElement getRow(com.google.gwt.dom.client.Node node)
node - the Node to inspect.public boolean isHeaderRow(com.google.gwt.dom.client.TableRowElement row)
row - the row to inspect.public com.google.gwt.dom.client.TableCellElement getCell(com.google.gwt.dom.client.Node node)
node - the node to inspect.public com.google.gwt.dom.client.TableCellElement getNextCellInRow(com.google.gwt.dom.client.TableCellElement cell)
cell - currently edited cell.public com.google.gwt.dom.client.TableCellElement getPreviousCellInRow(com.google.gwt.dom.client.TableCellElement cell)
cell - currently edited cell.public com.google.gwt.dom.client.TableCellElement getNextCellInColumn(com.google.gwt.dom.client.TableCellElement cell)
cell - currently edited cell.public com.google.gwt.dom.client.TableCellElement getPreviousCellInColumn(com.google.gwt.dom.client.TableCellElement cell)
cell - currently edited cell.public com.google.gwt.dom.client.TableRowElement insertRow(Document doc, boolean insertBefore)
doc - the Document to get the selection from.insertBefore - indicates the creation position relatively to the currently edited row.public void insertCol(Document doc, boolean insertBefore)
doc - the Document to get the selection from.insertBefore - indicates the creation position relatively to the currently edited column.Copyright © 2004–2017 XWiki. All rights reserved.