- Timestamp:
- Oct 17, 2010, 12:00:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/MetisMQIDemo/src/main/java/weka/clusterers/forMetisMQI/util/Util.java
r29 r31 42 42 public static JPanel panelClusters(Graph<Node, Edge> g, Set<Set<Node>> clusters, Transformer<Node,String> transformer) { 43 43 Layout<Node, Edge> layout = new KKLayout<Node, Edge>(g); 44 layout.setSize(new Dimension( 800, 600)); // sets the initial size of the space44 layout.setSize(new Dimension(700, 500)); // sets the initial size of the space 45 45 // The BasicVisualizationServer<V,E> is parameterized by the edge types 46 46 BasicVisualizationServer<Node, Edge> vv = new BasicVisualizationServer<Node, Edge>( … … 84 84 Transformer<Node, Paint> vertexPaint = new VertexPaintTransformer( 85 85 clusters); 86 vv.setPreferredSize(new Dimension( 800, 600)); // Sets the viewing area86 vv.setPreferredSize(new Dimension(700, 500)); // Sets the viewing area 87 87 // size 88 88 vv.getRenderContext().setVertexLabelTransformer(transformer); … … 92 92 93 93 public static JPanel panelGraph(Graph<Node, Edge> g){ 94 Layout<Node, Edge> layout = new FRLayout<Node, Edge>(g);95 layout.setSize(new Dimension( 800,600)); // sets the initial size of the space94 Layout<Node, Edge> layout = new KKLayout<Node, Edge>(g); 95 layout.setSize(new Dimension(700,500)); // sets the initial size of the space 96 96 // The BasicVisualizationServer<V,E> is parameterized by the edge types 97 97 BasicVisualizationServer<Node,Edge> vv = 98 98 new BasicVisualizationServer<Node,Edge>(layout); 99 vv.setPreferredSize(new Dimension( 800,600)); //Sets the viewing area size99 vv.setPreferredSize(new Dimension(700,500)); //Sets the viewing area size 100 100 vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<Node>()); 101 101 vv.getRenderContext().setEdgeLabelTransformer( … … 118 118 } 119 119 } 120 Layout<Node, Edge> layout = new FRLayout<Node, Edge>(g);121 layout.setSize(new Dimension( 800,600)); // sets the initial size of the space120 Layout<Node, Edge> layout = new KKLayout<Node, Edge>(g); 121 layout.setSize(new Dimension(700,500)); // sets the initial size of the space 122 122 // The BasicVisualizationServer<V,E> is parameterized by the edge types 123 123 BasicVisualizationServer<Node,Edge> vv = 124 124 new BasicVisualizationServer<Node,Edge>(layout); 125 vv.setPreferredSize(new Dimension( 800,600)); //Sets the viewing area size125 vv.setPreferredSize(new Dimension(700,500)); //Sets the viewing area size 126 126 vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<Node>()); 127 127 vv.getRenderContext().setEdgeLabelTransformer(new EdgeTransformer(edgeFlowMap)); … … 139 139 static public JPanel panelContractedGraph(CoarserGraphElement cge) { 140 140 Layout<Node, Edge> layout = new KKLayout<Node, Edge>(cge.getContracted()); 141 layout.setSize(new Dimension( 800,600)); // sets the initial size of the space141 layout.setSize(new Dimension(700,500)); // sets the initial size of the space 142 142 // The BasicVisualizationServer<V,E> is parameterized by the edge types 143 143 BasicVisualizationServer<Node,Edge> vv = 144 144 new BasicVisualizationServer<Node,Edge>(layout); 145 vv.setPreferredSize(new Dimension( 800,600)); //Sets the viewing area size145 vv.setPreferredSize(new Dimension(700,500)); //Sets the viewing area size 146 146 vv.getRenderContext().setVertexLabelTransformer(new ContractedVertexTransformer(cge)); 147 147 return vv;
Note: See TracChangeset
for help on using the changeset viewer.