public class InsertTable extends AbstractTableFeature implements WizardListener
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
Feature name.
|
cache, domUtilsrta| Constructor and Description |
|---|
InsertTable(TablePlugin plugin)
Initialize the feature.
|
| Modifier and Type | Method and Description |
|---|---|
Element |
createTable(Document doc,
TableConfig config)
Create a table from TableConfig configuration.
|
boolean |
execute(String parameter) |
Wizard |
getWizard()
Get table wizard pop-up.
|
void |
insertTable(TableConfig config)
Insert a HTML table in the editor.
|
boolean |
isEnabled() |
void |
onCancel(Wizard sender) |
void |
onFinish(Wizard sender,
Object result) |
destroy, getCommand, getName, getPlugingetParameter, hasValidSelection, isExecutedisSupportedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParameter, isExecuted, isSupportedpublic static final String NAME
public InsertTable(TablePlugin plugin)
plugin - table plug-in.public Wizard getWizard()
public Element createTable(Document doc, TableConfig config)
We create the table using innerHTML instead of creating each DOM node in order to improve the speed. In most of the browsers setting the innerHTML is faster than creating the DOM nodes and appending them.
doc - currently edited document.config - table configuration (row number, etc).public void insertTable(TableConfig config)
config - creation parameters.public boolean execute(String parameter)
execute in interface Executablepublic boolean isEnabled()
isEnabled in interface ExecutableisEnabled in class org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractSelectionExecutablepublic void onCancel(Wizard sender)
onCancel in interface WizardListenerpublic void onFinish(Wizard sender, Object result)
onFinish in interface WizardListenerCopyright © 2004–2016 XWiki. All rights reserved.