| //------------------------------------------------------------------------------ |
| // Copyright (c) 2005, 2006 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 implementation |
| //------------------------------------------------------------------------------ |
| package org.eclipse.epf.authoring.gef.edit.policies; |
| |
| import org.eclipse.epf.authoring.gef.edit.NodeContainerEditPart; |
| import org.eclipse.gef.EditPart; |
| import org.eclipse.gef.Request; |
| import org.eclipse.gef.commands.Command; |
| import org.eclipse.gef.editpolicies.FlowLayoutEditPolicy; |
| import org.eclipse.gef.requests.CreateRequest; |
| |
| /** |
| * A EditPolicy for {@link NodeContainerEditPart} to disable the all editing features. |
| * @author Phong Nguyen Le |
| * @since 1.0 |
| */ |
| public class NodeContainerFlowLayoutEditPolicy extends FlowLayoutEditPolicy { |
| |
| /** |
| * @see org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy#createAddCommand(EditPart, |
| * EditPart) |
| */ |
| protected Command createAddCommand(EditPart child, EditPart after) { |
| return null; |
| } |
| |
| /** |
| * @see org.eclipse.gef.editpolicies.OrderedLayoutEditPolicy#createMoveChildCommand(EditPart, |
| * EditPart) |
| */ |
| protected Command createMoveChildCommand(EditPart child, EditPart after) { |
| return null; |
| } |
| |
| /** |
| * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getCreateCommand(CreateRequest) |
| */ |
| protected Command getCreateCommand(CreateRequest request) { |
| return null; |
| } |
| |
| /** |
| * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getDeleteDependantCommand(Request) |
| */ |
| protected Command getDeleteDependantCommand(Request request) { |
| return null; |
| } |
| |
| } |