本文整理汇总了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()));
}
示例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()));
}
示例3: InsertGraph
import com.mxgraph.analysis.mxGraphProperties.GraphType; //导入依赖的package包/类
/**
* @param aGraph
*
*/
public InsertGraph(GraphType tree, mxAnalysisGraph aGraph)
{
this.graphType = tree;
this.aGraph = aGraph;
}
示例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);
}
}
示例5: InsertGraph
import com.mxgraph.analysis.mxGraphProperties.GraphType; //导入依赖的package包/类
/**
* @param aGraph
*
*/
public InsertGraph(GraphType tree, mxAnalysisGraph aGraph) {
this.graphType = tree;
this.aGraph = aGraph;
}
示例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);
}
}