Examples of GraphNode


Examples of org.eclipse.zest.core.widgets.GraphNode

  public void deselectDecomposition(Decomposition decomposition){
    cacheManager.markSelectedGoalDecompositionAsToRemove(decomposition);
   
    Element source = cacheManager.getSourceOfRelation(decomposition);
   
    GraphNode sourceNode = getNodeForElement(source);
   
    deselectTargets(sourceNode);
   
  }
View Full Code Here

Examples of org.eclipse.zest.core.widgets.GraphNode

   
  for (Object outgoingConnection : sourceNode.getSourceConnections()){
   
   

    GraphNode destinationNode = ((GraphConnection)outgoingConnection).getDestination();
   
    Element destinationElement = getElementForNode((GSSElementGraphNode) destinationNode);
   
    Decomposition decomposition = cacheManager.getDecompositionBetween(sourceElement, destinationElement);
    cacheManager.markSelectedGoalDecompositionAsToRemove(decomposition);
View Full Code Here

Examples of org.eclipse.zest.core.widgets.GraphNode

   *            a Relation between Elements
   */
  protected GraphConnection createConnection(final Relation relation) {
    Element target = cacheManager.getTargetOfRelation(relation);
    Element source = cacheManager.getSourceOfRelation(relation);
    GraphNode targetNode = getNodeForElement(target);
   
    if (targetNode == null)
      new Exception(relation + " has no vaild traget").printStackTrace();
 
   
    GraphNode sourceNode = getNodeForElement(source);
   
    if (sourceNode == null)
      new Exception(relation + " has no vaild source").printStackTrace();
   
    String weight = cacheManager.getRelationWeightString(relation);
View Full Code Here

Examples of org.eclipse.zest.core.widgets.GraphNode

      return result;
    }
   
    public void setCaptionsForLayers(String layerCaption, int layerIndex){
      layerCaptions.put(layerIndex,layerCaption );
      GraphNode node = layerLabelGraphNodeList.get(layerIndex);
      String formatedCaption = formatCaption(layerCaption, node.getSize().height);
      node.setText(formatedCaption);
    }
View Full Code Here

Examples of org.eclipse.zest.core.widgets.GraphNode

      node.setText(formatedCaption);
    }
   
    public void setToolTipsForLayers(IFigure tooltip, int layerIndex){

      GraphNode node = layerLabelGraphNodeList.get(layerIndex);

      node.setTooltip(tooltip);
    }
View Full Code Here

Examples of org.eclipse.zest.core.widgets.GraphNode

    for (GraphNode node : layerLinesGraphNodeList){
      node.setVisible(false);
    }
   
    for ( int i = 0; i< totalLevelOffset.size(); i++){
      GraphNode captionNode = layerLabelGraphNodeList.get(i);
     
      captionNode.setVisible(true);
     
      int height =sublevelCount.get(i) * (longestY+yOffset)-15;
      int width = captionNode.getSize().width;
      captionNode.setSize(width, height);
     
   
      int x = 5;
      int y = totalLevelOffset.get(i)*(longestY+yOffset)+5;
      captionNode.setLocation(x, y);
      if (i>0){
        //don't draw a line at the top
      GraphNode lineNode = layerLinesGraphNodeList.get(i-1);
      lineNode.setSize((longestX+xOffset)*highestNumberOfNodes, 1);
      lineNode.setLocation(x, y-8);
      lineNode.setVisible(true);
      }
    } 
   
    repairCaptions();
  }
View Full Code Here

Examples of org.locationtech.geogig.storage.GraphDatabase.GraphNode

    @Override
    protected Boolean _call() {
        Preconditions.checkState(start != null, "start commit has not been set.");
        Preconditions.checkState(end != null, "end commit has not been set.");

        GraphNode node = graphDb.getNode(start);
        return isSparsePath(node, end, false);
    }
View Full Code Here

Examples of problems.geeks.graph.Q002A_Depth_First_Traversal_for_a_Graph.GraphNode

    // use a queue to do breadth-first traversal
    Queue<GraphNode> queue = new LinkedList<GraphNode>();
    queue.add(node);
   
    while (!queue.isEmpty()) {
      GraphNode curr = queue.poll();
     
      if (!set.contains(curr)) {
        // visit the node
        visit(curr);
       
        // mark it as visited
        set.add(curr);
      }
     
      for (int i = 0; i < curr.neighbors.size(); i++) {
        GraphNode neighbor = curr.neighbors.get(i);
        if (!set.contains(neighbor)) {
          queue.add(neighbor);
        }
      }
    }
View Full Code Here

Examples of vg.core.graph.GraphNode

      TreeModel tm = this.tree.getModel();
      if(tm == null) {
        VisualGraph.log.printDebug("[" + this.getClass().getName()+".actionPerformed] [BAD] Openning of subgraph in new tab(from navigator). Model = null.");
        return;
      } else {
        GraphNode node = ((GraphNode)tm.getRoot()).getNode(p[0]);
        if(node.getInnerGraph() != null) {
          StorableSubGraph ssg = this.model.getStorableSubGraph(node.getInnerGraph());
          IGraphView igv = GraphView.newGraphView(ssg, this.userInterface);
          UIRequestOpenSubGraph req = new UIRequestOpenSubGraph(igv, null);
          this.userInterface.addRequest(req);
        } else {
          VisualGraph.windowMessage.warningMessage("Selection should be subgraph, if you want to open subgraph in new tab", "Opening of subgraph");       
View Full Code Here

Examples of weka.gui.graphvisualizer.GraphNode

  public void layoutCompleted(LayoutCompleteEvent le) {
    LayoutEngine layoutEngine  = m_layoutEngine; // (LayoutEngine) le.getSource();
    FastVector nPosX = new FastVector(m_BayesNet.getNrOfNodes());
    FastVector nPosY = new FastVector(m_BayesNet.getNrOfNodes());
    for (int iNode = 0; iNode < layoutEngine.getNodes().size(); iNode++) {
      GraphNode gNode = (GraphNode) layoutEngine.getNodes().elementAt(iNode);
      if (gNode.nodeType == GraphNode.NORMAL) {
        nPosX.addElement(gNode.x);
        nPosY.addElement(gNode.y);
      }
    }
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.