- void cut(Edit command)
- {
- int column, j, jSize = command.seqs.length;
- for (j = 0; j < jSize; j++)
- {
- if (command.position == 0)
- {
- // This is a TRIM_LEFT command
- column = command.seqs[j].findPosition(command.number);
- command.seqs[j].setStart(column);
- }
- else
- {
- // This is a TRIM_RIGHT command
- column = command.seqs[j].findPosition(command.position) - 1;
- command.seqs[j].setEnd(column);
- }
- }
-
- super.cut(command, null);
-
- if (command.position == 0)
- {
- deletedHiddenColumns = colSel.compensateForEdit(0, command.number);
- if (selectionGroup != null)
- {
- selectionGroup.adjustForRemoveLeft(command.number);
- }
- }
- else
- {
- deletedHiddenColumns = colSel.compensateForEdit(command.position,
- command.number);
- if (selectionGroup != null)
- {
- selectionGroup.adjustForRemoveRight(command.position);
- }
- }
- }
-
- void paste(Edit command)
- {
- super.paste(command, null);
- int column, j, jSize = command.seqs.length;
- for (j = 0; j < jSize; j++)
- {
- if (command.position == 0)
- {
- command.seqs[j].setStart(start[j]);
- }
- else
- {
- column = command.seqs[j].findPosition(command.number
- + command.position) - 1;
- command.seqs[j].setEnd(column);
- }
- }
-
- if (command.position == 0)
- {
- colSel.compensateForEdit(0, -command.number);
- if (selectionGroup != null)
- {
- selectionGroup.adjustForRemoveLeft(-command.number);
- }
- }
-
- if (deletedHiddenColumns != null)
- {
- int[] region;
- for (int i = 0; i < deletedHiddenColumns.size(); i++)
- {
- region = (int[]) deletedHiddenColumns.elementAt(i);
- colSel.hideColumns(region[0], region[1]);
- }
- }
- }
-