org.topcased.modeler.sysml.blockdefinitiondiagram.policies
Class EListLayoutEditPolicy
java.lang.Object
org.topcased.modeler.edit.policies.EListLayoutEditPolicy
org.topcased.modeler.sysml.blockdefinitiondiagram.policies.EListLayoutEditPolicy
public class EListLayoutEditPolicy
- extends org.topcased.modeler.edit.policies.EListLayoutEditPolicy
A Layout that allow creation of eObjects in relation with an
eStructuralFeature of the parent eObject or not.
Contrary to org.topcased.modeler.edit.policies.EListLayoutEditPolicy, this
edit policy allows only creation of childs which are of type of the
eStructuralFeature
Method Summary |
protected boolean |
isValid(EObject child,
EObject parent)
Check if the current EObject is a valid child for the parent EObject. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_feature
protected EStructuralFeature _feature
EListLayoutEditPolicy
public EListLayoutEditPolicy(EStructuralFeature feature)
- The Constructor
- Parameters:
feature
- the EStructural feature that should be listed
isValid
protected boolean isValid(EObject child,
EObject parent)
- Check if the current EObject is a valid child for the parent EObject.
It's valid if the class of the child is the same than the type of the
EStructuralFeature Derived classes are not allowed (because of Ports
which are derived from Properties)
- Parameters:
child
- the child EObjectparent
- the parent EObject
- Returns:
- true if the child can be added
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.