public class ResizeTableFragment extends com.sodius.mdw.internal.metamodel.doors.io.commands.ResizeTableFragmentImpl implements ShareModuleFragment
If the new number of rows or columns is lower than the current size of the table, existing cells are deleted accordingly.
This fragment is intended to be combined into an EditModuleCommand
instance.
Below is a snippet illustrating how to use this fragment (see CommandRunner
for a full snippet):
ModuleRef module = ModuleRef.qualifiedName("/MyFolder/MyModule"); EditModuleCommand command = new EditModuleCommand(module, TerminationMode.SAVE_AND_CLOSE); ObjectRef table = ObjectRef.absoluteNumber(5); command.add(new ResizeTableFragment(object, 3, 4)); myCommandRunner.run(command);
CommandRunner
,
EditModuleCommand
Constructor and Description |
---|
ResizeTableFragment(ObjectRef table,
int rows,
int columns)
Instantiates a fragment to change the size of the table (number of rows and of columns).
|
public ResizeTableFragment(ObjectRef table, int rows, int columns)
table
- the table whose size needs to be modified.rows
- the new number of rows.columns
- the new number of columns.