public class AlignmentServiceUndoSupport extends AlignmentServiceDecorator
Modifier and Type | Class and Description |
---|---|
class |
AlignmentServiceUndoSupport.AddCellOperation
Operation that adds a cell to the alignment service.
|
class |
AlignmentServiceUndoSupport.CleanOperation
Operation that cleans the alignment.
|
class |
AlignmentServiceUndoSupport.DisableCellOperation
Operation that enables / disables a cell for a specific cell.
|
class |
AlignmentServiceUndoSupport.RemoveCellOperation
Operations that removes a cell from the alignment service.
|
class |
AlignmentServiceUndoSupport.ReplaceOperation
Operation that replaces a cell in the alignment.
|
class |
AlignmentServiceUndoSupport.SetCellPropertyOperation
Operation that sets the priority of a cell.
|
alignmentService
Constructor and Description |
---|
AlignmentServiceUndoSupport(AlignmentService alignmentService)
Create undo/redo support for the given alignment service.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addBaseAlignment(BaseAlignmentLoader loader)
Adds a base alignment.
|
void |
addCell(MutableCell cell)
Adds the given cell to the current alignment.
|
void |
addOrUpdateAlignment(MutableAlignment alignment)
Adds the cells contained in the given alignment to the current alignment.
If cells with the same entities and transformations already exist they will be replaced. |
void |
clean()
Invoke this operation if you want to clear out all alignments stored.
|
protected void |
executeOperation(org.eclipse.core.commands.operations.IUndoableOperation operation)
Execute an operation.
|
void |
removeCells(Cell... cells)
Removes the given cells
|
void |
replaceCell(Cell oldCell,
MutableCell newCell)
Replace a cell with a new cell.
|
void |
replaceCells(Map<? extends Cell,MutableCell> cells)
Replace cells with a new cells.
|
void |
setCellProperty(String cellId,
String propertyName,
Object property)
Sets a property for the cell.
|
addListener, getAlignment, removeListener
public AlignmentServiceUndoSupport(AlignmentService alignmentService)
alignmentService
- the alignment serviceprotected void executeOperation(org.eclipse.core.commands.operations.IUndoableOperation operation)
operation
- the operation to executepublic void addOrUpdateAlignment(MutableAlignment alignment)
AlignmentService
addOrUpdateAlignment
in interface AlignmentService
addOrUpdateAlignment
in class AlignmentServiceDecorator
alignment
- the alignment to addAlignmentServiceDecorator.addOrUpdateAlignment(MutableAlignment)
public void addCell(MutableCell cell)
AlignmentService
addCell
in interface AlignmentService
addCell
in class AlignmentServiceDecorator
cell
- the cell to addAlignmentServiceDecorator.addCell(MutableCell)
public void removeCells(Cell... cells)
AlignmentService
removeCells
in interface AlignmentService
removeCells
in class AlignmentServiceDecorator
cells
- the cells to removeAlignmentServiceDecorator.removeCells(Cell[])
public void clean()
AlignmentService
clean
in interface AlignmentService
clean
in class AlignmentServiceDecorator
AlignmentServiceDecorator.clean()
public void replaceCell(Cell oldCell, MutableCell newCell)
AlignmentService
replaceCell
in interface AlignmentService
replaceCell
in class AlignmentServiceDecorator
oldCell
- the old cell that should be removed from the alignmentnewCell
- the new cell that should be added to the alignmentAlignmentServiceDecorator.replaceCell(Cell, MutableCell)
public void replaceCells(Map<? extends Cell,MutableCell> cells)
AlignmentService
replaceCells
in interface AlignmentService
replaceCells
in class AlignmentServiceDecorator
cells
- a mapping from old cells that should be removed from the
alignment to new cells that should be added to the alignmentAlignmentService.replaceCells(java.util.Map)
public void setCellProperty(String cellId, String propertyName, Object property)
AlignmentService
cellId
- the cell id to set the property from.propertyName
- the name of the property to set.property
- the value of the property.AlignmentService.setCellProperty(java.lang.String,
java.lang.String, java.lang.Object)
public boolean addBaseAlignment(BaseAlignmentLoader loader)
AlignmentService
addBaseAlignment
in interface AlignmentService
addBaseAlignment
in class AlignmentServiceDecorator
loader
- the loader of the base alignmentAlignmentServiceDecorator.addBaseAlignment(eu.esdihumboldt.hale.ui.service.align.BaseAlignmentLoader)
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a