Examples of canAdd()


Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

              AddContext boundaryContext = new AddContext(new AreaContext(), boundaryEvent);
              boundaryContext.setTargetContainer(container);
              Point location = getLocation(container);
              boundaryContext.setLocation((int) graphicInfo.getX() - location.x, (int) graphicInfo.getY() - location.y);

              if (addFeature.canAdd(boundaryContext)) {
                PictogramElement newBoundaryContainer = addFeature.add(boundaryContext);
                featureProvider.link(newBoundaryContainer, new Object[] { boundaryEvent });
              }
            }
          }
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

                PictogramElement newBoundaryContainer = addFeature.add(boundaryContext);
                featureProvider.link(newBoundaryContainer, new Object[] { boundaryEvent });
              }
            }
          }
        } else if (addFeature.canAdd(context)) {
          PictogramElement newContainer = addFeature.add(context);
          featureProvider.link(newContainer, new Object[] { flowElement });

          if (flowElement instanceof SubProcess) {
            drawFlowElements(((SubProcess) flowElement).getFlowElements(), locationMap, (ContainerShape) newContainer, process);
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

          final Point location = getLocation(parentContainer);

          context.setLocation((int) gi.getX() - location.x, (int) gi.getY() - location.y);
        }

        if (addFeature.canAdd(context)) {
          final PictogramElement newContainer = addFeature.add(context);
          featureProvider.link(newContainer, new Object[] { artifact });
        }
      }
    }
View Full Code Here

Examples of org.eclipse.graphiti.features.IAddFeature.canAdd()

      IAddFeature addFeature = getFeatureProvider().getAddFeature(addContext);
      PictogramElement pictogram = getFeatureProvider().getPictogramElementForBusinessObject(element);
      addContext.setLocation(pictogram.getGraphicsAlgorithm().getX() + PASTE_OFFSET, pictogram.getGraphicsAlgorithm().getY() + PASTE_OFFSET);
      addContext.setSize(pictogram.getGraphicsAlgorithm().getWidth(), pictogram.getGraphicsAlgorithm().getHeight());
      addContext.setTargetContainer(getDiagram());
      if(addFeature.canAdd(addContext)) {
        addFeature.add(addContext);
      }
    }
  }
}
View Full Code Here

Examples of org.fenixedu.academic.domain.studentCurriculum.CurriculumGroup.canAdd()

            if (curriculumLine.getCurriculumGroup() != destination) {

                checkPermission(responsible, curriculumLineLocationBean);

                if (!destination.canAdd(curriculumLine)) {
                    throw new DomainException("error.StudentCurricularPlan.cannot.move.curriculum.line.to.curriculum.group",
                            curriculumLine.getFullPath(), destination.getFullPath());
                }

                if (curriculumLine.hasExecutionPeriod()
View Full Code Here

Examples of org.netbeans.modules.openoffice.wizard.util.UnionDefaultCreator.canAdd()

            return false;
        UnionDefaultCreator uniondefaultcreator = (UnionDefaultCreator)anode[0].getCookie(UnionDefaultCreator.class);
        if(uniondefaultcreator == null)
            return false;
        else
            return uniondefaultcreator.canAdd();
    }

    public void performAction(Node anode[])
    {
        if(enable(anode))
View Full Code Here
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.