satellite =
new SatelliteVisualizationViewer<String,Number>(vv, new Dimension(200,200));
satellite.getRenderContext().setEdgeDrawPaintTransformer(new PickableEdgePaintTransformer<Number>(satellite.getPickedEdgeState(), Color.black, Color.cyan));
satellite.getRenderContext().setVertexFillPaintTransformer(new PickableVertexPaintTransformer<String>(satellite.getPickedVertexState(), Color.red, Color.yellow));
ScalingControl satelliteScaler = new CrossoverScalingControl();
satellite.scaleToLayout(satelliteScaler);
JFrame frame = new JFrame();
desktop = new JDesktopPane();
Container content = frame.getContentPane();
JPanel panel = new JPanel(new BorderLayout());
panel.add(desktop);
content.add(panel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JInternalFrame vvFrame = new JInternalFrame();
vvFrame.getContentPane().add(vv);
vvFrame.pack();
vvFrame.setVisible(true); //necessary as of 1.3
desktop.add(vvFrame);
try {
vvFrame.setSelected(true);
} catch (java.beans.PropertyVetoException e) {}
dialog = new JInternalFrame();
desktop.add(dialog);
content = dialog.getContentPane();
final ScalingControl scaler = new CrossoverScalingControl();
JButton plus = new JButton("+");
plus.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
scaler.scale(vv, 1.1f, vv.getCenter());
}
});
JButton minus = new JButton("-");
minus.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
scaler.scale(vv, 1/1.1f, vv.getCenter());
}
});
JButton dismiss = new JButton("Dismiss");
dismiss.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {