## org.eclipse.emf.edit.command
Class CutToClipboardCommand

    java.lang.Object
      org.eclipse.emf.common.command.AbstractCommand
          org.eclipse.emf.common.command.CommandWrapper
              org.eclipse.emf.edit.command.CutToClipboardCommand

All Implemented Interfaces:
  Command

    public class CutToClipboardCommand

extends CommandWrapper

This works just like `RemoveCommand` but also sets the removed objects to the `EditingDomain`. In fact, the implementation is just a proxy for remove command.

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand
`AbstractCommand.NonDirtying`

Field Summary
`protected static java.lang.String` `DESCRIPTION` This caches the description.
`protected EditingDomain` `domain` This is the editing doman in which this command operates.
`protected static java.lang.String` `LABEL` This caches the label.
`protected java.util.Collection<java.lang.Object>` `oldClipboard` This is the original clipboard value before execute.

Fields inherited from class org.eclipse.emf.common.command.CommandWrapper
`command`

Fields inherited from class org.eclipse.emf.common.command.AbstractCommand
`description, isExecutable, isPrepared, label`

Constructor Summary
`CutToClipboardCommand(EditingDomain domain, Command command)` This constructs an instance that ields the result of the given command as its clipboard.

Method Summary
`static Command` `create(EditingDomain domain, java.util.Collection<?> collection)` This creates a command to remove multiple objects and set it to the clipboard.
`static Command` `create(EditingDomain domain, java.lang.Object value)` This creates a command to remove an object and set it to the clipboard.
`static Command` `create(EditingDomain domain, java.lang.Object owner, java.lang.Object feature, java.util.Collection<?> collection)` This creates a command to remove a collection of values from the specified feature of the owner and set it to the clipboard.
`static Command` `create(EditingDomain domain, java.lang.Object owner, java.lang.Object feature, java.lang.Object value)` This creates a command to remove a particular value from the specified feature of the owner and set it to the clipboard.
`void` `execute()` Delegates to the execute method of the command.
`void` `redo()` Delegates to the redo method of the command.
`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.
`void` `undo()` Delegates to the undo method of the command.

Methods inherited from class org.eclipse.emf.common.command.CommandWrapper
`canUndo, createCommand, dispose, getAffectedObjects, getCommand, getDescription, getLabel, getResult, prepare`

Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
`canExecute, chain, setDescription, setLabel`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### LABEL

    protected static final java.lang.String LABEL

  This caches the label.

### DESCRIPTION

    protected static final java.lang.String DESCRIPTION

  This caches the description.

### domain

    protected EditingDomain domain

  This is the editing doman in which this command operates.

### oldClipboard

    protected java.util.Collection<java.lang.Object> oldClipboard

  This is the original clipboard value before execute.

Constructor Detail

### CutToClipboardCommand

    public CutToClipboardCommand(EditingDomain domain,
                                 Command command)

  This constructs an instance that ields the result of the given command as its clipboard.

Method Detail

### create

    public static Command create(EditingDomain domain,
                                 java.lang.Object value)

  This creates a command to remove an object and set it to the clipboard.

### create

    public static Command create(EditingDomain domain,
                                 java.lang.Object owner,
                                 java.lang.Object feature,
                                 java.lang.Object value)

  This creates a command to remove a particular value from the specified feature of the owner and set it to the clipboard.

### create

    public static Command create(EditingDomain domain,
                                 java.util.Collection<?> collection)

  This creates a command to remove multiple objects and set it to the clipboard.

### create

    public static Command create(EditingDomain domain,
                                 java.lang.Object owner,
                                 java.lang.Object feature,
                                 java.util.Collection<?> collection)

  This creates a command to remove a collection of values from the specified feature of the owner and set it to the clipboard.

### execute

    public void execute()

  Description copied from class: `CommandWrapper`
  Delegates to the execute method of the command.

  Specified by:
    `execute` in interface `Command`
  Overrides:
    `execute` in class `CommandWrapper`

### undo

    public void undo()

  Description copied from class: `CommandWrapper`
  Delegates to the undo method of the command.

  Specified by:
    `undo` in interface `Command`
  Overrides:
    `undo` in class `CommandWrapper`

### redo

    public void redo()

  Description copied from class: `CommandWrapper`
  Delegates to the redo method of the command.

  Specified by:
    `redo` in interface `Command`
  Overrides:
    `redo` in class `CommandWrapper`

### toString

    public 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.

  Overrides:
    `toString` in class `CommandWrapper`
  Returns:
    string representation.

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.