Normand Briere
2019-04-22 a9e12f6c508810604c8c91ee15451776b08ce1a1
timeflow/views/TimelineView.java
....@@ -5,6 +5,7 @@
55 import timeflow.data.db.DBUtils;
66 import timeflow.data.time.*;
77 import timeflow.model.*;
8
+
89 //import timeflow.views.CalendarView.CalendarPanel;
910 //import timeflow.views.CalendarView.ScrollingCalendar;
1011 import timeflow.vis.Mouseover;
....@@ -37,9 +38,10 @@
3738 return controls;
3839 }
3940
40
- public TimelineView(TFModel model)
41
+ public TimelineView(TimeflowModel model)
4142 {
4243 super(model);
44
+
4345 visuals = new TimelineVisuals(model);
4446 grid = new AxisRenderer(visuals);
4547 timeline = new TimelineRenderer(visuals);
....@@ -55,21 +57,22 @@
5557
5658 TimelineSlider slider = new TimelineSlider(visuals, 24 * 60 * 60 * 1000L, new Runnable()
5759 {
58
-
5960 @Override
6061 public void run()
6162 {
6263 redraw();
6364 }
6465 });
66
+
6567 bottom.add(slider, BorderLayout.CENTER);
6668
6769 controls = new JPanel();
68
- controls.setBackground(Color.white);
70
+ controls.setBackground(Color.red);
6971 controls.setLayout(new BorderLayout());//new GridLayout(2,1));
7072
7173 // top part of grid: zoom buttons.
7274 ComponentCluster buttons = new ComponentCluster("Zoom");
75
+
7376 //ImageIcon zoomOutIcon = new ImageIcon("images/zoom_out.gif");
7477 JButton zoomIn = new JButton("In 1/2X");
7578 buttons.addContent(zoomIn);
....@@ -123,7 +126,7 @@
123126 moveTime(visuals.getFitToVisibleRange());
124127 }});
125128 */
126
- controls.add(buttons, BorderLayout.NORTH);
129
+ controls.add(buttons, BorderLayout.SOUTH);
127130
128131 // ok, now do second part of grid: layout style buttons.
129132 ComponentCluster layoutPanel = new ComponentCluster("Layout");
....@@ -151,7 +154,7 @@
151154 graph.addActionListener(new LayoutSetter(TimelineVisuals.Layout.GRAPH));
152155 layoutGroup.add(graph);
153156
154
- controls.add(layoutPanel, BorderLayout.CENTER);
157
+ //controls.add(layoutPanel, BorderLayout.CENTER);
155158 }
156159
157160 class LayoutSetter implements ActionListener
....@@ -325,7 +328,7 @@
325328
326329 class TimelinePanel extends AbstractVisualizationView
327330 {
328
- public TimelinePanel(TFModel model)
331
+ public TimelinePanel(TimeflowModel model)
329332 {
330333 super(model);
331334