Skip to content

Commit

Permalink
placeholder for websocket and web display in experimental repo
Browse files Browse the repository at this point in the history
  • Loading branch information
hqnghi88 committed Apr 23, 2021
1 parent d673eb7 commit 4f580e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions msi.gama.core/src/msi/gama/common/interfaces/IGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public interface IGui {
String LAYER_VIEW_ID = "msi.gama.application.view.LayeredDisplayView";
String GL_LAYER_VIEW_ID = "msi.gama.application.view.OpenGLDisplayView";
String GL_LAYER_VIEW_ID2 = "msi.gama.application.view.OpenGLDisplayView2";
String GL_LAYER_VIEW_ID3 = "msi.gama.application.view.WebDisplayView";

String ERROR_VIEW_ID = "msi.gama.application.view.ErrorView";
String TEST_VIEW_ID = "msi.gama.application.view.TestView";
Expand Down
5 changes: 5 additions & 0 deletions msi.gama.core/src/msi/gama/outputs/LayeredDisplayData.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public enum Changes {
public static final String JAVA2D = "java2D";
public static final String OPENGL = "opengl";
public static final String OPENGL2 = "opengl2";
public static final String WEB = "web";
public static final String THREED = "3D";
public static final Double INITIAL_ZOOM = 1.0;

Expand Down Expand Up @@ -996,6 +997,10 @@ public boolean isOpenGL2() {
return displayType.equals(OPENGL2);
}

public boolean isWeb() {
return displayType.equals(WEB);
}

public boolean isOpenGL() {
return isOpenGL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ protected void createSurface(final IScope scope) {

@Override
public String getViewId() {
if (data.isWeb()) { return IGui.GL_LAYER_VIEW_ID3; }
if (data.isOpenGL2()) { return IGui.GL_LAYER_VIEW_ID2; }
if (data.isOpenGL()) { return IGui.GL_LAYER_VIEW_ID; }
return IGui.LAYER_VIEW_ID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void createInitialLayout(final IPageLayout lay) {
displays.addPlaceholder(IGui.LAYER_VIEW_ID + ":*");
displays.addPlaceholder(IGui.GL_LAYER_VIEW_ID + ":*");
displays.addPlaceholder(IGui.GL_LAYER_VIEW_ID2 + ":*");
displays.addPlaceholder(IGui.GL_LAYER_VIEW_ID3 + ":*");

final IPlaceholderFolderLayout inspect =
lay.createPlaceholderFolder("inspect", IPageLayout.RIGHT, 0.6f, "displays");
Expand Down

0 comments on commit 4f580e6

Please sign in to comment.