Changeset 31 for tags/MetisMQIDemo


Ignore:
Timestamp:
Oct 17, 2010, 12:00:47 PM (14 years ago)
Author:
gnappo
Message:

Sistemata visualizzazione grafi per la demo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/MetisMQIDemo/src/main/java/weka/clusterers/forMetisMQI/util/Util.java

    r29 r31  
    4242        public static JPanel panelClusters(Graph<Node, Edge> g, Set<Set<Node>> clusters, Transformer<Node,String> transformer) {
    4343                Layout<Node, Edge> layout = new KKLayout<Node, Edge>(g);
    44                 layout.setSize(new Dimension(800, 600)); // sets the initial size of the space
     44                layout.setSize(new Dimension(700, 500)); // sets the initial size of the space
    4545                // The BasicVisualizationServer<V,E> is parameterized by the edge types
    4646                BasicVisualizationServer<Node, Edge> vv = new BasicVisualizationServer<Node, Edge>(
     
    8484                Transformer<Node, Paint> vertexPaint = new VertexPaintTransformer(
    8585                                clusters);
    86                 vv.setPreferredSize(new Dimension(800, 600)); // Sets the viewing area
     86                vv.setPreferredSize(new Dimension(700, 500)); // Sets the viewing area
    8787                                                                                                                // size
    8888                vv.getRenderContext().setVertexLabelTransformer(transformer);
     
    9292       
    9393        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 space
     94                Layout<Node, Edge> layout = new KKLayout<Node, Edge>(g);
     95                layout.setSize(new Dimension(700,500)); // sets the initial size of the space
    9696                // The BasicVisualizationServer<V,E> is parameterized by the edge types
    9797                BasicVisualizationServer<Node,Edge> vv =
    9898                new BasicVisualizationServer<Node,Edge>(layout);
    99                 vv.setPreferredSize(new Dimension(800,600)); //Sets the viewing area size
     99                vv.setPreferredSize(new Dimension(700,500)); //Sets the viewing area size
    100100                vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<Node>());
    101101                vv.getRenderContext().setEdgeLabelTransformer(
     
    118118                        }
    119119                }
    120                 Layout<Node, Edge> layout = new FRLayout<Node, Edge>(g);
    121                 layout.setSize(new Dimension(800,600)); // sets the initial size of the space
     120                Layout<Node, Edge> layout = new KKLayout<Node, Edge>(g);
     121                layout.setSize(new Dimension(700,500)); // sets the initial size of the space
    122122                // The BasicVisualizationServer<V,E> is parameterized by the edge types
    123123                BasicVisualizationServer<Node,Edge> vv =
    124124                new BasicVisualizationServer<Node,Edge>(layout);
    125                 vv.setPreferredSize(new Dimension(800,600)); //Sets the viewing area size
     125                vv.setPreferredSize(new Dimension(700,500)); //Sets the viewing area size
    126126                vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<Node>());
    127127                vv.getRenderContext().setEdgeLabelTransformer(new EdgeTransformer(edgeFlowMap));
     
    139139        static public JPanel panelContractedGraph(CoarserGraphElement cge) {
    140140                Layout<Node, Edge> layout = new KKLayout<Node, Edge>(cge.getContracted());
    141                 layout.setSize(new Dimension(800,600)); // sets the initial size of the space
     141                layout.setSize(new Dimension(700,500)); // sets the initial size of the space
    142142                // The BasicVisualizationServer<V,E> is parameterized by the edge types
    143143                BasicVisualizationServer<Node,Edge> vv =
    144144                new BasicVisualizationServer<Node,Edge>(layout);
    145                 vv.setPreferredSize(new Dimension(800,600)); //Sets the viewing area size
     145                vv.setPreferredSize(new Dimension(700,500)); //Sets the viewing area size
    146146                vv.getRenderContext().setVertexLabelTransformer(new ContractedVertexTransformer(cge));
    147147                return vv;
Note: See TracChangeset for help on using the changeset viewer.