/* This file is part of Green. * * Copyright (C) 2005 The Research Foundation of State University of New York * All Rights Under Copyright Reserved, The Research Foundation of S.U.N.Y. * * Green is free software, licensed under the terms of the Eclipse * Public License, version 1.0. The license is available at * http://www.eclipse.org/legal/epl-v10.html */ package edu.buffalo.cse.green.editor.controller.policies; import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPolicy; import org.eclipse.gef.Request; import org.eclipse.gef.commands.Command; import org.eclipse.gef.editpolicies.LayoutEditPolicy; import org.eclipse.gef.editpolicies.NonResizableEditPolicy; import org.eclipse.gef.requests.CreateRequest; /** * Provides support for maneuvering the bendpoints of a relationship when the * source or target moves. * * @author bcmartin */ public class RelationshipLayoutEditPolicy extends LayoutEditPolicy { public RelationshipLayoutEditPolicy() { super(); } /** * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#createChildEditPolicy(org.eclipse.gef.EditPart) */ protected EditPolicy createChildEditPolicy(EditPart child) { NonResizableEditPolicy dragPolicy = new NonResizableEditPolicy(); dragPolicy.setDragAllowed(true); return dragPolicy; } /** * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getCreateCommand(org.eclipse.gef.requests.CreateRequest) */ protected Command getCreateCommand(CreateRequest request) { return null; } /** * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getDeleteDependantCommand(org.eclipse.gef.Request) */ protected Command getDeleteDependantCommand(Request request) { return null; } /** * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getMoveChildrenCommand(org.eclipse.gef.Request) */ protected Command getMoveChildrenCommand(Request request) { return null; } }