Package org.emftrace.quarc.ui.zest.nodes

Examples of org.emftrace.quarc.ui.zest.nodes.GSSElementGraphNode


    for (int i = priorizedElementSet
        .getPrioritizedElements().size()-1; i>=0;i--) {
      PrioritizedElement selectedPrinciple = priorizedElementSet
          .getPrioritizedElements().get(i);
      Element element = selectedPrinciple.getElement();
      GSSElementGraphNode node = (GSSElementGraphNode) getNodeForElement(selectedPrinciple
          .getElement());
     
     
      if (node == null) { //due to changes principle is no longer applicable
        if( displayQuestionMessagebox(element.getName() + " is no longer applicable. Deselect Principle?")){
         
          new RemovePrioritizedElementCommand(priorizedElementSet, selectedPrinciple).run();
          }
        continue;
      }
       
      if (!cacheManager.isLeafAppicableElement(element))

        node.setIsExpanded();

      getCheckboxFigure(node).setIsChecked();
      selectedElementsMap.put(element, selectedPrinciple);
    }
View Full Code Here


        // GraphNode node = findNodeForElement(element);
        topFigure = new CheckboxFigure(false);

      }

      GSSElementGraphNode node = createNode(zestGraph, SWT.NONE, element,
          level, sublevel,
          cacheManager.isLeafAppicableElement(element),
          cacheManager.getAllApplicableIncomingRelations(element)
              .size() != 0, topFigure);
      if (element instanceof Principle) {
View Full Code Here

        }

        @Override
        public void checked() {
          GSSElementGraphNode node = (GSSElementGraphNode) getNodeForElement(element);

          List<Decomposition> outgoingDecompositions = getOutgoingDecomposition(node);
          List<Decomposition> incomingDecompositions = getIncomingDecompositions(node);

          addPriorizedElement(element, outgoingDecompositions,
              incomingDecompositions);

          if (!cacheManager.isLeafAppicableElement(element)) {
            node.setIsExpanded();
          }

          // add subElements

          for (Object connection : node.getTargetConnections()) {
            CheckboxFigure checkboxFigure = getCheckboxFigure((((GraphConnection) connection)
                .getSource()));
            if (checkboxFigure != null) // -> element == goal
              checkboxFigure.setIsChecked();
          }
View Full Code Here

   */
  public List<Element> getMarkedLeafSolutionInstruments() {
    List<Element> markedLeafSolutionInstruments = new ArrayList<Element>();
    for (Object node : zestGraph.getNodes()) {
      if (node instanceof GSSElementGraphNode) {
        GSSElementGraphNode gssElementGraphNode = (GSSElementGraphNode) node;
        if (((GSSElementGraphNode) node).isMarked()
            && gssElementGraphNode.getElement() instanceof SolutionInstrument
            && cacheManager
                .isLeaf(gssElementGraphNode.getElement())) {
          markedLeafSolutionInstruments.add(gssElementGraphNode.getElement());
        }
      }
    }
    return markedLeafSolutionInstruments;
  }
View Full Code Here

    }

    for (PrioritizedElement selectedGoal : priorizedElementSet
        .getPrioritizedElements()) {
      Element element = selectedGoal.getElement();
      GSSElementGraphNode node = (GSSElementGraphNode) getNodeForElement(selectedGoal
          .getElement());
      node.show();
      node.expandParents();
      if (!cacheManager.isLeaf(element)) {
        node.setIsExpanded();
      }
      getCheckboxFigure(node).setIsChecked();
      selectedElementsMap.put(element, selectedGoal);
    }
View Full Code Here

        // GraphNode node = findNodeForElement(element);
        topFigure = new CheckboxFigure(false);

      }

      GSSElementGraphNode node = createNode(zestGraph, SWT.NONE, element,
          level, sublevel, cacheManager.isLeaf(element),
          cacheManager.getAllIncomingRelationsForElement(element)
              .size() != 0, topFigure);
      if (element instanceof Goal) {
        selectionMap.put(node, topFigure);
View Full Code Here

        }

        @Override
        public void checked() {
          GSSElementGraphNode node = (GSSElementGraphNode) getNodeForElement(element);

          List<Decomposition> outgoingDecompositions = getOutgoingDecomposition(node);
          List<Decomposition> incomingDecompositions = getIncomingDecompositions(node);

          addPriorizedElement(element, outgoingDecompositions,
              incomingDecompositions);

          if (!cacheManager.isLeaf(element)) {
            node.setIsExpanded();
          }

          // add subElements

          for (Object connection : node.getTargetConnections()) {
            CheckboxFigure checkboxFigure = getCheckboxFigure((((GraphConnection) connection)
                .getSource()));
            if (checkboxFigure != null) // -> element == goal
              checkboxFigure.setIsChecked();
          }
View Full Code Here

      Goal goal = cacheManager.getGoalForSelectedGoal(priorizedGoal);

      int level = cacheManager.getLevel(goal);
      int sublevel = cacheManager.getSublevel(goal);

      GSSElementGraphNode node = createNode(zestGraph, SWT.NONE, goal,
          level, sublevel,
          cacheManager.getSelectedGoalsPriorizedDecompositionsForTarget(goal).isEmpty(), !cacheManager.getSelectedGoalsPriorizedDecompositionsForTarget(goal).isEmpty() ,null);
      setNodeImportance(node, goal);
    }
View Full Code Here

   * @return node has marked children
   */
  protected boolean hasMarkedSourceNodes(GraphNode node) {
    boolean result = false;
    for (Object connection : node.getTargetConnections()) {
      GSSElementGraphNode sourceNode = (GSSElementGraphNode) ((GraphConnection) connection).getSource();
      if (cacheManager.goalIsMarkedAsToRemove((Goal) getElementForNode(sourceNode))) {
        result = true;
        break;
      }

View Full Code Here

      Element element = cacheEntrySet.getValue();

      int level = cacheManager.getLevel(element);
      int sublevel = cacheManager.getSublevel(element);

      GSSElementGraphNode node = createNode(zestGraph, SWT.NONE, element,
          level, sublevel,
          cacheManager.isLeafAppicableElement(element), !cacheManager
              .getAllApplicableIncomingRelations(element)
              .isEmpty());
      if (element instanceof Goal)
View Full Code Here

TOP

Related Classes of org.emftrace.quarc.ui.zest.nodes.GSSElementGraphNode

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.