// --------------------------------------------------------------------
// launch the visualization
// create a panel for editing force values
ForceSimulator fsim = ((ForceDirectedLayout)animate.get(0)).getForceSimulator();
JForcePanel fpanel = new JForcePanel(fsim);
// JPanel opanel = new JPanel();
// opanel.setBorder(BorderFactory.createTitledBorder("Overview"));
// opanel.setBackground(Color.WHITE);
// opanel.add(overview);
final JValueSlider slider = new JValueSlider("Distance", 0, hops, hops);
slider.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
filter.setDistance(slider.getValue().intValue());
m_vis.run("draw");
}
});
slider.setBackground(Color.WHITE);
slider.setPreferredSize(new Dimension(300,30));
slider.setMaximumSize(new Dimension(300,30));
Box cf = new Box(BoxLayout.Y_AXIS);
cf.add(slider);
cf.setBorder(BorderFactory.createTitledBorder("Connectivity Filter"));
fpanel.add(cf);
//fpanel.add(opanel);
fpanel.add(Box.createVerticalGlue());
// create a new JSplitPane to present the interface
JSplitPane split = new JSplitPane();
split.setLeftComponent(display);
split.setRightComponent(fpanel);