| /****************************************************************************** |
| * Copyright (c) 2004 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| ****************************************************************************/ |
| |
| |
| package org.eclipse.gmf.runtime.diagram.core.internal.commands; |
| |
| import org.eclipse.core.runtime.IProgressMonitor; |
| |
| import org.eclipse.gmf.runtime.common.core.command.CommandResult; |
| import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; |
| import org.eclipse.gmf.runtime.notation.View; |
| |
| /** |
| * This command moves a view from it's container and inserts it in the "back" |
| * of the list. |
| * |
| * @author jschofie |
| * @canBeSeenBy %level1 |
| */ |
| public class SendToBackCommand extends ZOrderCommand { |
| |
| public SendToBackCommand(View toMove ) { |
| super( "SendToBackCommand", toMove ); //$NON-NLS-1$ |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.gmf.runtime.common.core.command.AbstractCommand#doExecute(org.eclipse.core.runtime.IProgressMonitor) |
| */ |
| protected CommandResult doExecute(IProgressMonitor progressMonitor) { |
| // Reposition the child |
| ViewUtil.repositionChildAt(containerView,toMove, 0); |
| return newOKCommandResult(); |
| } |
| |
| } |