package simple.documentation.framework.operations.table; import java.awt.Component; import javax.swing.JFrame; import ro.sync.ecss.extensions.api.ArgumentDescriptor; import ro.sync.ecss.extensions.api.ArgumentsMap; import ro.sync.ecss.extensions.api.AuthorAccess; import ro.sync.ecss.extensions.api.AuthorOperation; import ro.sync.ecss.extensions.api.AuthorOperationException; import ro.sync.exml.workspace.api.Platform; import simple.documentation.framework.operations.table.TableCustomizerDialog.TableInfo; /** * Operation used to insert a SDF table. */ public class InsertTableOperation implements AuthorOperation { /** * @see ro.sync.ecss.extensions.api.AuthorOperation#doOperation(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.ArgumentsMap) */ public void doOperation(AuthorAccess authorAccess, ArgumentsMap args) throws IllegalArgumentException, AuthorOperationException { // Show the 'Insert table' dialog TableInfo tableInfo = null; if(authorAccess.getWorkspaceAccess().getPlatform() == Platform.STANDALONE) { TableCustomizerDialog tableCustomizerDialog = new TableCustomizerDialog( (JFrame) authorAccess.getWorkspaceAccess().getParentFrame()); tableCustomizerDialog.setLocationRelativeTo( (Component) authorAccess.getWorkspaceAccess().getParentFrame()); tableInfo = tableCustomizerDialog.showDialog(); } if (tableInfo != null) { // Create the table XML fragment StringBuffer tableXMLFragment = new StringBuffer(); tableXMLFragment.append("
"); } tableXMLFragment.append(" |