@Override protected boolean prepare() { // Since input objects are read-only, we don't need to make a copy of them for the clipboard. // We can just put a pointer to the original object(s) on the clipboard. // copyCommand = new IdentityCommand(inputObjects); // Do we also have some non-input objects to copy? // if (sourceObjects.size() > 0) { copyCommand = copyCommand.chain(CopyCommand.create(domain, sourceObjects)); } return copyCommand.canExecute(); }
@Override protected boolean prepare() { // Since input objects are read-only, we don't need to make a copy of them for the clipboard. // We can just put a pointer to the original object(s) on the clipboard. // copyCommand = new IdentityCommand(inputObjects); // Do we also have some non-input objects to copy? // if (sourceObjects.size() > 0) { copyCommand = copyCommand.chain(CopyCommand.create(domain, sourceObjects)); } return copyCommand.canExecute(); }