/******************************************************************************* * Copyright (c) 2004 Actuate Corporation . * 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: * Actuate Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.birt.report.designer.internal.ui.editors.schematic.editpolicies; import java.util.ArrayList; import java.util.List; import org.eclipse.birt.report.designer.internal.ui.editors.schematic.handles.ListBandHandle; import org.eclipse.draw2d.PositionConstants; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPolicy; import org.eclipse.gef.GraphicalEditPart; import org.eclipse.gef.Request; import org.eclipse.gef.commands.Command; import org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy; import org.eclipse.gef.requests.ChangeBoundsRequest; import org.eclipse.gef.requests.CreateRequest; /** * add comment here * */ public class ListLayoutEditPolicy extends ConstrainedLayoutEditPolicy { /* * (non-Javadoc) * * @see org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy#createAddCommand(org.eclipse.gef.EditPart, * java.lang.Object) */ protected Command createAddCommand( EditPart child, Object constraint ) { // TODO Auto-generated method stub return null; } /* * (non-Javadoc) * * @see org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy#createChangeConstraintCommand(org.eclipse.gef.EditPart, * java.lang.Object) */ protected Command createChangeConstraintCommand( EditPart child, Object constraint ) { // TODO Auto-generated method stub return null; } protected EditPolicy createChildEditPolicy( EditPart child ) { ReportElementResizablePolicy policy = new ReportElementResizablePolicy( ) { protected List createSelectionHandles( ) { List list = new ArrayList( ); //ResizableHandleKit.addMoveHandle((GraphicalEditPart)getHost(), // list); list.add( new ListBandHandle( (GraphicalEditPart) getHost( ) ) ); return list; } }; policy.setResizeDirections( PositionConstants.NONE ); return policy; } /* * (non-Javadoc) * * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getCreateCommand(org.eclipse.gef.requests.CreateRequest) */ protected Command getCreateCommand( CreateRequest request ) { return null; } /* * (non-Javadoc) * * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getDeleteDependantCommand(org.eclipse.gef.Request) */ protected Command getDeleteDependantCommand( Request request ) { return null; } /* * (non-Javadoc) * * @see org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy#getResizeChildrenCommand(org.eclipse.gef.requests.ChangeBoundsRequest) */ protected Command getResizeChildrenCommand( ChangeBoundsRequest request ) { return null; } /* * (non-Javadoc) * * @see org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy#getConstraintFor(org.eclipse.draw2d.geometry.Point) */ protected Object getConstraintFor( Point point ) { return null; } /* * (non-Javadoc) * * @see org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy#getConstraintFor(org.eclipse.draw2d.geometry.Rectangle) */ protected Object getConstraintFor( Rectangle rect ) { return null; } }