|
@@ -115,7 +115,7 @@ public class GUI implements CategoryListener {
|
|
|
|
|
|
private JTable tableProperties = new JTable();
|
|
|
private JPanel graphLabel = new JPanel();
|
|
|
- private DefaultTableModel tableModelProperties = new DefaultTableModel();
|
|
|
+ private DefaulTable tableModelProperties;
|
|
|
private final JScrollPane scrollProperties = new JScrollPane();
|
|
|
|
|
|
// In this section is the graph for the selected HolonElement of the clicked
|
|
@@ -263,12 +263,12 @@ public class GUI implements CategoryListener {
|
|
|
|
|
|
// Set up of the Properties section
|
|
|
Object[] colNames = { "Field", "Information" };
|
|
|
+ tableModelProperties = new DefaulTable(100, colNames.length);
|
|
|
tableModelProperties.setColumnIdentifiers(colNames);
|
|
|
tableProperties.setModel(tableModelProperties);
|
|
|
tableProperties.setFillsViewportHeight(true);
|
|
|
tableProperties.setCellSelectionEnabled(true);
|
|
|
tableProperties.setColumnSelectionAllowed(true);
|
|
|
-
|
|
|
// Set up of the Graph section
|
|
|
|
|
|
Object[] tempText = { "Here comes the graph for each clicked HolonElement" };
|
|
@@ -351,6 +351,17 @@ public class GUI implements CategoryListener {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ tableProperties.addMouseListener(new MouseAdapter() {
|
|
|
+ public void mousePressed(MouseEvent e) {
|
|
|
+ int selectedX = (int) Math
|
|
|
+ .floor(e.getX() / (tableProperties.getColumnModel().getTotalColumnWidth() / 2));
|
|
|
+ int selectedY = (int) Math.floor(e.getY() / 16);
|
|
|
+ if (tableModelProperties.isCellEditable(selectedY, selectedX) && e.getClickCount() == 2) {
|
|
|
+ System.out.println("QUEEE");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
frmCyberPhysical.getContentPane().setLayout(new BorderLayout(0, 0));
|
|
|
|
|
|
TreeCellRenderer customRenderer = new TreeCellRenderer() {
|
|
@@ -558,6 +569,7 @@ public class GUI implements CategoryListener {
|
|
|
if (canvas.tempCps != null) {
|
|
|
Object[] tempName = { "Name", canvas.tempCps.getName() };
|
|
|
tableModelProperties.addRow(tempName);
|
|
|
+ tableModelProperties.setCellEditable(0, 1, true);
|
|
|
Object[] tempId = { "ID", canvas.tempCps.getID() };
|
|
|
tableModelProperties.addRow(tempId);
|
|
|
if (canvas.tempCps.getClass() == HolonObject.class) {
|
|
@@ -863,11 +875,18 @@ public class GUI implements CategoryListener {
|
|
|
deleteRows();
|
|
|
if (canvas.dataSelected != null) {
|
|
|
fillElementTable(canvas.dataSelected);
|
|
|
+<<<<<<< HEAD
|
|
|
+ } /**
|
|
|
+ * hinzugef�gt damit man auch nach dem objekt platziert wurde
|
|
|
+ * elemente von Objekten in Kategorien ansehen kann
|
|
|
+ */
|
|
|
+=======
|
|
|
}
|
|
|
/**
|
|
|
* hinzugef�gt damit man auch nach dem objekt platziert wurde elemente
|
|
|
* von Objekten in Kategorien ansehen kann
|
|
|
*/
|
|
|
+>>>>>>> 20576a4b5d0fa38909435f477849c16d57f2d047
|
|
|
canvas.dataSelected = null;
|
|
|
|
|
|
}
|