当前位置: 首页>>代码示例>>Java>>正文


Java GraphType.COMPLETE属性代码示例

本文整理汇总了Java中com.mxgraph.analysis.mxGraphProperties.GraphType.COMPLETE属性的典型用法代码示例。如果您正苦于以下问题:Java GraphType.COMPLETE属性的具体用法?Java GraphType.COMPLETE怎么用?Java GraphType.COMPLETE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.mxgraph.analysis.mxGraphProperties.GraphType的用法示例。


在下文中一共展示了GraphType.COMPLETE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: actionPerformed

/**
 * 
 */
public void actionPerformed(ActionEvent e)
{
	if (e.getSource() instanceof mxGraphComponent)
	{
		mxGraphComponent graphComponent = (mxGraphComponent) e.getSource();
		mxGraph graph = graphComponent.getGraph();

		// dialog = new FactoryConfigDialog();
		String dialogText = "";
		if (graphType == GraphType.NULL)
			dialogText = "Configure null graph";
		else if (graphType == GraphType.COMPLETE)
			dialogText = "Configure complete graph";
		else if (graphType == GraphType.NREGULAR)
			dialogText = "Configure n-regular graph";
		else if (graphType == GraphType.GRID)
			dialogText = "Configure grid graph";
		else if (graphType == GraphType.BIPARTITE)
			dialogText = "Configure bipartite graph";
		else if (graphType == GraphType.COMPLETE_BIPARTITE)
			dialogText = "Configure complete bipartite graph";
		else if (graphType == GraphType.BFS_DIR)
			dialogText = "Configure BFS algorithm";
		else if (graphType == GraphType.BFS_UNDIR)
			dialogText = "Configure BFS algorithm";
		else if (graphType == GraphType.DFS_DIR)
			dialogText = "Configure DFS algorithm";
		else if (graphType == GraphType.DFS_UNDIR)
			dialogText = "Configure DFS algorithm";
		else if (graphType == GraphType.DIJKSTRA)
			dialogText = "Configure Dijkstra's algorithm";
		else if (graphType == GraphType.BELLMAN_FORD)
			dialogText = "Configure Bellman-Ford algorithm";
		else if (graphType == GraphType.MAKE_TREE_DIRECTED)
			dialogText = "Configure make tree directed algorithm";
		else if (graphType == GraphType.KNIGHT_TOUR)
			dialogText = "Configure knight's tour";
		else if (graphType == GraphType.GET_ADJ_MATRIX)
			dialogText = "Configure adjacency matrix";
		else if (graphType == GraphType.FROM_ADJ_MATRIX)
			dialogText = "Input adjacency matrix";
		else if (graphType == GraphType.PETERSEN)
			dialogText = "Configure Petersen graph";
		else if (graphType == GraphType.WHEEL)
			dialogText = "Configure Wheel graph";
		else if (graphType == GraphType.STAR)
			dialogText = "Configure Star graph";
		else if (graphType == GraphType.PATH)
			dialogText = "Configure Path graph";
		else if (graphType == GraphType.FRIENDSHIP_WINDMILL)
			dialogText = "Configure Friendship Windmill graph";
		else if (graphType == GraphType.INDEGREE)
			dialogText = "Configure indegree analysis";
		else if (graphType == GraphType.OUTDEGREE)
			dialogText = "Configure outdegree analysis";
		GraphConfigDialog dialog = new GraphConfigDialog(graphType, dialogText);
		dialog.configureLayout(graph, graphType, aGraph);
		dialog.setModal(true);
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		Dimension frameSize = dialog.getSize();
		dialog.setLocation(screenSize.width / 2 - (frameSize.width / 2), screenSize.height / 2 - (frameSize.height / 2));
		dialog.setVisible(true);
	}
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:67,代码来源:EditorMenuBar.java

示例2: actionPerformed

/**
 * 
 */
public void actionPerformed(ActionEvent e) {
  if (e.getSource() instanceof mxGraphComponent) {
    mxGraphComponent graphComponent = (mxGraphComponent) e.getSource();
    mxGraph graph = graphComponent.getGraph();

    // dialog = new FactoryConfigDialog();
    String dialogText = "";
    if (graphType == GraphType.NULL)
      dialogText = "Configure null graph";
    else if (graphType == GraphType.COMPLETE)
      dialogText = "Configure complete graph";
    else if (graphType == GraphType.NREGULAR)
      dialogText = "Configure n-regular graph";
    else if (graphType == GraphType.GRID)
      dialogText = "Configure grid graph";
    else if (graphType == GraphType.BIPARTITE)
      dialogText = "Configure bipartite graph";
    else if (graphType == GraphType.COMPLETE_BIPARTITE)
      dialogText = "Configure complete bipartite graph";
    else if (graphType == GraphType.BFS_DIR)
      dialogText = "Configure BFS algorithm";
    else if (graphType == GraphType.BFS_UNDIR)
      dialogText = "Configure BFS algorithm";
    else if (graphType == GraphType.DFS_DIR)
      dialogText = "Configure DFS algorithm";
    else if (graphType == GraphType.DFS_UNDIR)
      dialogText = "Configure DFS algorithm";
    else if (graphType == GraphType.DIJKSTRA)
      dialogText = "Configure Dijkstra's algorithm";
    else if (graphType == GraphType.BELLMAN_FORD)
      dialogText = "Configure Bellman-Ford algorithm";
    else if (graphType == GraphType.MAKE_TREE_DIRECTED)
      dialogText = "Configure make tree directed algorithm";
    else if (graphType == GraphType.KNIGHT_TOUR)
      dialogText = "Configure knight's tour";
    else if (graphType == GraphType.GET_ADJ_MATRIX)
      dialogText = "Configure adjacency matrix";
    else if (graphType == GraphType.FROM_ADJ_MATRIX)
      dialogText = "Input adjacency matrix";
    else if (graphType == GraphType.PETERSEN)
      dialogText = "Configure Petersen graph";
    else if (graphType == GraphType.WHEEL)
      dialogText = "Configure Wheel graph";
    else if (graphType == GraphType.STAR)
      dialogText = "Configure Star graph";
    else if (graphType == GraphType.PATH)
      dialogText = "Configure Path graph";
    else if (graphType == GraphType.FRIENDSHIP_WINDMILL)
      dialogText = "Configure Friendship Windmill graph";
    else if (graphType == GraphType.INDEGREE)
      dialogText = "Configure indegree analysis";
    else if (graphType == GraphType.OUTDEGREE)
      dialogText = "Configure outdegree analysis";
    GraphConfigDialog dialog = new GraphConfigDialog(graphType, dialogText);
    dialog.configureLayout(graph, graphType, aGraph);
    dialog.setModal(true);
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = dialog.getSize();
    dialog.setLocation(screenSize.width / 2 - (frameSize.width / 2),
        screenSize.height / 2 - (frameSize.height / 2));
    dialog.setVisible(true);
  }
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:66,代码来源:EditorMenuBar.java


注:本文中的com.mxgraph.analysis.mxGraphProperties.GraphType.COMPLETE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。