Search in sources :

Example 1 with ISOMLayout

use of edu.uci.ics.jung.visualization.ISOMLayout in project tdq-studio-se by Talend.

the class JungGraphGenerator method generate.

public Composite generate(Composite parent, boolean isWithHelp) {
    Composite frameComp = createAWTSWTComposite(parent);
    frame = SWT_AWT.new_Frame(frameComp);
    // $NON-NLS-1$
    frame.setTitle(DefaultMessagesImpl.getString("JungGraphGenerator.NominalAnalysis"));
    pr = new LineRender(graphbuilder);
    sr = new LineRender(graphbuilder);
    PersistentLayout layout = new PersistentLayoutImpl(new ISOMLayout(graph));
    VisualizationModel vm = new DefaultVisualizationModel(layout);
    vv = new VisualizationViewer(vm, pr);
    sv = new SatelliteVisualizationViewer(vv, vm, sr, new Dimension(200, 200));
    configureVViewer(vv);
    // create contollers
    JPanel controllers = createToolControllers(vv);
    // MOD yyi 2009-09-09 feature 8834
    if (this.isPreview)
        controllers.setVisible(false);
    JPanel panel = new GraphZoomScrollPane(vv);
    if (isWithHelp) {
        helpDialog = createSatelliteDialog(vv, sv);
        controllers.add(createShowSatelliteCheck(helpDialog));
    }
    frame.add(panel);
    frame.add(controllers, BorderLayout.SOUTH);
    frame.validate();
    addListeners();
    return frameComp;
}
Also used : SatelliteVisualizationViewer(edu.uci.ics.jung.visualization.control.SatelliteVisualizationViewer) JPanel(javax.swing.JPanel) DefaultVisualizationModel(edu.uci.ics.jung.visualization.DefaultVisualizationModel) Composite(org.eclipse.swt.widgets.Composite) VisualizationModel(edu.uci.ics.jung.visualization.VisualizationModel) DefaultVisualizationModel(edu.uci.ics.jung.visualization.DefaultVisualizationModel) PersistentLayoutImpl(edu.uci.ics.jung.visualization.PersistentLayoutImpl) SatelliteVisualizationViewer(edu.uci.ics.jung.visualization.control.SatelliteVisualizationViewer) VisualizationViewer(edu.uci.ics.jung.visualization.VisualizationViewer) GraphZoomScrollPane(edu.uci.ics.jung.visualization.GraphZoomScrollPane) PersistentLayout(edu.uci.ics.jung.visualization.PersistentLayout) Dimension(java.awt.Dimension) ISOMLayout(edu.uci.ics.jung.visualization.ISOMLayout)

Aggregations

DefaultVisualizationModel (edu.uci.ics.jung.visualization.DefaultVisualizationModel)1 GraphZoomScrollPane (edu.uci.ics.jung.visualization.GraphZoomScrollPane)1 ISOMLayout (edu.uci.ics.jung.visualization.ISOMLayout)1 PersistentLayout (edu.uci.ics.jung.visualization.PersistentLayout)1 PersistentLayoutImpl (edu.uci.ics.jung.visualization.PersistentLayoutImpl)1 VisualizationModel (edu.uci.ics.jung.visualization.VisualizationModel)1 VisualizationViewer (edu.uci.ics.jung.visualization.VisualizationViewer)1 SatelliteVisualizationViewer (edu.uci.ics.jung.visualization.control.SatelliteVisualizationViewer)1 Dimension (java.awt.Dimension)1 JPanel (javax.swing.JPanel)1 Composite (org.eclipse.swt.widgets.Composite)1