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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sugiyamalayoutalgorithm.java

?? Java編譯osworkflow工作流系統(tǒng)的安裝和源代碼
?? 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));

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃久久精品一区二区| 色菇凉天天综合网| 美女一区二区在线观看| 亚洲国产人成综合网站| 一区二区三区四区在线播放| 日韩码欧中文字| 国产精品免费网站在线观看| 国产精品素人一区二区| 国产欧美日韩麻豆91| 国产视频一区在线播放| 久久综合狠狠综合| 久久久久久9999| 欧美国产一区二区| 中文字幕一区视频| 玉足女爽爽91| 三级不卡在线观看| 日本美女一区二区| 国产伦精品一区二区三区免费迷| 黄页视频在线91| 久久97超碰色| 久久国产精品色婷婷| 国产一区二区免费在线| 高清shemale亚洲人妖| 99re免费视频精品全部| 欧美午夜影院一区| 欧美一区二区三区视频在线观看| 日韩久久久久久| 国产精品欧美一区二区三区| 日韩久久一区二区| 香蕉影视欧美成人| 紧缚捆绑精品一区二区| 国产精品白丝av| 色悠悠久久综合| 777a∨成人精品桃花网| 欧美极品少妇xxxxⅹ高跟鞋| 一区二区三区自拍| 久久不见久久见免费视频1| 国产精品羞羞答答xxdd| 91国在线观看| 精品国产青草久久久久福利| 国产精品免费久久| 午夜在线成人av| 国产高清不卡二三区| eeuss鲁一区二区三区| 欧美日韩在线三级| 久久久久久久免费视频了| 亚洲黄色av一区| 极品美女销魂一区二区三区免费| av亚洲精华国产精华精| 欧美日韩国产乱码电影| 日本一区二区三区电影| 亚洲成在人线在线播放| 国产精品影视在线| 欧美在线观看你懂的| 久久亚洲一级片| 亚洲一区av在线| 国产**成人网毛片九色| 中文字幕一区二区三区四区不卡| 337p粉嫩大胆色噜噜噜噜亚洲| 日韩一区二区在线观看| 国产精品天美传媒| 日韩高清在线不卡| 91天堂素人约啪| 中文一区二区在线观看| 午夜精品久久久久久久久久| 粉嫩高潮美女一区二区三区| 欧美日韩国产高清一区二区三区| 国产精品青草综合久久久久99| 日韩成人精品在线| 91原创在线视频| 久久亚洲综合av| 日本不卡高清视频| 色屁屁一区二区| 国产三级精品三级| 美女视频黄a大片欧美| 欧美综合一区二区三区| 国产精品全国免费观看高清 | 亚洲精品日韩一| 国产精品亚洲第一区在线暖暖韩国| 欧美日韩成人在线| 亚洲日穴在线视频| 成人小视频在线| 欧美精品一区二区三区蜜桃| 亚洲成人av中文| 在线观看91精品国产入口| 中文欧美字幕免费| 国产一区二区三区四区在线观看| 91精品婷婷国产综合久久竹菊| 一区二区三区国产豹纹内裤在线| 成人精品一区二区三区四区| 精品国产区一区| 蜜臀99久久精品久久久久久软件| 欧美日韩成人一区二区| 性做久久久久久久久| 在线观看区一区二| 亚洲永久精品大片| 欧美性生活久久| 亚洲一区二区在线观看视频| 日本精品一级二级| 亚洲免费观看视频| 91黄色小视频| 亚洲综合色婷婷| 欧美视频三区在线播放| 夜夜爽夜夜爽精品视频| 在线观看亚洲精品| 亚洲伊人色欲综合网| 欧美色图一区二区三区| 一区二区三区精密机械公司| 欧美午夜在线一二页| 亚洲成人av中文| 欧美一区二区三区啪啪| 美女精品一区二区| 精品剧情在线观看| 国产91丝袜在线播放九色| 国产日本一区二区| 99re视频这里只有精品| 亚洲最新在线观看| 欧美精品高清视频| 久久精品国产一区二区三| 精品免费日韩av| 国产精品亚洲专一区二区三区| 日韩午夜中文字幕| 国产精品伊人色| 综合久久综合久久| 欧美性三三影院| 青草av.久久免费一区| 精品国产伦一区二区三区观看体验| 国产一区激情在线| 国产精品乱子久久久久| 91在线精品一区二区三区| 亚洲男同性视频| 欧美一区二区视频网站| 国产乱人伦偷精品视频免下载| 中文字幕av一区二区三区免费看 | 不卡av在线免费观看| 18欧美亚洲精品| 欧美肥妇free| 国产原创一区二区三区| 亚洲女子a中天字幕| 91精品欧美综合在线观看最新| 色香色香欲天天天影视综合网| 亚洲精品高清视频在线观看| 91精品国产免费| 国产aⅴ精品一区二区三区色成熟| 亚洲欧美日韩一区二区三区在线观看| 欧美精品一卡二卡| 国产91富婆露脸刺激对白| 亚洲午夜影视影院在线观看| 精品捆绑美女sm三区| 91网上在线视频| 麻豆视频观看网址久久| 亚洲欧美电影院| 精品日韩成人av| 91亚洲精品久久久蜜桃| 另类小说一区二区三区| 国产精品免费视频网站| 制服.丝袜.亚洲.中文.综合| 成人综合日日夜夜| 婷婷综合五月天| 中文在线一区二区| 欧美大肚乱孕交hd孕妇| 色吊一区二区三区| 国产乱色国产精品免费视频| 亚洲国产va精品久久久不卡综合| 久久午夜电影网| 欧美剧在线免费观看网站| 99视频精品免费视频| 另类小说综合欧美亚洲| 亚洲午夜一区二区| 欧美国产成人在线| 精品国产人成亚洲区| 欧美三级韩国三级日本三斤 | 欧美一区二区三区思思人| 91亚洲午夜精品久久久久久| 狠狠色综合色综合网络| 亚洲成人在线免费| 亚洲天堂成人在线观看| 久久久亚洲国产美女国产盗摄| 欧美久久免费观看| 一本大道久久a久久综合| 国产高清在线精品| 开心九九激情九九欧美日韩精美视频电影| 成人免费视频在线观看| 国产三级精品在线| 337p日本欧洲亚洲大胆精品 | 一区二区久久久久久| 国产欧美日本一区二区三区| 日韩精品在线一区| 在线播放91灌醉迷j高跟美女 | 久久精品国产亚洲a| 亚洲狠狠爱一区二区三区| 国产精品久线观看视频| 精品三级在线看| 日韩一区二区视频| 7777精品伊人久久久大香线蕉经典版下载| 色综合天天狠狠| 91丨九色porny丨蝌蚪| 成人av电影免费观看| 丰满少妇在线播放bd日韩电影| 国产一区二区不卡|