package brn.gui.linktable.diagram.edit.parts;

import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
import brn.gui.linktable.diagram.edit.policies.LinkTableLinkItemSemanticEditPolicy;

import org.eclipse.draw2d.Connection;

import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;

/**
 * @generated
 */
public class LinkTableLinkEditPart extends ConnectionNodeEditPart {

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

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

  /**
   * @generated
   */
  protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
        new LinkTableLinkItemSemanticEditPolicy());
  }

  /**
   * Creates figure for this edit part.
   * 
   * Body of this method does not depend on settings in generation model
   * so you may safely remove <i>generated</i> tag and modify it.
   * 
   * @generated
   */
  protected Connection createConnectionFigure() {
    return new LinkFigure();
  }

  /**
   * @generated
   */
  public class LinkFigure extends
      org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {

    /**
     * @generated
     */
    public LinkFigure() {

      setTargetDecoration(createTargetDecoration());
    }

    /**
     * @generated
     */
    private org.eclipse.draw2d.PolylineDecoration createTargetDecoration() {
      org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();
      // dispatchNext?

      return df;
    }

  }

}
