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