|
@@ -8,6 +8,7 @@ import javax.swing.JLabel;
|
|
import javax.swing.JMenuBar;
|
|
import javax.swing.JMenuBar;
|
|
import javax.swing.JMenu;
|
|
import javax.swing.JMenu;
|
|
import javax.swing.JMenuItem;
|
|
import javax.swing.JMenuItem;
|
|
|
|
+import javax.swing.JSlider;
|
|
import javax.swing.JOptionPane;
|
|
import javax.swing.JOptionPane;
|
|
import javax.swing.JTree;
|
|
import javax.swing.JTree;
|
|
import javax.swing.border.LineBorder;
|
|
import javax.swing.border.LineBorder;
|
|
@@ -157,12 +158,12 @@ public class GUI implements CategoryListener {
|
|
private int yValueElements = 0;
|
|
private int yValueElements = 0;
|
|
|
|
|
|
private MyCanvas canvas;
|
|
private MyCanvas canvas;
|
|
- private UnitGraph testgraph;
|
|
+ private UnitGraph unitGraph;
|
|
private final JSplitPane splitPane_3 = new JSplitPane();
|
|
private final JSplitPane splitPane_3 = new JSplitPane();
|
|
private final JSlider sizeSlider = new JSlider();
|
|
private final JSlider sizeSlider = new JSlider();
|
|
private final JLabel lblImageSize = new JLabel("Image Size");
|
|
private final JLabel lblImageSize = new JLabel("Image Size");
|
|
|
|
|
|
- private final TimePanel timePanel;
|
|
+ private TimePanel timePanel;
|
|
|
|
|
|
|
|
|
|
* Create the application.
|
|
* Create the application.
|
|
@@ -171,10 +172,9 @@ public class GUI implements CategoryListener {
|
|
this.controller = control;
|
|
this.controller = control;
|
|
this.model = control.getModel();
|
|
this.model = control.getModel();
|
|
this.canvas = new MyCanvas(model, control);
|
|
this.canvas = new MyCanvas(model, control);
|
|
- this.testgraph = new UnitGraph(model, control);
|
|
+ this.unitGraph = new UnitGraph(model, control);
|
|
|
|
|
|
- timePanel = new TimePanel(model, controller);
|
|
+
|
|
- timePanel.setBorder(null);
|
|
|
|
|
|
|
|
|
|
|
|
control.initListener(this);
|
|
control.initListener(this);
|
|
@@ -232,7 +232,7 @@ public class GUI implements CategoryListener {
|
|
|
|
|
|
mnHelp.add(aboutUs);
|
|
mnHelp.add(aboutUs);
|
|
|
|
|
|
- testgraph.setBackground(Color.WHITE);
|
|
+ unitGraph.setBackground(Color.WHITE);
|
|
|
|
|
|
canvas.setBackground(Color.WHITE);
|
|
canvas.setBackground(Color.WHITE);
|
|
canvas.setPreferredSize(new Dimension(10000, 10000));
|
|
canvas.setPreferredSize(new Dimension(10000, 10000));
|
|
@@ -285,7 +285,7 @@ public class GUI implements CategoryListener {
|
|
*/
|
|
*/
|
|
scrollProperties.setViewportView(tableProperties);
|
|
scrollProperties.setViewportView(tableProperties);
|
|
tableHolonElementScrollPane.setViewportView(tableHolonElement);
|
|
tableHolonElementScrollPane.setViewportView(tableHolonElement);
|
|
- scrollGraph.setViewportView(testgraph);
|
|
+ scrollGraph.setViewportView(unitGraph);
|
|
graphLabel.setLayout(new BorderLayout(0, 10));
|
|
graphLabel.setLayout(new BorderLayout(0, 10));
|
|
graphLabel.add(maxGraph, BorderLayout.NORTH);
|
|
graphLabel.add(maxGraph, BorderLayout.NORTH);
|
|
graphLabel.add(medGraph, BorderLayout.CENTER);
|
|
graphLabel.add(medGraph, BorderLayout.CENTER);
|
|
@@ -323,7 +323,7 @@ public class GUI implements CategoryListener {
|
|
resetGraphBtn.addActionListener(new ActionListener() {
|
|
resetGraphBtn.addActionListener(new ActionListener() {
|
|
|
|
|
|
public void actionPerformed(ActionEvent arg0) {
|
|
public void actionPerformed(ActionEvent arg0) {
|
|
- testgraph.reset();
|
|
+ unitGraph.reset();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
toolBarHolonEl.add(btnDelHolEL);
|
|
toolBarHolonEl.add(btnDelHolEL);
|
|
@@ -347,7 +347,7 @@ public class GUI implements CategoryListener {
|
|
HolonElement ele = getActualHolonElement(obj, yValueElements);
|
|
HolonElement ele = getActualHolonElement(obj, yValueElements);
|
|
if (ele != null) {
|
|
if (ele != null) {
|
|
elementGraph.setText(ele.getEleName() + " ");
|
|
elementGraph.setText(ele.getEleName() + " ");
|
|
- testgraph.repaintWithNewElement(ele);
|
|
+ unitGraph.repaintWithNewElement(ele);
|
|
} else {
|
|
} else {
|
|
elementGraph.setText("None ");
|
|
elementGraph.setText("None ");
|
|
}
|
|
}
|
|
@@ -702,6 +702,16 @@ public class GUI implements CategoryListener {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ timePanel = new TimePanel(model, controller);
|
|
|
|
+ timePanel.setBorder(null);
|
|
|
|
+ ((JSlider)(timePanel.getComponent(1))).addChangeListener(new ChangeListener() {
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void stateChanged(ChangeEvent e) {
|
|
|
|
+ unitGraph.repaint();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
splitPane.setRightComponent(splitPane_1);
|
|
splitPane.setRightComponent(splitPane_1);
|
|
splitPane.setDividerLocation(200);
|
|
splitPane.setDividerLocation(200);
|
|
splitPane_1.setDividerLocation(500);
|
|
splitPane_1.setDividerLocation(500);
|