コード例 #1
0
 /** @generated */
 @Override
 protected void removeChildVisual(EditPart childEditPart) {
   if (removeFixedChild(childEditPart)) {
     return;
   }
   super.removeChildVisual(childEditPart);
 }
コード例 #2
0
 /** @generated */
 @Override
 protected void addChildVisual(EditPart childEditPart, int index) {
   if (addFixedChild(childEditPart)) {
     return;
   }
   super.addChildVisual(childEditPart, -1);
 }
コード例 #3
0
 /** {@inheritDoc} */
 @Override
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new DefaultGraphicalNodeEditPolicy());
   installEditPolicy(
       AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
       new AppliedStereotypeLinkLabelDisplayEditPolicy());
 }
コード例 #4
0
 /** {@inheritDoc} */
 @Override
 protected void refreshVisuals() {
   super.refreshVisuals();
   refreshLineType();
   refreshLineWidth();
   refreshArrowSource();
   refreshArrowTarget();
 }
コード例 #5
0
 /** @generated */
 @Override
 protected void createDefaultEditPolicies() {
   super.createDefaultEditPolicies();
   installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DependencyItemSemanticEditPolicy());
   installEditPolicy(
       AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
       new AppliedStereotypeLinkLabelDisplayEditPolicy());
   installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
 }
コード例 #6
0
  /** {@inheritDoc} */
  @Override
  protected void handleNotificationEvent(Notification event) {
    super.handleNotificationEvent(event);

    // Update the figure when the line width changes
    Object feature = event.getFeature();
    if ((getModel() != null) && (getModel() == event.getNotifier())) {

      if (NotationPackage.eINSTANCE.getLineStyle_LineWidth().equals(feature)) {
        refreshLineWidth();
        refreshArrowSource();
        refreshArrowTarget();
      } else if (NotationPackage.eINSTANCE.getLineTypeStyle_LineType().equals(feature)) {
        refreshLineType();
      }
    }
  }