Package games.stendhal.server.entity.mapstuff.useable

Examples of games.stendhal.server.entity.mapstuff.useable.PlayerActivityEntity$Activity


    return intoDiagram || intoLane || intoParticipant;
  }

  @Override
  public PictogramElement add(IAddContext context) {
    Activity activity = (Activity) context.getNewObject();

    IGaService gaService = Graphiti.getGaService();
    IPeService peService = Graphiti.getPeService();

    int width = context.getWidth() > 0 ? context.getWidth() : getWidth();
View Full Code Here


  }

  @Override
  protected void postMoveShape(final IMoveShapeContext context) {
    super.postMoveShape(context);
    Activity activity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(), Activity.class);
    new AbstractBoundaryEventOperation() {
      @Override
      protected void doWorkInternal(ContainerShape container) {
        GraphicsAlgorithm ga = container.getGraphicsAlgorithm();
View Full Code Here

    PictogramElement element = context.getPictogramElement();
    String property = peService.getPropertyValue(element, getPropertyKey());
    if(property == null) {
      return Reason.createFalseReason();
    }
    Activity activity = (Activity) getBusinessObjectForPictogramElement(context.getPictogramElement());
    boolean changed = isPropertyChanged(activity, property);
    return changed ? Reason.createTrueReason() : Reason.createFalseReason();
    }
View Full Code Here

  @Override
    public boolean update(IUpdateContext context) {
    IPeService peService = Graphiti.getPeService();
    ContainerShape container = (ContainerShape) context.getPictogramElement();
    Activity activity = (Activity) getBusinessObjectForPictogramElement(context.getPictogramElement());

    ContainerShape markerContainer = null;
    Iterator<Shape> iterator = peService.getAllContainedShapes(container).iterator();
    while (iterator.hasNext()) {
      Shape shape = (Shape) iterator.next();
View Full Code Here

      for (Object bo : objects) {
        layoutHook(shape, ga, bo, newWidth, newHeight);
      }
    }

    Activity activity = BusinessObjectUtil.getFirstElementOfType(containerShape, Activity.class);
    new AbstractBoundaryEventOperation() {
      @Override
      protected void doWorkInternal(ContainerShape container) {
        layoutPictogramElement(container);
      }
View Full Code Here

    ChopboxAnchor anchor = peService.createChopboxAnchor(containerShape);
    anchor.setReferencedGraphicsAlgorithm(ellipse);
    AnchorUtil.addFixedPointAnchors(containerShape, ellipse);

    Activity activity = event.getAttachedToRef();
    PictogramElement foundElem = BusinessObjectUtil.getFirstBaseElementFromDiagram(getDiagram(), activity);
    if (foundElem != null && foundElem instanceof ContainerShape) {
      ContainerShape activityContainer = (ContainerShape) foundElem;
      PositionOnLine pos = BoundaryEventPositionHelper.getPositionOnLineUsingBPMNShape(containerShape,
              activityContainer);
View Full Code Here

  @Override
  public Object[] create(ICreateContext context) {
    BoundaryEvent event = null;
    try {
      Activity activity = (Activity) getBusinessObjectForPictogramElement(context.getTargetContainer());
      ModelHandler handler = ModelHandler.getInstance(getDiagram());
      event = ModelHandler.FACTORY.createBoundaryEvent();
//      event.setId(EcoreUtil.generateUUID());
      event.setAttachedToRef(activity);
      event.setName("Boundary event");
View Full Code Here

  }

  @Override
  protected void preMoveShape(IMoveShapeContext context) {
    ContainerShape targetContainer = context.getTargetContainer();
    Activity activity = BusinessObjectUtil.getFirstElementOfType(targetContainer, Activity.class);
    Object property = context.getProperty(ActivityMoveFeature.ACTIVITY_MOVE_PROPERTY);
    if (activity != null && property == null) {
      ContainerShape taskContainer = context.getTargetContainer();
      ContainerShape parentContainer = (ContainerShape) context.getPictogramElement().eContainer();
View Full Code Here

    protected Object handleGetEffect()
    {
        // Effect is mapped to action, not activity
        // We return the first action encountered in the activity
        Action effectAction = null;
        Activity effect = this.metaObject.getEffect();
        if (effect != null)
        {
            Collection nodes = effect.getNodes();
            for (Iterator nodesIt = nodes.iterator(); nodesIt.hasNext() && effectAction == null;)
            {
                Object nextNode = nodesIt.next();
                if (nextNode instanceof Action)
                {
View Full Code Here

     *
     * @see org.andromda.metafacades.uml.ActionStateFacade#getEntry()
     */
    protected java.lang.Object handleGetEntry()
    {
        Activity activity = this.metaObject.getEntry();
        if (activity != null)
        {
            for (Iterator nodesIt = activity.getNodes().iterator(); nodesIt.hasNext();)
            {
                Object nextNode = nodesIt.next();
                if (nextNode instanceof Action)
                {
                    return nextNode;
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.mapstuff.useable.PlayerActivityEntity$Activity

Copyright © 2018 www.massapicom. 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.