亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sugiyamalayoutalgorithm.java

?? Java編譯osworkflow工作流系統的安裝和源代碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
// This file is part of the Echidna project// (C) 2002 Forschungszentrum Informatik (FZI) Karlsruhe// Please visit our website at http://echidna.sf.netpackage com.opensymphony.workflow.designer.layout;import javax.swing.*;import org.jgraph.JGraph;import org.jgraph.graph.*;import java.awt.Point;import java.awt.Rectangle;import java.text.NumberFormat;import java.util.*;/** * Arranges the nodes with the Sugiyama Layout Algorithm.<br> * * <a href="http://plg.uwaterloo.ca/~itbowman/CS746G/Notes/Sugiyama1981_MVU/"> *  Link to the algorithm</a> * *<br> *<br> * @author Sven Luzar<br> * @version 1.0 init */public class SugiyamaLayoutAlgorithm implements LayoutAlgorithm{  /** Field for debug output   */  protected final boolean verbose = false;  /** Const to add Attributes at the Nodes   *   */  public static final String SUGIYAMA_VISITED = "SugiyamaVisited"/*#Frozen*/;  /** Const to add the Cell Wrapper to the Nodes   */  public static final String SUGIYAMA_CELL_WRAPPER = "SugiyamaCellWrapper"/*#Frozen*/;  /** represents the size of the grid in horizontal grid elements   *   */  protected int gridAreaSize = Integer.MIN_VALUE;  /** A List with Integer Objects. The List contains the   *  history of movements per loop   *  It was needed for the progress dialog   */  List movements = null;  /** Represents the movements in the current loop.   *  It was needed for the progress dialog   */  int movementsCurrentLoop = -1;  /** Represents the maximum of movements in the current loop.   *  It was needed for the progress dialog   */  int movementsMax = Integer.MIN_VALUE;  /** Represents the current loop number   *  It was needed for the progress dialog   */  int iteration = 0;  public static final String KEY_HORIZONTAL_SPACING = "HorizontalSpacing";  public static final String KEY_VERTICAL_SPACING = "VerticalSpacing";  /**   * Implementation.   *   * First of all the Algorithm searches the roots from the   * Graph. Starting from this roots the Algorithm creates   * levels and stores them in the member <code>levels</code>.   * The Member levels contains List Objects and the List per level   * contains Cell Wrapper Objects. After that the Algorithm   * tries to solve the edge crosses from level to level and   * goes top down and bottom up. After minimization of the   * edge crosses the algorithm moves each node to its   * bary center. Last but not Least the method draws the Graph.   *   * @see LayoutAlgorithm   *   */  public void perform(JGraph jgraph, boolean applyToAll, Properties configuration)  {    Object[] selectedCells = (applyToAll ? jgraph.getRoots() : jgraph.getSelectionCells());    CellView[] selectedCellViews = jgraph.getGraphLayoutCache().getMapping(selectedCells);    Point spacing = new Point();    /*  The Algorithm distributes the nodes on a grid.     *  For this grid you can configure the horizontal spacing.     *  This field specifies the configured value     *     */    spacing.x = Integer.parseInt(configuration.getProperty(KEY_HORIZONTAL_SPACING));    /*  The Algorithm distributes the nodes on a grid.     *  For this grid you can configure the vertical spacing.     *  This field specifies the configured value     *     */    spacing.y = Integer.parseInt(configuration.getProperty(KEY_VERTICAL_SPACING));    // search all roots    List roots = searchRoots(jgraph, selectedCellViews);    // return if no root found    if(roots.size() == 0)      return;    // create levels    List levels = fillLevels(jgraph, selectedCellViews, roots);    // solves the edge crosses    solveEdgeCrosses(jgraph, levels);    // move all nodes into the barycenter    moveToBarycenter(jgraph, selectedCellViews, levels);    Point min = findMinimumAndSpacing(selectedCellViews, spacing);    // draw the graph in the window    drawGraph(jgraph, levels, min, spacing);    // clean temp values from the nodes / cells    // the clean up was made in drawGraph    //cleanUp(selectedCellViews);  }  /** Debugdisplay for the edge crosses indicators on the System out   */  protected void displayEdgeCrossesValues(List levels)  {    System.out.println("----------------Edge Crosses Indicator Values"/*#Frozen*/);    for(int i = 0; i < levels.size() - 1; i++)    {      // Get the current level      List currentLevel = (List)levels.get(i);      System.out.print("Level (" + i + "):"/*#Frozen*/);      for(int j = 0; j < currentLevel.size(); j++)      {        CellWrapper sourceWrapper = (CellWrapper)currentLevel.get(j);        System.out.print(NumberFormat.getNumberInstance().format(sourceWrapper.getEdgeCrossesIndicator()) + " - "/*#Frozen*/);      }      System.out.println();    }  }  /** Debugdisplay for the grid positions on the System out   */  protected void displayGridPositions(List levels)  {    System.out.println("----------------GridPositions"/*#Frozen*/);    for(int i = 0; i < levels.size() - 1; i++)    {      // Get the current level      List currentLevel = (List)levels.get(i);      System.out.print("Level (" + i + "):"/*#Frozen*/);      for(int j = 0; j < currentLevel.size(); j++)      {        CellWrapper sourceWrapper = (CellWrapper)currentLevel.get(j);        System.out.print(NumberFormat.getNumberInstance().format(sourceWrapper.getGridPosition()) + " - "/*#Frozen*/);      }      System.out.println();    }  }  /** Debugdisplay for the priorities on the System out   */  protected void displayPriorities(List levels)  {    System.out.println("----------------down Priorities"/*#Frozen*/);    for(int i = 0; i < levels.size() - 1; i++)    {      // Get the current level      List currentLevel = (List)levels.get(i);      System.out.print("Level (" + i + "):"/*#Frozen*/);      for(int j = 0; j < currentLevel.size(); j++)      {        CellWrapper sourceWrapper = (CellWrapper)currentLevel.get(j);        System.out.print(sourceWrapper.getPriority() + /*" (" +                           sourceWrapper.nearestDownNeighborLevel + ") " +*/                         " - "/*#Frozen*/);      }      System.out.println();    }  }  /** Searches all Roots for the current Graph   *  First the method marks any Node as not visited.   *  Than calls searchRoots(MyGraphCell) for each   *  not visited Cell.   *  The Roots are stored in the List named roots   *   * 	@return returns a List with the roots   *  @see #searchRoots(JGraph, CellView[])   */  protected List searchRoots(JGraph jgraph, CellView[] selectedCellViews)  {    // get all cells and relations    List vertexViews = new ArrayList(selectedCellViews.length);    List roots = new ArrayList();    // first: mark all as not visited    // O(allCells&Edges)    for(int i = 0; i < selectedCellViews.length; i++)    {      if(selectedCellViews[i] instanceof VertexView)      {        VertexView vertexView = (VertexView)selectedCellViews[i];        vertexView.getAttributes().remove(SUGIYAMA_VISITED);        vertexViews.add(selectedCellViews[i]);      }    }    // O(graphCells)    for(int i = 0; i < vertexViews.size(); i++)    {      VertexView vertexView = (VertexView)vertexViews.get(i);      if(vertexView.getAttributes().get(SUGIYAMA_VISITED) == null)      {        searchRoots(jgraph, vertexView, roots);      }    }    // Error Msg if the graph has no roots    if(roots.size() == 0)    {      JOptionPane.showMessageDialog(null, "The Graph is not a DAG. Can't use Sugiyama Algorithm!"/*#Finished:Original="The Graph is not a DAG. Can't use Sugiyama Algorithm!"*/, null, JOptionPane.ERROR_MESSAGE);    }    return roots;  }  /** Searches Roots for the current Cell.   *   *  Therefore he looks at all Ports from the Cell.   *  At the Ports he looks for Edges.   *  At the Edges he looks for the Target.   *  If the Ports of the current Cell contains the target ReViewNodePort   *  he follows the edge to the source and looks at the   *  Cell for this source.   *   */  protected void searchRoots(JGraph jgraph, VertexView vertexViewToInspect, List roots)  {    // the node already visited    if(vertexViewToInspect.getAttributes().get(SUGIYAMA_VISITED) != null)    {      return;    }    // mark as visited for cycle tests    vertexViewToInspect.getAttributes().put(SUGIYAMA_VISITED, new Boolean(true));    GraphModel model = jgraph.getModel();    // get all Ports and search the relations at the ports    //List vertexPortViewList = new ArrayList() ;    Object vertex = vertexViewToInspect.getCell();    int portCount = model.getChildCount(vertex);    for(int j = 0; j < portCount; j++)    {      Object port = model.getChild(vertex, j);      // Test all relations for where      // the current node is a target node      // for roots      boolean isRoot = true;      Iterator itrEdges = model.edges(port);      while(itrEdges.hasNext())      {        Object edge = itrEdges.next();        // if the current node is a target node        // get the source node and test        // the source node for roots        if(model.getTarget(edge) == port)        {          Object sourcePort = model.getSource(edge);          Object sourceVertex = model.getParent(sourcePort);          CellView sourceVertexView = jgraph.getGraphLayoutCache().getMapping(sourceVertex, false);          if(sourceVertexView instanceof VertexView)          {            searchRoots(jgraph, (VertexView)sourceVertexView, roots);            isRoot = false;          }        }      }      // The current node is never a Target Node      // -> The current node is a root node      if(isRoot)      {        roots.add(vertexViewToInspect);      }    }  }  /** Method fills the levels and stores them in the member levels.   *  Each level was represended by a List with Cell Wrapper objects.   *  These Lists are the elements in the <code>levels</code> List.   *   */  protected List fillLevels(JGraph jgraph, CellView[] selectedCellViews, List rootVertexViews)  {    List levels = new ArrayList();    // mark as not visited    // O(allCells)    for(int i = 0; i < selectedCellViews.length; i++)    {      CellView cellView = selectedCellViews[i];      cellView.getAttributes().remove(SUGIYAMA_VISITED);    }    Iterator roots = rootVertexViews.iterator();    while(roots.hasNext())    {      VertexView vertexView = (VertexView)roots.next();      fillLevels(jgraph, levels, 0, vertexView);    }    return levels;  }  /** Fills the List for the specified level with a wrapper   *  for the MyGraphCell. After that the method called for   *  each neighbor graph cell.   *   *  @param level        The level for the graphCell   */  protected void fillLevels(JGraph jgraph, List levels, int level, VertexView vertexView)  {    // be sure that a List container exists for the current level    if(levels.size() == level)      levels.add(level, new ArrayList());    // if the cell already visited return    if(vertexView.getAttributes().get(SUGIYAMA_VISITED) != null)    {      return;    }    // mark as visited for cycle tests    vertexView.getAttributes().put(SUGIYAMA_VISITED, new Boolean(true));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆成人久久精品二区三区| 欧美日韩成人一区| 欧美国产激情二区三区| 国产91清纯白嫩初高中在线观看| 国产精品丝袜久久久久久app| av一区二区三区黑人| 一区二区三区中文字幕| 欧美日韩国产小视频在线观看| 男女男精品网站| 国产精品美女久久久久久久久久久| 成人动漫av在线| 蜜臀久久久99精品久久久久久| 国产亚洲婷婷免费| 欧美日韩成人一区| 波多野结衣中文字幕一区| 性欧美疯狂xxxxbbbb| 欧美精品一区二| 91精品国产黑色紧身裤美女| 不卡av电影在线播放| 亚洲r级在线视频| 中文字幕一区二区三区色视频 | 中文字幕一区二区5566日韩| 欧美日韩一区中文字幕| 国产黄色精品网站| 日本网站在线观看一区二区三区| 亚洲国产经典视频| 日韩欧美一区二区免费| 欧美精品久久久久久久多人混战 | 亚洲一区二区黄色| 国产欧美一区二区三区在线看蜜臀 | 91福利精品视频| 国产一区二区三区四区五区入口| 亚洲国产精品久久久久婷婷884 | 欧美喷潮久久久xxxxx| 成人av高清在线| 国产在线视频一区二区三区| 一区二区在线观看av| 日韩伦理av电影| 日韩一区中文字幕| 亚洲欧洲一区二区三区| 国产精品萝li| 一区二区三区 在线观看视频| 日韩伦理电影网| 日韩国产精品91| 国产91精品精华液一区二区三区 | 99精品偷自拍| 亚洲一卡二卡三卡四卡无卡久久| 国产精品三级av| 亚洲一区二区偷拍精品| 欧美日韩国产首页在线观看| 亚洲国产日日夜夜| 日韩精品一区二区三区中文不卡| 奇米精品一区二区三区在线观看一 | 欧美视频你懂的| 日韩不卡手机在线v区| 欧美一区二区福利在线| 国产99精品在线观看| 亚洲欧洲三级电影| 91精品国产一区二区三区香蕉 | 中文字幕精品综合| 成人精品高清在线| 日韩影院精彩在线| 日本一区二区三区dvd视频在线| 国产 日韩 欧美大片| 无吗不卡中文字幕| 国产精品国产三级国产aⅴ中文| 在线不卡免费欧美| 成a人片国产精品| 黄一区二区三区| 爽好多水快深点欧美视频| 中文字幕日韩精品一区| 欧美电影免费观看高清完整版在线 | 国产成人aaa| 亚洲bdsm女犯bdsm网站| 久久久精品人体av艺术| 日韩欧美不卡在线观看视频| 在线免费观看日本欧美| www.色精品| 成人美女在线观看| 国产风韵犹存在线视精品| 日韩电影一区二区三区四区| 亚洲裸体xxx| 亚洲一区在线观看网站| 亚洲综合另类小说| 亚洲永久免费av| 天天亚洲美女在线视频| 亚洲bdsm女犯bdsm网站| 亚洲福中文字幕伊人影院| 亚洲精品国产无套在线观| 中文在线一区二区| 亚洲日本在线看| 一区av在线播放| 日韩精品乱码免费| 久久99久久久久久久久久久| 日本成人在线网站| 国产精品99久久久久久似苏梦涵| 国产福利一区在线观看| 波多野结衣在线aⅴ中文字幕不卡| 99精品欧美一区二区三区综合在线| 成人黄色大片在线观看| 在线免费不卡电影| www国产精品av| 欧美日韩国产色站一区二区三区| 国产盗摄一区二区| av不卡免费电影| 7777精品伊人久久久大香线蕉| 欧美成va人片在线观看| 亚洲少妇最新在线视频| 免费看日韩精品| 日本高清不卡一区| 久久久99精品久久| 日韩精品久久理论片| 99久久久国产精品免费蜜臀| 在线成人高清不卡| 亚洲女同女同女同女同女同69| 日本在线不卡视频| 成人晚上爱看视频| 欧美性xxxxxxxx| 成人免费在线播放视频| 久久精品久久精品| 欧美老肥妇做.爰bbww| 国产农村妇女毛片精品久久麻豆| 午夜视频在线观看一区二区 | 91精品国产综合久久香蕉麻豆 | 国产精品一二三在| 6080国产精品一区二区| 亚洲精品免费看| 色综合久久综合网欧美综合网| 国产欧美日韩视频在线观看| 久久99久久99精品免视看婷婷| 51精品视频一区二区三区| 一区二区免费在线播放| 欧美午夜精品久久久久久孕妇| 国产精品视频九色porn| 99在线精品免费| 亚洲精品乱码久久久久久久久| 色偷偷久久一区二区三区| 国产精品久久久久影院亚瑟 | 亚洲国产高清不卡| av午夜一区麻豆| 亚洲人午夜精品天堂一二香蕉| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 99久久er热在这里只有精品15 | 午夜欧美在线一二页| 欧美一级二级三级乱码| 国内偷窥港台综合视频在线播放| 日韩一级二级三级| 国产成人三级在线观看| 一区二区日韩电影| 精品久久久久久最新网址| 成人高清视频在线观看| 亚洲小说欧美激情另类| 日韩三级视频在线看| 91在线视频播放| 天堂久久一区二区三区| 欧美极品aⅴ影院| 69久久99精品久久久久婷婷| 成人免费视频caoporn| 美美哒免费高清在线观看视频一区二区 | 3atv在线一区二区三区| 国产成人精品综合在线观看 | 日本精品裸体写真集在线观看 | 欧美三级三级三级爽爽爽| 国产自产2019最新不卡| 午夜视频在线观看一区二区| 国产精品久久久久影院亚瑟| 精品国产乱码久久久久久夜甘婷婷| 97精品视频在线观看自产线路二| 国产一区免费电影| 精品一区二区在线视频| 日韩精品五月天| 日本va欧美va精品发布| 亚洲一区在线观看免费| 一区二区三区自拍| 亚洲精选在线视频| 亚洲成人综合网站| 亚洲成av人片| 美国毛片一区二区| 久久99在线观看| 亚洲综合清纯丝袜自拍| 亚洲福利电影网| 青草国产精品久久久久久| 久久99久久99小草精品免视看| 亚洲电影在线播放| 久久99精品国产| 国产v日产∨综合v精品视频| 91丝袜美腿高跟国产极品老师 | 另类专区欧美蜜桃臀第一页| 日韩黄色小视频| 麻豆精品一区二区综合av| 狠狠色2019综合网| 99久久免费国产| 日韩一级免费观看| 国产情人综合久久777777| 中文字幕一区av| 蜜臀av性久久久久av蜜臀妖精| 国产高清在线观看免费不卡| 色综合久久天天| 久久亚洲春色中文字幕久久久| 亚洲欧洲无码一区二区三区|