|
@@ -61,6 +61,7 @@ public class splitPane extends JSplitPane implements GraphListener {
|
|
|
private DefaultMutableTreeNode objectsNode;
|
|
|
private DefaultMutableTreeNode wholeHolon;
|
|
|
private Hashtable<String, GraphDataSet> objectHashtable;
|
|
|
+ private Hashtable<String, StatisticGraphPanel> graphHashtable;
|
|
|
private JPanel colorPanel;
|
|
|
private PropertyDataSet currentProperty = new PropertyDataSet();
|
|
|
private JComboBox colorComboBox;
|
|
@@ -70,10 +71,10 @@ public class splitPane extends JSplitPane implements GraphListener {
|
|
|
JLabel showObjectlbl;
|
|
|
JLabel showPropertylbl;
|
|
|
public splitPane(Control cont) {
|
|
|
- //this.rightComponent
|
|
|
this.controller = cont;
|
|
|
objectHashtable = new Hashtable<String, GraphDataSet>();
|
|
|
-
|
|
|
+ graphHashtable = new Hashtable<String, StatisticGraphPanel>();
|
|
|
+
|
|
|
JScrollPane dataPane = new JScrollPane();
|
|
|
setLeftComponent(dataPane);
|
|
|
JPanel panel = new JPanel();
|
|
@@ -342,25 +343,26 @@ public class splitPane extends JSplitPane implements GraphListener {
|
|
|
JButton btnAdd = new JButton("Add");
|
|
|
btnAdd.addActionListener(new ActionListener() {
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
- /*
|
|
|
DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)objectTree.getLastSelectedPathComponent();
|
|
|
if(selectedNode == null){
|
|
|
return;
|
|
|
}else{
|
|
|
if(selectedNode.getLevel() == 3){
|
|
|
-
|
|
|
+ if(!graphHashtable.containsKey(graphNrTxtField.getText()) && graphNrTxtField.getText().length() > 0){
|
|
|
+ StatisticGraphPanel tmp = new StatisticGraphPanel(controller.getModel(), controller, graphNrTxtField.getText(),
|
|
|
+ graphHashtable);
|
|
|
+ tmp.setPreferredSize(new Dimension(280,150));
|
|
|
+ tmp.setMaximumSize(new Dimension(1000,150));
|
|
|
+ tmp.setMinimumSize(new Dimension(100,45));
|
|
|
+ tmp.setBorder(new LineBorder(new Color(0, 0, 0), 1));
|
|
|
+ graphPanel.add(tmp);
|
|
|
+ graphPanel.add(Box.createRigidArea(new Dimension(50,50)));
|
|
|
+ graphPanel.revalidate();
|
|
|
+ graphPanel.updateUI();
|
|
|
+ graphHashtable.put(graphNrTxtField.getText(), tmp);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- */
|
|
|
- StatisticGraphPanel tmp = new StatisticGraphPanel(controller.getModel(), controller, graphNrTxtField.getText());
|
|
|
- tmp.setPreferredSize(new Dimension(280,120));
|
|
|
- tmp.setMaximumSize(new Dimension(1000,120));
|
|
|
- tmp.setMinimumSize(new Dimension(100,45));
|
|
|
- tmp.setBorder(new LineBorder(new Color(0, 0, 0), 1));
|
|
|
- graphPanel.add(tmp);
|
|
|
- graphPanel.add(Box.createRigidArea(new Dimension(50,50)));
|
|
|
- graphPanel.revalidate();
|
|
|
- graphPanel.updateUI();
|
|
|
}
|
|
|
});
|
|
|
|