Package OntoUML.diagram.edit.parts

Source Code of OntoUML.diagram.edit.parts.SubKindAttributeCompartmentEditPart

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 SubKindAttributeCompartmentEditPart extends
    ListCompartmentEditPart {

  /**
   * @generated
   */
  public static final int VISUAL_ID = 5013;

  /**
   * @generated
   */
  public SubKindAttributeCompartmentEditPart(View view) {
    super(view);
  }

  /**
   * @generated
   */
  protected boolean hasModelChildrenChanged(Notification evt) {
    return false;
  }

  /**
   * @generated
   */
  public String getCompartmentName() {
    return OntoUML.diagram.part.Messages.SubKindAttributeCompartmentEditPart_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.SubKindAttributeCompartmentItemSemanticEditPolicy());
    installEditPolicy(EditPolicyRoles.CREATION_ROLE,
        new CreationEditPolicy());
    installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE,
        new DragDropEditPolicy());
    installEditPolicy(
        EditPolicyRoles.CANONICAL_ROLE,
        new OntoUML.diagram.edit.policies.SubKindAttributeCompartmentCanonicalEditPolicy());
  }

  /**
   * @generated
   */
  protected void setRatio(Double ratio) {
    // nothing to do -- parent layout does not accept Double constraints as ratio
    // super.setRatio(ratio);
  }

}
TOP

Related Classes of OntoUML.diagram.edit.parts.SubKindAttributeCompartmentEditPart

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.