blob: 20717229c8c04f4a5b266411abd3a6bad6dd28fc [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) 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:
* Soyatec - initial API and implementation
*******************************************************************************/
package org.eclipse.xwt.tools.ui.designer.policies.layout;
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.requests.CreateRequest;
import org.eclipse.xwt.tools.ui.designer.policies.NewNonResizeEditPolicy;
/**
* @author jliu (jin.liu@soyatec.com)
*/
public class NonResizableLayoutEditPolicy extends LayoutEditPolicy {
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.editpolicies.LayoutEditPolicy#createChildEditPolicy(org.eclipse.gef.EditPart)
*/
protected EditPolicy createChildEditPolicy(EditPart child) {
return new NewNonResizeEditPolicy(false);
}
/*
* (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#getMoveChildrenCommand(org.eclipse.gef.Request)
*/
protected Command getMoveChildrenCommand(Request request) {
return null;
}
}