Commit 02ff7ca6 authored by stram's avatar stram
Browse files

Dynamic slider for graph. No need to let go of mouse.

git-svn-id: https://dynaq.opendfki.de/repos/application/trunk@1045 8b50620d-ddf8-0310-9f5d-8b2f31fd9ac4
parent 4f569e82
......@@ -459,14 +459,16 @@ public class DynaQDocumentGraph extends JPanel implements ActionListener, Compon
slider.addChangeListener(new ChangeListener(){
public void stateChanged(ChangeEvent e){
JSlider source = (JSlider)e.getSource();
int date = (int)source.getValue();
setVisibleNodes(graph,graph_visualization,date);
if(edgeQ_date!=null){
NumberRangeModel edge_nrm_date = edgeQ_date.getNumberModel();
edge_nrm_date.setValueRange(source.getMinimum(), date, source.getMinimum(), date);
updateEdgeCounter(graph, dslider.getDate(date));
}
if (!source.getValueIsAdjusting()) {
int date = (int)source.getValue();
setVisibleNodes(graph,graph_visualization,date);
if(edgeQ_date!=null){
NumberRangeModel edge_nrm_date = edgeQ_date.getNumberModel();
edge_nrm_date.setValueRange(source.getMinimum(), date, source.getMinimum(), date);
updateEdgeCounter(graph, dslider.getDate(date));
}
}
}
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment