|
@@ -123,6 +123,9 @@ public class GUI<E> implements CategoryListener {
|
|
private final JScrollPane scrollPane1 = new JScrollPane();
|
|
private final JScrollPane scrollPane1 = new JScrollPane();
|
|
// private final JScrollPane holonSP = new JScrollPane();
|
|
// private final JScrollPane holonSP = new JScrollPane();
|
|
private final JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
|
private final JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
|
|
|
+ private final JTabbedPane tabbedPane2 = new JTabbedPane(JTabbedPane.TOP);
|
|
|
|
+ private final JButton splitButton = new JButton("Split View");
|
|
|
|
+
|
|
private final JPanel panelTapped_SimMenu = new JPanel();
|
|
private final JPanel panelTapped_SimMenu = new JPanel();
|
|
private JPopupMenu popmenuEdit = new JPopupMenu();
|
|
private JPopupMenu popmenuEdit = new JPopupMenu();
|
|
private JMenuItem editItem = new JMenuItem("Edit Object");
|
|
private JMenuItem editItem = new JMenuItem("Edit Object");
|
|
@@ -754,6 +757,35 @@ public class GUI<E> implements CategoryListener {
|
|
|
|
|
|
mnHelp.add(aboutUs);
|
|
mnHelp.add(aboutUs);
|
|
|
|
|
|
|
|
+ // Testing
|
|
|
|
+ menuBar.add(splitButton);
|
|
|
|
+ //Split View
|
|
|
|
+ splitButton.addActionListener(new ActionListener() {
|
|
|
|
+ @Override
|
|
|
|
+ public void actionPerformed(ActionEvent e) {
|
|
|
|
+ if (panelTapped_SimMenu
|
|
|
|
+ .getComponent(panelTapped_SimMenu.getComponentCount() - 1) instanceof JSplitPane) {
|
|
|
|
+ tabbedPane2.removeAll();
|
|
|
|
+ panelTapped_SimMenu
|
|
|
|
+ .remove(panelTapped_SimMenu.getComponent(panelTapped_SimMenu.getComponentCount() - 1));
|
|
|
|
+ panelTapped_SimMenu.add(tabbedPane);
|
|
|
|
+ } else {
|
|
|
|
+ for (int i = 0; i < tabbedPane.getTabCount(); i++) {
|
|
|
|
+ tabbedPane2.addTab(tabbedPane.getTitleAt(i), null);
|
|
|
|
+ }
|
|
|
|
+ JSplitPane tempSplit = new JSplitPane();
|
|
|
|
+ tempSplit.setBorder(null);
|
|
|
|
+ tempSplit.setRightComponent(tabbedPane2);
|
|
|
|
+ tempSplit.setLeftComponent(tabbedPane);
|
|
|
|
+ tempSplit.setDividerLocation(tabbedPane.getWidth()/2);
|
|
|
|
+ panelTapped_SimMenu.remove(tabbedPane);
|
|
|
|
+ panelTapped_SimMenu.add(tempSplit);
|
|
|
|
+ }
|
|
|
|
+ contentPane.updateUI();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+
|
|
mnNewMenuOptions.add(mnLanguage);
|
|
mnNewMenuOptions.add(mnLanguage);
|
|
canvas.setBackground(Color.WHITE);
|
|
canvas.setBackground(Color.WHITE);
|
|
canvas.setPreferredSize(new Dimension(model.getCanvasX(), model.getCanvasY()));
|
|
canvas.setPreferredSize(new Dimension(model.getCanvasX(), model.getCanvasY()));
|
|
@@ -1759,8 +1791,9 @@ public class GUI<E> implements CategoryListener {
|
|
splitPane.setRightComponent(splitPane1);
|
|
splitPane.setRightComponent(splitPane1);
|
|
splitPane.setDividerLocation(200);
|
|
splitPane.setDividerLocation(200);
|
|
splitPane1.setDividerLocation(500);
|
|
splitPane1.setDividerLocation(500);
|
|
- splitPaneCanvasConsole.setDividerLocation(500);
|
|
|
|
-
|
|
|
|
|
|
+ splitPaneCanvasConsole.setDividerLocation(550);
|
|
|
|
+ splitPaneCanvasConsole.setResizeWeight(0.9);
|
|
|
|
+
|
|
splitPane.setLeftComponent(scrollPane1);
|
|
splitPane.setLeftComponent(scrollPane1);
|
|
splitPaneCanvasConsole.setLeftComponent(panelTapped_SimMenu);
|
|
splitPaneCanvasConsole.setLeftComponent(panelTapped_SimMenu);
|
|
tabbedPane.addTab("View", canvasSP);
|
|
tabbedPane.addTab("View", canvasSP);
|