package OntoUML.diagram.edit.parts;
import org.eclipse.draw2d.IFigure;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
import org.eclipse.gmf.runtime.notation.View;
/**
* @generated
*/
public class RoleAttributeCompartmentEditPart extends ListCompartmentEditPart {
/**
* @generated
*/
public static final int VISUAL_ID = 7009;
/**
* @generated
*/
public RoleAttributeCompartmentEditPart(View view) {
super(view);
}
/**
* @generated
*/
protected boolean hasModelChildrenChanged(Notification evt) {
return false;
}
/**
* @generated
*/
public String getCompartmentName() {
return OntoUML.diagram.part.Messages.RoleAttributeCompartmentEditPart_title;
}
/**
* @generated
*/
public IFigure createFigure() {
ResizableCompartmentFigure result = (ResizableCompartmentFigure) super
.createFigure();
result.setTitleVisibility(false);
return result;
}
/**
* @generated
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
new ResizableCompartmentEditPolicy());
installEditPolicy(
EditPolicyRoles.SEMANTIC_ROLE,
new OntoUML.diagram.edit.policies.RoleAttributeCompartmentItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE,
new CreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE,
new DragDropEditPolicy());
installEditPolicy(
EditPolicyRoles.CANONICAL_ROLE,
new OntoUML.diagram.edit.policies.RoleAttributeCompartmentCanonicalEditPolicy());
}
/**
* @generated
*/
protected void setRatio(Double ratio) {
// nothing to do -- parent layout does not accept Double constraints as ratio
// super.setRatio(ratio);
}
}