本文整理汇总了Java中com.mxgraph.analysis.mxGraphProperties.GraphType类的典型用法代码示例。如果您正苦于以下问题:Java GraphType类的具体用法?Java GraphType怎么用?Java GraphType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GraphType类属于com.mxgraph.analysis.mxGraphProperties包,在下文中一共展示了GraphType类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: configureLayout
import com.mxgraph.analysis.mxGraphProperties.GraphType; //导入依赖的package包/类
public void configureLayout(mxGraph graph, GraphType graphType, mxAnalysisGraph aGraph) {
this.graph = graph;
this.graphType = graphType;
this.aGraph = aGraph;
this.numNodesField.setText(String.valueOf(getNumNodes()));
this.numEdgesField.setText(String.valueOf(getNumEdges()));
this.valenceField.setText(String.valueOf(getValence()));
this.numRowsField.setText(String.valueOf(getNumRows()));
this.numColumnsField.setText(String.valueOf(getNumColumns()));
this.gridSpacingField.setText(String.valueOf(getGridSpacing()));
this.numVertexesLeftField.setText(String.valueOf(getNumVertexesLeft()));
this.numVertexesRightField.setText(String.valueOf(getNumVertexesRight()));
this.groupSpacingField.setText(String.valueOf(getGroupSpacing()));
this.arrowsBox.setSelected(arrows);
this.startVertexValueField.setText(String.valueOf(getStartVertexValue()));
this.endVertexValueField.setText(String.valueOf(getEndVertexValue()));
this.selfLoopBox.setSelected(allowSelfLoops);
this.multipleEdgeBox.setSelected(allowMultipleEdges);
this.forceConnectedBox.setSelected(forceConnected);
this.weightedBox.setSelected(weighted);
this.maxWeightField.setText(String.valueOf(getMaxWeight()));
this.minWeightField.setText(String.valueOf(getMinWeight()));
this.numBranchesField.setText(String.valueOf(getNumBranches()));
this.numVertexesInBranchField.setText(String.valueOf(getNumVertexesInBranch()));
}
开发者ID:ModelWriter,项目名称:Tarski,代码行数:27,代码来源:GraphConfigDialog.java
示例2: configureLayout
import com.mxgraph.analysis.mxGraphProperties.GraphType; //导入依赖的package包/类
public void configureLayout(mxGraph graph, GraphType graphType, mxAnalysisGraph aGraph)
{
this.graph = graph;
this.graphType = graphType;
this.aGraph = aGraph;
this.numNodesField.setText(String.valueOf(getNumNodes()));
this.numEdgesField.setText(String.valueOf(getNumEdges()));
this.valenceField.setText(String.valueOf(getValence()));
this.numRowsField.setText(String.valueOf(getNumRows()));
this.numColumnsField.setText(String.valueOf(getNumColumns()));
this.gridSpacingField.setText(String.valueOf(getGridSpacing()));
this.numVertexesLeftField.setText(String.valueOf(getNumVertexesLeft()));
this.numVertexesRightField.setText(String.valueOf(getNumVertexesRight()));
this.groupSpacingField.setText(String.valueOf(getGroupSpacing()));
this.arrowsBox.setSelected(arrows);
this.startVertexValueField.setText(String.valueOf(getStartVertexValue()));
this.endVertexValueField.setText(String.valueOf(getEndVertexValue()));
this.selfLoopBox.setSelected(allowSelfLoops);
this.multipleEdgeBox.setSelected(allowMultipleEdges);
this.forceConnectedBox.setSelected(forceConnected);
this.weightedBox.setSelected(weighted);
this.maxWeightField.setText(String.valueOf(getMaxWeight()));
this.minWeightField.setText(String.valueOf(getMinWeight()));
this.numBranchesField.setText(String.valueOf(getNumBranches()));
this.numVertexesInBranchField.setText(String.valueOf(getNumVertexesInBranch()));
}
开发者ID:ModelWriter,项目名称:Tarski,代码行数:28,代码来源:GraphConfigDialog.java
示例3: InsertGraph
import com.mxgraph.analysis.mxGraphProperties.GraphType; //导入依赖的package包/类
/**
* @param aGraph
*
*/
public InsertGraph(GraphType tree, mxAnalysisGraph aGraph)
{
this.graphType = tree;
this.aGraph = aGraph;
}
开发者ID:ModelWriter,项目名称:Tarski,代码行数:10,代码来源:EditorMenuBar.java
示例4: actionPerformed
import com.mxgraph.analysis.mxGraphProperties.GraphType; //导入依赖的package包/类
/**
*
*/
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,代码行数:68,代码来源:EditorMenuBar.java
示例5: InsertGraph
import com.mxgraph.analysis.mxGraphProperties.GraphType; //导入依赖的package包/类
/**
* @param aGraph
*
*/
public InsertGraph(GraphType tree, mxAnalysisGraph aGraph) {
this.graphType = tree;
this.aGraph = aGraph;
}
开发者ID:ModelWriter,项目名称:Tarski,代码行数:9,代码来源:EditorMenuBar.java
示例6: actionPerformed
import com.mxgraph.analysis.mxGraphProperties.GraphType; //导入依赖的package包/类
/**
*
*/
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
注:本文中的com.mxgraph.analysis.mxGraphProperties.GraphType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论