X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2FLogicUIStandaloneGUI.java;fp=LogicUI%2Fsrc%2Fera%2Fmi%2Fgui%2FLogicUIStandaloneGUI.java;h=0000000000000000000000000000000000000000;hb=a28f7aa0dab4248e99159c5a647676170cb17a4e;hp=55931cfb92500b91f8d3f6c1fcdb3d9c87846a7b;hpb=80bfbd8ebf0ad8a7ad98584544a0c73f43e6f3b6;p=Mograsim.git diff --git a/LogicUI/src/era/mi/gui/LogicUIStandaloneGUI.java b/LogicUI/src/era/mi/gui/LogicUIStandaloneGUI.java deleted file mode 100644 index 55931cfb..00000000 --- a/LogicUI/src/era/mi/gui/LogicUIStandaloneGUI.java +++ /dev/null @@ -1,59 +0,0 @@ -package era.mi.gui; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; - -import era.mi.gui.model.ViewModel; -import era.mi.gui.modeladapter.LogicModelParameters; -import net.haspamelodica.swt.helper.zoomablecanvas.helper.ZoomableCanvasOverlay; -import net.haspamelodica.swt.helper.zoomablecanvas.helper.ZoomableCanvasUserInput; - -/** - * Standalone simulation visualizer graphical user interface. - * - * @author Daniel Kirschten - */ -public class LogicUIStandaloneGUI -{ - private final Display display; - private final Shell shell; - private final LogicUICanvas ui; - - public LogicUIStandaloneGUI(ViewModel model) - { - display = new Display(); - shell = new Shell(display); - shell.setLayout(new FillLayout()); - ui = new LogicUICanvas(shell, SWT.NONE, model); - - ZoomableCanvasUserInput userInput = new ZoomableCanvasUserInput(ui); - userInput.buttonDrag = 3; - userInput.buttonZoom = 2; - userInput.enableUserInput(); - new ZoomableCanvasOverlay(ui, null).enableScale(); - - // TODO don't do this here - LogicModelParameters params = new LogicModelParameters(); - params.gateProcessTime = 50; - params.wireTravelTime = 10; -// timeline = ViewLogicModelAdapter.convert(model, params); - } - - public LogicUICanvas getLogicUICanvas() - { - return ui; - } - - /** - * Opens the UI shell. Returns when the shell is closed. - */ - public void run() - { - shell.open(); - while (!shell.isDisposed()) - if (!display.readAndDispatch()) - display.sleep(); - } -} \ No newline at end of file