|
||||||||||
| PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.eclipse.emf.common.command.AbstractCommand
|
+--org.eclipse.emf.edit.command.AbstractOverrideableCommand
|
+--org.eclipse.emf.edit.command.CopyToClipboardCommand
This works exactly like a CopyCommand but set the copy result to the EditingDomain.
In fact, the implementation is just a proxy for copy command.
| Field Summary | |
|---|---|
protected Command |
copyCommand
This is the command that does the actual copying. |
protected static java.lang.String |
DESCRIPTION
This caches the description. |
protected static java.lang.String |
LABEL
This caches the label. |
protected java.util.Collection |
oldClipboard
This is the original clipboard value before execute. |
protected java.util.Collection |
sourceObjects
This is the collection of objects to be copied to the clipboard. |
| Fields inherited from class org.eclipse.emf.edit.command.AbstractOverrideableCommand |
|---|
domain, overrideCommand |
| Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
|---|
description, isExecutable, isPrepared, label |
| Constructor Summary | |
|---|---|
CopyToClipboardCommand(EditingDomain domain,
java.util.Collection collection)
This constructs a command that copies the given collection of objects to the clipboard. |
|
| Method Summary | |
|---|---|
static Command |
create(EditingDomain domain,
java.util.Collection collection)
This creates a command that copies the given collection of objects to the clipboard. |
static Command |
create(EditingDomain domain,
java.lang.Object owner)
This creates a command that copies the given object to the clipboard. |
void |
doDispose()
This is overrideable command's implementation of dispose. |
void |
doExecute()
This is overrideable command's implementation of execute. |
java.util.Collection |
doGetAffectedObjects()
This is overrideable command's implementation of getAffectedObjects. |
java.util.Collection |
doGetResult()
This is overrideable command's implementation of getResult. |
void |
doRedo()
This is overrideable command's implementation of redo. |
void |
doUndo()
This is overrideable command's implementation of undo. |
java.util.Collection |
getSourceObjects()
This returns the collection of objects to be copied to the clipboard. |
protected boolean |
prepare()
Called at most once in AbstractOverrideableCommand.canExecute() to give the command an opportunity to ready itself for execution. |
java.lang.String |
toString()
This gives an abbreviated name using this object's own class' name, without package qualification, followed by a space separated list of field:value pairs. |
| Methods inherited from class org.eclipse.emf.edit.command.AbstractOverrideableCommand |
|---|
canExecute, canUndo, dispose, doCanExecute, doCanUndo, doGetChildrenToCopy, doGetDescription, doGetLabel, execute, getAffectedObjects, getChildrenToCopy, getDescription, getDomain, getLabel, getOverride, getOwnerList, getResult, redo, setOverride, undo |
| Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
|---|
chain, setDescription, setLabel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.emf.common.command.Command |
|---|
chain |
| Field Detail |
protected static final java.lang.String LABEL
protected static final java.lang.String DESCRIPTION
protected java.util.Collection sourceObjects
protected java.util.Collection oldClipboard
protected Command copyCommand
| Constructor Detail |
public CopyToClipboardCommand(EditingDomain domain,
java.util.Collection collection)
| Method Detail |
public static Command create(EditingDomain domain,
java.util.Collection collection)
public static Command create(EditingDomain domain,
java.lang.Object owner)
public java.util.Collection getSourceObjects()
protected boolean prepare()
AbstractCommandAbstractCommand.canExecute() to give the command an opportunity to ready itself for execution.
The returned value is stored in AbstractCommand.canExecute().
In other words, you can override this method to initialize
and to yield a cached value for the all subsequent calls to canExecute.prepare in class AbstractCommandorg.eclipse.emf.common.command.AbstractCommandpublic void doExecute()
OverrideableCommanddoExecute in class AbstractOverrideableCommandpublic void doUndo()
OverrideableCommanddoUndo in class AbstractOverrideableCommandpublic void doRedo()
OverrideableCommanddoRedo in class AbstractOverrideableCommandpublic java.util.Collection doGetResult()
OverrideableCommanddoGetResult in class AbstractOverrideableCommandpublic java.util.Collection doGetAffectedObjects()
OverrideableCommanddoGetAffectedObjects in class AbstractOverrideableCommandpublic void doDispose()
OverrideableCommanddoDispose in class AbstractOverrideableCommandpublic java.lang.String toString()
toString in class AbstractOverrideableCommandorg.eclipse.emf.common.command.AbstractCommand
|
Copyright 2001-2003 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||