itrimble | 38bf0b9 | 2006-10-30 18:59:16 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2006 Sybase, Inc. and others. |
| 3 | * |
| 4 | * All rights reserved. This program and the accompanying materials |
| 5 | * are made available under the terms of the Eclipse Public License v1.0 |
| 6 | * which accompanies this distribution, and is available at |
| 7 | * http://www.eclipse.org/legal/epl-v10.html |
| 8 | * |
| 9 | * Contributors: |
| 10 | * Sybase, Inc. - initial API and implementation |
| 11 | *******************************************************************************/ |
| 12 | package org.eclipse.jst.pagedesigner.validation.caret; |
| 13 | |
| 14 | import org.eclipse.gef.EditPart; |
| 15 | |
| 16 | /** |
| 17 | * @author mengbo |
| 18 | */ |
| 19 | public interface IMovementMediator extends IPositionMediator { |
cbateman | 4249370 | 2007-10-10 00:59:58 +0000 | [diff] [blame] | 20 | /** |
| 21 | * @param target |
| 22 | * @return true if mediator allows movment in |
| 23 | */ |
itrimble | 38bf0b9 | 2006-10-30 18:59:16 +0000 | [diff] [blame] | 24 | public boolean allowsMoveIn(Target target); |
| 25 | |
cbateman | 4249370 | 2007-10-10 00:59:58 +0000 | [diff] [blame] | 26 | /** |
| 27 | * @param target |
| 28 | * @return true if mediator allows movement out |
| 29 | */ |
itrimble | 38bf0b9 | 2006-10-30 18:59:16 +0000 | [diff] [blame] | 30 | public boolean allowsMoveOut(Target target); |
| 31 | |
| 32 | /** |
| 33 | * Return a closest parent part which is editable, and it can't moveout. |
| 34 | * |
| 35 | * @param target |
| 36 | * @return if taget part is editable, then returns itself. |
| 37 | */ |
| 38 | public EditPart getConstainedEditableContainer(Target target); |
| 39 | |
| 40 | } |