|
@@ -28,7 +28,6 @@ import java.awt.Color;
|
|
|
import java.awt.Component;
|
|
|
import java.awt.Cursor;
|
|
|
import java.awt.Dimension;
|
|
|
-import java.awt.Font;
|
|
|
import java.awt.Image;
|
|
|
import java.awt.Point;
|
|
|
import java.awt.Toolkit;
|
|
@@ -39,7 +38,6 @@ import javax.swing.JToolBar;
|
|
|
import javax.swing.JButton;
|
|
|
import javax.swing.JComboBox;
|
|
|
import javax.swing.DefaultComboBoxModel;
|
|
|
-import javax.swing.Icon;
|
|
|
import javax.swing.ImageIcon;
|
|
|
|
|
|
import classes.Category;
|
|
@@ -53,9 +51,6 @@ import Interfaces.CategoryListener;
|
|
|
import java.awt.event.ActionListener;
|
|
|
import java.awt.event.MouseAdapter;
|
|
|
import java.awt.event.MouseEvent;
|
|
|
-import java.awt.event.MouseListener;
|
|
|
-import java.beans.PropertyChangeEvent;
|
|
|
-import java.beans.PropertyChangeListener;
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
|
|
public class GUI implements CategoryListener {
|
|
@@ -102,7 +97,7 @@ public class GUI implements CategoryListener {
|
|
|
private Image img = null;
|
|
|
private CpsObject tempCps = null;
|
|
|
|
|
|
- private final MyCanvas canvas;
|
|
|
+ private MyCanvas canvas;
|
|
|
|
|
|
/**
|
|
|
* Create the application.
|
|
@@ -149,10 +144,6 @@ public class GUI implements CategoryListener {
|
|
|
|
|
|
Object[][] data = { { "TV", "20", "1" }, { "PC", "30", "2" }, { "Fridge", "40", "1" } };
|
|
|
|
|
|
- splitPane.setRightComponent(splitPane_1);
|
|
|
- splitPane.setDividerLocation(200);
|
|
|
- splitPane_1.setDividerLocation(500);
|
|
|
-
|
|
|
canvas.setBackground(Color.WHITE);
|
|
|
canvas.setPreferredSize(new Dimension(10000, 10000));
|
|
|
JScrollPane canvasSP = new JScrollPane(canvas);
|
|
@@ -168,11 +159,8 @@ public class GUI implements CategoryListener {
|
|
|
|
|
|
scrollPane_2.setViewportView(dtrpnHereWillBe);
|
|
|
|
|
|
- splitPane_1.setLeftComponent(tabbedPane);
|
|
|
-
|
|
|
JScrollPane scrollPane = new JScrollPane();
|
|
|
- splitPane_1.setRightComponent(splitPane_2);
|
|
|
- splitPane_2.setLeftComponent(scrollPane);
|
|
|
+
|
|
|
table = new JTable(data, columnNames);
|
|
|
scrollPane.setViewportView(table);
|
|
|
|
|
@@ -181,7 +169,7 @@ public class GUI implements CategoryListener {
|
|
|
table.setCellSelectionEnabled(true);
|
|
|
table.setColumnSelectionAllowed(true);
|
|
|
JScrollPane scrollPane_3 = new JScrollPane();
|
|
|
- splitPane_2.setRightComponent(scrollPane_3);
|
|
|
+
|
|
|
scrollPane_3.setViewportView(table_2);
|
|
|
|
|
|
table_2.setFillsViewportHeight(true);
|
|
@@ -194,9 +182,6 @@ public class GUI implements CategoryListener {
|
|
|
table_2.getColumnModel().getColumn(1).setPreferredWidth(107);
|
|
|
table_2.getColumnModel().getColumn(2).setPreferredWidth(125);
|
|
|
frmCyberPhysical.getContentPane().setLayout(new BorderLayout(0, 0));
|
|
|
- splitPane_2.setDividerLocation(200);
|
|
|
-
|
|
|
- splitPane.setLeftComponent(scrollPane_1);
|
|
|
|
|
|
TreeCellRenderer customRenderer = new TreeCellRenderer() {
|
|
|
@Override
|
|
@@ -397,6 +382,15 @@ public class GUI implements CategoryListener {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ splitPane.setRightComponent(splitPane_1);
|
|
|
+ splitPane.setDividerLocation(200);
|
|
|
+ splitPane_1.setDividerLocation(500);
|
|
|
+ splitPane_2.setDividerLocation(200);
|
|
|
+ splitPane.setLeftComponent(scrollPane_1);
|
|
|
+ splitPane_1.setLeftComponent(tabbedPane);
|
|
|
+ splitPane_1.setRightComponent(splitPane_2);
|
|
|
+ splitPane_2.setLeftComponent(scrollPane);
|
|
|
+ splitPane_2.setRightComponent(scrollPane_3);
|
|
|
}
|
|
|
|
|
|
/*
|