Search in sources :

Example 6 with CrossoverScalingControl

use of edu.uci.ics.jung.visualization.control.CrossoverScalingControl in project titan.EclipsePlug-ins by eclipse.

the class GraphHandler method zoom.

/**
 * This function does zooming on the graph (both satellite and main views).
 *
 * @param scale
 *            : The zooming multiplier (zoom out if <1 and zoom in if >1, no
 *            change in case of 1)
 */
public void zoom(final float scale) {
    if (actVisualisator == null) {
        return;
    }
    final CrossoverScalingControl control = new CrossoverScalingControl();
    control.scale(actVisualisator, scale, actVisualisator.getCenter());
}
Also used : CrossoverScalingControl(edu.uci.ics.jung.visualization.control.CrossoverScalingControl)

Example 7 with CrossoverScalingControl

use of edu.uci.ics.jung.visualization.control.CrossoverScalingControl in project titan.EclipsePlug-ins by eclipse.

the class GraphHandler method initSatView.

private void initSatView() {
    if (actVisualisator == null) {
        return;
    }
    satView = new CustomSatelliteViewer(actVisualisator);
    satView.getRenderContext().setVertexLabelTransformer(NODE_LABELER);
    satView.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);
    satView.getRenderContext().setVertexShapeTransformer(renderer.getShape());
    satView.getRenderContext().setVertexFillPaintTransformer(renderer.getVertexColour());
    satView.scaleToLayout(new CrossoverScalingControl());
}
Also used : CustomSatelliteViewer(org.eclipse.titanium.graph.gui.common.CustomSatelliteViewer) CrossoverScalingControl(edu.uci.ics.jung.visualization.control.CrossoverScalingControl)

Aggregations

CrossoverScalingControl (edu.uci.ics.jung.visualization.control.CrossoverScalingControl)7 ScalingControl (edu.uci.ics.jung.visualization.control.ScalingControl)5 JButton (javax.swing.JButton)4 JPanel (javax.swing.JPanel)4 GraphMouse (edu.uci.ics.jung.visualization.VisualizationViewer.GraphMouse)2 DefaultModalGraphMouse (edu.uci.ics.jung.visualization.control.DefaultModalGraphMouse)2 ActionEvent (java.awt.event.ActionEvent)2 ActionListener (java.awt.event.ActionListener)2 JCheckBox (javax.swing.JCheckBox)2 ArchetypeEdge (edu.uci.ics.jung.graph.ArchetypeEdge)1 ArchetypeVertex (edu.uci.ics.jung.graph.ArchetypeVertex)1 Edge (edu.uci.ics.jung.graph.Edge)1 Graph (edu.uci.ics.jung.graph.Graph)1 Vertex (edu.uci.ics.jung.graph.Vertex)1 DefaultToolTipFunction (edu.uci.ics.jung.graph.decorators.DefaultToolTipFunction)1 EdgePaintFunction (edu.uci.ics.jung.graph.decorators.EdgePaintFunction)1 EdgeShape (edu.uci.ics.jung.graph.decorators.EdgeShape)1 EdgeStringer (edu.uci.ics.jung.graph.decorators.EdgeStringer)1 EdgeStrokeFunction (edu.uci.ics.jung.graph.decorators.EdgeStrokeFunction)1 VertexPaintFunction (edu.uci.ics.jung.graph.decorators.VertexPaintFunction)1