Sfoglia il codice sorgente

Information about HolonElement by MultiSelection per "dragged selection" correctly displayed

Edgardo Palza 7 anni fa
parent
commit
fa869036fd
1 ha cambiato i file con 41 aggiunte e 41 eliminazioni
  1. 41 41
      src/ui/view/GUI.java

+ 41 - 41
src/ui/view/GUI.java

@@ -744,50 +744,50 @@ public class GUI<E> implements CategoryListener {
 
 		mnNewMenuView.add(mntmCanvasSize);
 		mnNewMenuView.add(mntmSplitView);
-		
+
 		// Split View
-				mntmSplitView.addActionListener(new ActionListener() {
-					@Override
-					public void actionPerformed(ActionEvent e) {
-						if (splitPaneCanvasConsole.getLeftComponent() instanceof JSplitPane) {
-							initSplit = true;
-							Component tempC = tabbedPane2.getSelectedComponent();
-							tabbedPane.setComponentAt(tabbedPane2.getSelectedIndex(), tempC);
-							tabbedPane2.removeAll();
-							splitPaneCanvasConsole.setLeftComponent(tabbedPane);
-						} else {
-							for (int i = 0; i < tabbedPane.getTabCount(); i++) {
-								tabbedPane2.addTab(tabbedPane.getTitleAt(i), null);
-								if (i >= 4) {
-									// tabbedPane2.setTabComponentAt(tabbedPane.getTabCount()
-									// - 1,
-									// new ButtonTabComponent(tabbedPane, tabbedPane2));
-								}
-							}
-							if (tabbedPane.getSelectedComponent() == statScrollPane) {
-								tabbedPane.setComponentAt(0, null);
-								tabbedPane2.setComponentAt(0, canvasSP);
-								tabbedPane2.setSelectedIndex(0);
-							} else {
-								tabbedPane.setComponentAt(1, null);
-								tabbedPane2.setComponentAt(1, statScrollPane);
-								tabbedPane2.setSelectedIndex(1);
-							}
-							tempSplit = new JSplitPane();
-							tempSplit.setBorder(null);
-							tempSplit.setRightComponent(tabbedPane2);
-							tempSplit.setLeftComponent(tabbedPane);
-							tempSplit.setDividerLocation(tabbedPane.getWidth() / 2);
-							tempSplit.setResizeWeight(0.9);
-							splitPaneCanvasConsole.setLeftComponent(tempSplit);
-							initSplit = false;
+		mntmSplitView.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				if (splitPaneCanvasConsole.getLeftComponent() instanceof JSplitPane) {
+					initSplit = true;
+					Component tempC = tabbedPane2.getSelectedComponent();
+					tabbedPane.setComponentAt(tabbedPane2.getSelectedIndex(), tempC);
+					tabbedPane2.removeAll();
+					splitPaneCanvasConsole.setLeftComponent(tabbedPane);
+				} else {
+					for (int i = 0; i < tabbedPane.getTabCount(); i++) {
+						tabbedPane2.addTab(tabbedPane.getTitleAt(i), null);
+						if (i >= 4) {
+							// tabbedPane2.setTabComponentAt(tabbedPane.getTabCount()
+							// - 1,
+							// new ButtonTabComponent(tabbedPane, tabbedPane2));
 						}
-						contentPane.updateUI();
 					}
+					if (tabbedPane.getSelectedComponent() == statScrollPane) {
+						tabbedPane.setComponentAt(0, null);
+						tabbedPane2.setComponentAt(0, canvasSP);
+						tabbedPane2.setSelectedIndex(0);
+					} else {
+						tabbedPane.setComponentAt(1, null);
+						tabbedPane2.setComponentAt(1, statScrollPane);
+						tabbedPane2.setSelectedIndex(1);
+					}
+					tempSplit = new JSplitPane();
+					tempSplit.setBorder(null);
+					tempSplit.setRightComponent(tabbedPane2);
+					tempSplit.setLeftComponent(tabbedPane);
+					tempSplit.setDividerLocation(tabbedPane.getWidth() / 2);
+					tempSplit.setResizeWeight(0.9);
+					splitPaneCanvasConsole.setLeftComponent(tempSplit);
+					initSplit = false;
+				}
+				contentPane.updateUI();
+			}
 
-				});
+		});
 		mnNewMenuView.add(mntmBackground);
-		
+
 		mntmBackground.addActionListener(new ActionListener() {
 
 			@Override
@@ -840,8 +840,6 @@ public class GUI<E> implements CategoryListener {
 
 		mnHelp.add(mntmAboutUs);
 
-		
-
 		tabbedPane.addChangeListener(new ChangeListener() {
 
 			@Override
@@ -1581,6 +1579,7 @@ public class GUI<E> implements CategoryListener {
 				}
 				// Write new data in the PropertyTable
 				updCon.paintProperties(temp);
+				updCon.refreshTableHolonElement(model.getMultiTable(), model.getSingleTable());
 
 				// New Tab with NodeOfNode
 				if (doubleClick() && MouseEvent.BUTTON3 != e.getButton() && temp instanceof CpsUpperNode) {
@@ -1593,6 +1592,7 @@ public class GUI<E> implements CategoryListener {
 				}
 
 			}
+
 		});
 
 		holonCanvas.addMouseListener(new MouseAdapter() {