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 MixinAttributeCompartmentEditPart extends ListCompartmentEditPart {
/**
* @generated
*/
public static final int VISUAL_ID = 7004;
/**
* @generated
*/
public MixinAttributeCompartmentEditPart(View view) {
super(view);
}
/**
* @generated
*/
protected boolean hasModelChildrenChanged(Notification evt) {
return false;
}
/**
* @generated
*/
public String getCompartmentName() {
return OntoUML.diagram.part.Messages.MixinAttributeCompartmentEditPart_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.MixinAttributeCompartmentItemSemanticEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE,
new CreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE,
new DragDropEditPolicy());
installEditPolicy(
EditPolicyRoles.CANONICAL_ROLE,
new OntoUML.diagram.edit.policies.MixinAttributeCompartmentCanonicalEditPolicy());
}
/**
* @generated
*/
protected void setRatio(Double ratio) {
// nothing to do -- parent layout does not accept Double constraints as ratio
// super.setRatio(ratio);
}
}