|
@@ -80,6 +80,10 @@ public class GUI implements CategoryListener {
|
|
private final JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
|
private final JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
|
private final JScrollPane scrollPane_2 = new JScrollPane();
|
|
private final JScrollPane scrollPane_2 = new JScrollPane();
|
|
|
|
|
|
|
|
+ private final JLabel maxGraph = new JLabel("100%");
|
|
|
|
+ private final JLabel medGraph = new JLabel("50%");
|
|
|
|
+ private final JLabel minGraph = new JLabel("0%");
|
|
|
|
+
|
|
private final JTree tree = new JTree();
|
|
private final JTree tree = new JTree();
|
|
private final JEditorPane dtrpnHereWillBe = new JEditorPane();
|
|
private final JEditorPane dtrpnHereWillBe = new JEditorPane();
|
|
/******************************************
|
|
/******************************************
|
|
@@ -239,7 +243,7 @@ public class GUI implements CategoryListener {
|
|
*/
|
|
*/
|
|
|
|
|
|
// Set up of the HolonElements section
|
|
// Set up of the HolonElements section
|
|
- Object[] columnNames = { "Device", "Type", "Energy", "Quantity" };
|
|
|
|
|
|
+ Object[] columnNames = { "Device", "Energy", "Quantity" };
|
|
tableModelHolonElement.setColumnIdentifiers(columnNames);
|
|
tableModelHolonElement.setColumnIdentifiers(columnNames);
|
|
tableHolonElement.setModel(tableModelHolonElement);
|
|
tableHolonElement.setModel(tableModelHolonElement);
|
|
tableHolonElement.setFillsViewportHeight(true);
|
|
tableHolonElement.setFillsViewportHeight(true);
|
|
@@ -269,7 +273,14 @@ public class GUI implements CategoryListener {
|
|
scrollProperties.setViewportView(tableProperties);
|
|
scrollProperties.setViewportView(tableProperties);
|
|
tableHolonElementScrollPane.setViewportView(tableHolonElement);
|
|
tableHolonElementScrollPane.setViewportView(tableHolonElement);
|
|
scrollGraph.setViewportView(testgraph);
|
|
scrollGraph.setViewportView(testgraph);
|
|
-
|
|
|
|
|
|
+ JPanel graphLabel = new JPanel();
|
|
|
|
+ graphLabel.setLayout(new BoxLayout(graphLabel, BoxLayout.Y_AXIS));
|
|
|
|
+ minGraph.setBounds(0, 150, 10, 10);
|
|
|
|
+ graphLabel.add(maxGraph);
|
|
|
|
+ graphLabel.add(medGraph);
|
|
|
|
+ graphLabel.add(minGraph);
|
|
|
|
+
|
|
|
|
+ scrollGraph.setRowHeaderView(graphLabel);
|
|
scrollElements.setLayout(new BorderLayout(0, 0));
|
|
scrollElements.setLayout(new BorderLayout(0, 0));
|
|
scrollElements.add(panel_HolonEl, BorderLayout.NORTH);
|
|
scrollElements.add(panel_HolonEl, BorderLayout.NORTH);
|
|
scrollElements.add(tableHolonElementScrollPane);
|
|
scrollElements.add(tableHolonElementScrollPane);
|
|
@@ -307,7 +318,9 @@ public class GUI implements CategoryListener {
|
|
|
|
|
|
tableHolonElement.addMouseListener(new MouseAdapter() {
|
|
tableHolonElement.addMouseListener(new MouseAdapter() {
|
|
public void mousePressed(MouseEvent e) {
|
|
public void mousePressed(MouseEvent e) {
|
|
|
|
+ HolonObject obj = (HolonObject) getActualCps();
|
|
yValueElements = e.getY();
|
|
yValueElements = e.getY();
|
|
|
|
+ testgraph.repaintWithNewElement(getActualHolonElement(obj, yValueElements));
|
|
}
|
|
}
|
|
});
|
|
});
|
|
frmCyberPhysical.getContentPane().setLayout(new BorderLayout(0, 0));
|
|
frmCyberPhysical.getContentPane().setLayout(new BorderLayout(0, 0));
|
|
@@ -486,7 +499,7 @@ public class GUI implements CategoryListener {
|
|
}
|
|
}
|
|
if (canvas.dataSelected != null) {
|
|
if (canvas.dataSelected != null) {
|
|
for (HolonElement he : canvas.dataSelected) {
|
|
for (HolonElement he : canvas.dataSelected) {
|
|
- Object[] temp = { he.getEleName(), he.getSign(), he.getEnergy(), he.getAmount() };
|
|
|
|
|
|
+ Object[] temp = { he.getEleName(), he.getEnergy(), he.getAmount() };
|
|
tableModelHolonElement.addRow(temp);
|
|
tableModelHolonElement.addRow(temp);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -579,7 +592,7 @@ public class GUI implements CategoryListener {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for (HolonElement he : canvas.dataSelected) {
|
|
for (HolonElement he : canvas.dataSelected) {
|
|
- Object[] temp = { he.getEleName(), he.getSign(), he.getEnergy(), he.getAmount() };
|
|
|
|
|
|
+ Object[] temp = { he.getEleName(), he.getEnergy(), he.getAmount() };
|
|
tableModelHolonElement.addRow(temp);
|
|
tableModelHolonElement.addRow(temp);
|
|
}
|
|
}
|
|
}
|
|
}
|