public class OffsetMoMLChangeRequest extends MoMLChangeRequest
This class is used by the paste action in Vergil so that the pasted icon does not overlap the original icon. If a BasicGraphFrame can be found, then the position of the mouse is used to determine the offsite. Otherwise, a small offset is used.
The pasted objects are selected so that the can be moved as a group.
Constructor and Description |
---|
OffsetMoMLChangeRequest(java.lang.Object originator,
NamedObj context,
java.lang.String request)
Construct a mutation request to be executed in the specified
context.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_postParse(MoMLParser parser)
Offset the locations of top level objects that are created
by the change request.
|
protected void |
_preParse(MoMLParser parser)
Clear the list of top objects.
|
_execute, getContext, getDeferredToParent, setMergeWithPreviousUndo, setReportErrorsToHandler, setUndoable
addChangeListener, execute, getDescription, getLocality, getSource, isErrorReported, isPersistent, isStructuralChange, removeChangeListener, setDescription, setErrorReported, setListeners, setPersistent, waitForCompletion
public OffsetMoMLChangeRequest(java.lang.Object originator, NamedObj context, java.lang.String request)
originator
- The originator of the change request.context
- The context in which to execute the MoML.request
- The mutation request in MoML.protected void _postParse(MoMLParser parser)
_postParse
in class MoMLChangeRequest
parser
- The parserprotected void _preParse(MoMLParser parser)
_preParse
in class MoMLChangeRequest
parser
- The parser