Beispiel #1
0
  public void draw(Object parent) {

    // Construct notation
    getNotationFactory()
        .createTask(
            getModelFactory(), m_subProcess, parent, getX(), getY(), getWidth(), getHeight());

    // m_initialState.draw(notation);
    // m_finalState.draw(notation);

    for (int i = 0; i < getChildStates().size(); i++) {
      BPMNActivity act = (BPMNActivity) getChildStates().get(i);

      act.draw(parent);

      if (i > 0) {
        BPMNActivity prev = (BPMNActivity) getChildStates().get(i - 1);

        prev.transitionTo(act, null, parent);
      }
    }

    // Create diagram sequence flows
    /*
    java.util.List<Object> seqflows=getModelFactory().getControlLinks(getContainer());

    for (Object seqflow : seqflows) {
    	getNotationFactory().createSequenceLink(getModelFactory(), seqflow, parent);
    }
    */

  }
Beispiel #2
0
  public void calculatePosition(int x, int y) {
    int curx = x + HORIZONTAL_GAP;
    int midy = (getHeight() / 2);

    setX(x);
    setY(y); // +VERTICAL_GAP);

    for (int i = 0; i < getChildStates().size(); i++) {
      BPMNActivity act = (BPMNActivity) getChildStates().get(i);

      act.calculatePosition(curx, y + (midy - (act.getHeight() / 2)));

      curx += (act.getWidth() + HORIZONTAL_GAP);
    }
  }
Beispiel #3
0
  protected void initialize(BPMNActivity parent) {

    m_subProcess = (TSubProcess) getModelFactory().createSubProcess(parent.getContainer());

    // Create initial state
    m_initialState =
        new JunctionActivity(
            getModelFactory().createInitialNode(getContainer()),
            this,
            getModelFactory(),
            getNotationFactory());

    // Create final state
    m_finalState =
        new JunctionActivity(
            getModelFactory().createFinalNode(getContainer()),
            this,
            getModelFactory(),
            getNotationFactory());
  }