projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed issues with WirePointHandle
[Mograsim.git]
/
net.mograsim.logic.model.editor
/
src
/
net
/
mograsim
/
logic
/
model
/
editor
/
ui
/
EditorGUI.java
diff --git
a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/ui/EditorGUI.java
b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/ui/EditorGUI.java
index
06f9f4b
..
6a52cfd
100644
(file)
--- a/
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/ui/EditorGUI.java
+++ b/
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/ui/EditorGUI.java
@@
-1,5
+1,7
@@
package net.mograsim.logic.model.editor.ui;
package net.mograsim.logic.model.editor.ui;
+import java.io.IOException;
+
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@@
-50,7
+52,7
@@
public class EditorGUI
innerCompData.horizontalAlignment = SWT.FILL;
innerCompData.verticalAlignment = SWT.FILL;
innerComp.setLayoutData(innerCompData);
innerCompData.horizontalAlignment = SWT.FILL;
innerCompData.verticalAlignment = SWT.FILL;
innerComp.setLayoutData(innerCompData);
-
+
GridLayout innerLayout = new GridLayout();
innerComp.setLayout(innerLayout);
innerLayout.numColumns = 2;
GridLayout innerLayout = new GridLayout();
innerComp.setLayout(innerLayout);
innerLayout.numColumns = 2;
@@
-63,7
+65,7
@@
public class EditorGUI
logicCanvas = new EditorCanvas(innerComp, SWT.TRAIL, editor);
logicCanvas.setLayoutData(d);
logicCanvas = new EditorCanvas(innerComp, SWT.TRAIL, editor);
logicCanvas.setLayoutData(d);
-
+
d = new GridData();
d.grabExcessVerticalSpace = true;
d.verticalAlignment = SWT.FILL;
d = new GridData();
d.grabExcessVerticalSpace = true;
d.verticalAlignment = SWT.FILL;
@@
-71,7
+73,7
@@
public class EditorGUI
addList = new List(innerComp, SWT.V_SCROLL);
addList.setLayoutData(d);
refreshAddList();
addList = new List(innerComp, SWT.V_SCROLL);
addList.setLayoutData(d);
refreshAddList();
-
+
setupBottomToolBar(innerComp);
ZoomableCanvasUserInput userInput = new ZoomableCanvasUserInput(logicCanvas);
setupBottomToolBar(innerComp);
ZoomableCanvasUserInput userInput = new ZoomableCanvasUserInput(logicCanvas);
@@
-92,17
+94,27
@@
public class EditorGUI
ToolItem file = new ToolItem(toolBar, SWT.DROP_DOWN);
ToolItem file = new ToolItem(toolBar, SWT.DROP_DOWN);
- //TODO
+ //
TODO
// DropDownEntry newEntry = new DropDownEntry("New", e -> {
// });
// DropDownEntry newEntry = new DropDownEntry("New", e -> {
// });
- DropDownEntry loadEntry = new DropDownEntry("Load", e -> SaveLoadManager.openLoadDialog());
+ DropDownEntry loadEntry = new DropDownEntry("Load", e ->
+ {
+ try
+ {
+ SaveLoadManager.openLoadDialog();
+ }
+ catch (IOException e1)
+ {
+ editor.dialogManager.openWarningDialog("Failed to load Component!", e1.getMessage());
+ }
+ });
DropDownEntry saveEntry = new DropDownEntry("Save", e -> editor.save());
DropDownEntry saveAsEntry = new DropDownEntry("Save as...", e -> editor.saveAs());
DropDownEntry saveEntry = new DropDownEntry("Save", e -> editor.save());
DropDownEntry saveAsEntry = new DropDownEntry("Save as...", e -> editor.saveAs());
-
- DropDownEntry[] entries = new DropDownEntry[] { loadEntry, saveEntry, saveAsEntry};
-
+
+ DropDownEntry[] entries = new DropDownEntry[] { loadEntry, saveEntry, saveAsEntry
};
+
setupDrowpDownMenu(file, entries);
setupDrowpDownMenu(file, entries);
-
+
file.setText("File");
return toolBar;
}
file.setText("File");
return toolBar;
}