Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
PasteRecordCommand (int shiftCount) | |
List< IRecord > | getRecords () |
List< IRecord > | getUndoRecords () |
List< IRecord > | getRedoRecords () |
DocumentRecord | getDocumentRecord () |
void | dispose () |
Static Public Attributes | |
static final int | SHIFT_FOR_COPY = 50 |
Protected Member Functions | |
boolean | canExecuteSXECommand () |
boolean | canUndoSXECommand () |
IRecord | mergeAttribute (AttributeRecord attribute, List< IRecord > layout) |
List< IRecord > | getMergedAttributes (List< AttributeRecord > attributes, List< IRecord > layout) |
List< IRecord > | createCopyRecords (LayoutElementRecord toCopy) |
Achieves a list of LayoutElementRecord from the Clipboard. The list should be obtained by the root records of a HierarichalRecordList and thus not contain any descendant of any other contained element.
For the execution, the records and all their descendants are copied while the position (all concerning layout attributes) are shifted SHIFT_FOR_COPY
points to the right bottom to give feedback about successful execution.
Note, that copies inserted on the same place would just hide the originals, making it difficult to see any effect.
An undo corresponds to a delete, a redo to an undo-delet. For better reuse a DeleteRecordsCommand is used as member.
de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.PasteRecordCommand | ( | int | shiftCount | ) |
shiftCount | how many times the nodes have been pasted already |
boolean de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.canExecuteSXECommand | ( | ) | [protected, virtual] |
boolean de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.canUndoSXECommand | ( | ) | [protected, virtual] |
List<IRecord> de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.createCopyRecords | ( | LayoutElementRecord | toCopy | ) | [protected] |
Copies the passed LayoutElementRecord, shifts the layout records and copies all other descendants (attributes, child elements and their child nodes) to finally return them all as a single list.
toCopy |
void de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.dispose | ( | ) |
DocumentRecord de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.getDocumentRecord | ( | ) | [virtual] |
List<IRecord> de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.getMergedAttributes | ( | List< AttributeRecord > | attributes, |
List< IRecord > | layout | ||
) | [protected] |
Returns the layout records plus all the records of the AttributeSet that are no layout records.
List<IRecord> de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.getRecords | ( | ) | [virtual] |
List<IRecord> de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.getRedoRecords | ( | ) |
Reimplemented from de.fu_berlin.inf.dpp.whiteboard.gef.commands.SXECommand.
List<IRecord> de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.getUndoRecords | ( | ) | [virtual] |
IRecord de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.mergeAttribute | ( | AttributeRecord | attribute, |
List< IRecord > | layout | ||
) | [protected] |
Short helper that returns that checks whether the passed AttributeRecord attribute
is a layout record (contained by the layout records) if so, it will return the layout record els the passed AttributeRecord itself.
attribute | |
layout | layout attributes |
final int de.fu_berlin.inf.dpp.whiteboard.gef.commands.PasteRecordCommand.SHIFT_FOR_COPY = 50 [static] |