Explorar o código

ein paar äußerliche änderungen

Kevin Trometer %!s(int64=8) %!d(string=hai) anos
pai
achega
584d6ffe4a

+ 4 - 0
src/ui/view/AboutUsPopUp.java

@@ -2,7 +2,9 @@ package ui.view;
 
 import java.awt.BorderLayout;
 import java.awt.Font;
+import java.awt.Image;
 
+import javax.swing.ImageIcon;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
@@ -20,6 +22,8 @@ public class AboutUsPopUp extends JFrame {
 
 	public AboutUsPopUp() {
 		super("About Us");
+		this.setIconImage(new ImageIcon(this.getClass().getResource("/Images/Dummy_House.png")).getImage()
+				.getScaledInstance(30, 30, Image.SCALE_SMOOTH));
 		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
 		setBounds(100, 100, 500, 800);
 		getContentPane().setLayout(new BorderLayout());

+ 4 - 0
src/ui/view/AddElementPopUp.java

@@ -3,6 +3,7 @@ package ui.view;
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.FlowLayout;
+import java.awt.Image;
 import java.util.ArrayList;
 
 import javax.swing.JButton;
@@ -15,6 +16,7 @@ import javax.swing.JOptionPane;
 import javax.swing.JTextField;
 import javax.swing.JComboBox;
 import javax.swing.DefaultComboBoxModel;
+import javax.swing.ImageIcon;
 
 import classes.HolonElement;
 
@@ -49,6 +51,8 @@ public class AddElementPopUp extends JDialog {
 	 */
 	public AddElementPopUp() {
 		super((java.awt.Frame) null, true);
+		this.setIconImage(new ImageIcon(this.getClass().getResource("/Images/Dummy_House.png")).getImage()
+				.getScaledInstance(30, 30, Image.SCALE_SMOOTH));
 		setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);
 		setBounds(100, 100, 400, 190);
 		getContentPane().setLayout(new BorderLayout());

+ 2 - 0
src/ui/view/AddObjectPopUp.java

@@ -70,6 +70,8 @@ public class AddObjectPopUp extends JDialog {
 	 * Create the dialog.
 	 */
 	public AddObjectPopUp() {
+		this.setIconImage(new ImageIcon(this.getClass().getResource("/Images/Dummy_House.png")).getImage()
+				.getScaledInstance(30, 30, Image.SCALE_SMOOTH));
 		setBounds(100, 100, 450, 342);
 		getContentPane().setLayout(new BorderLayout());
 		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));

+ 7 - 0
src/ui/view/GUI.java

@@ -9,6 +9,7 @@ import javax.swing.JMenu;
 import javax.swing.JMenuItem;
 import javax.swing.JOptionPane;
 import javax.swing.JTree;
+import javax.swing.border.LineBorder;
 import javax.swing.BoxLayout;
 import javax.swing.JSplitPane;
 import javax.swing.JScrollPane;
@@ -164,6 +165,7 @@ public class GUI implements CategoryListener {
 		this.testgraph = new UnitGraph(model, control); // for testing, remove
 
 		timePanel = new TimePanel(model, controller);
+		timePanel.setBorder(null);
 
 		// later
 		control.initListener(this);
@@ -226,6 +228,7 @@ public class GUI implements CategoryListener {
 		canvas.setBackground(Color.WHITE);
 		canvas.setPreferredSize(new Dimension(10000, 10000));
 		JScrollPane canvasSP = new JScrollPane(canvas);
+		canvasSP.setBorder(null);
 
 		tabbedPane.addTab("Modeling", new ImageIcon(new ImageIcon(this.getClass().getResource("/Images/home.png"))
 				.getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)), canvasSP, "Model a CPS");
@@ -245,6 +248,7 @@ public class GUI implements CategoryListener {
 		// Set up of the HolonElements section
 		Object[] columnNames = { "Device", "Energy", "Quantity" };
 		tableModelHolonElement.setColumnIdentifiers(columnNames);
+		tableHolonElement.setBorder(null);
 		tableHolonElement.setModel(tableModelHolonElement);
 		tableHolonElement.setFillsViewportHeight(true);
 		tableHolonElement.setCellSelectionEnabled(true);
@@ -683,6 +687,9 @@ public class GUI implements CategoryListener {
 		splitPane_1.setBorder(null);
 		split_HolonEl_Pro.setBorder(null);
 		split_Graph_HolonEl.setBorder(null);
+		scrollPane_2.setBorder(null);
+		panel_HolonEl.setBorder(null);
+		tableHolonElementScrollPane.setBorder(null);
 
 		frmCyberPhysical.getContentPane().add(timePanel, BorderLayout.SOUTH);
 	}

+ 3 - 1
src/ui/view/MyCanvas.java

@@ -343,7 +343,7 @@ class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
 					controller.removeEdgesOnCanvas(e);
 					tempCps.getConnections().remove(e);
 					cps.getConnections().remove(e);
-					// Node ohne Edge
+					// Node ohne Edge?
 					if (e.getA().getClass() == CpsNode.class && e.getA().getConnections().isEmpty()) {
 						tempCps = e.getA();
 						deleteNode = true;
@@ -361,6 +361,7 @@ class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
 				}
 			}
 		}
+		//Auf eine Edge gezoggen?
 		if (onEdge) {
 			CpsEdge p = mousePositionOnEdge(x, y);
 			if (p != null) {
@@ -415,6 +416,7 @@ class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
 			System.out.println("node ID: " + n.getID());
 		}
 		
+		//Wenn ein Node ohne Connections da ist
 		if(deleteNode){
 			controller.deleteObjectOnCanvas(tempCps);
 			controller.deleteObjectOnCanvas(tempCPS);