Search in sources :

Example 46 with HTML

use of com.google.gwt.user.client.ui.HTML in project gwt-cs by iSergio.

the class Tiles3DInterior method buildPanel.

@Override
public void buildPanel() {
    ViewerPanel csVPanel = new ViewerPanel();
    csVPanel.getViewer().scene().primitives().add(Cesium3DTileset.create("https://beta.cesium.com/api/assets/1463?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5ZGExZTdmMS0xZjA5LTQxODAtOThmYi04MWU1YjZkMWZjNjgiLCJpZCI6NDQsImFzc2V0cyI6WzE0NjNdLCJpYXQiOjE0OTkyNzYwNzV9.eTEtaAEBUehNIZushZQnp0On9BPRtZYS7XEWFwneSRU"));
    Cartesian3 initialPosition = new Cartesian3(-1111583.3721328347, -5855888.151574568, 2262561.444696748);
    org.cesiumjs.cs.core.HeadingPitchRoll initialOrientation = org.cesiumjs.cs.core.HeadingPitchRoll.fromDegrees(100.0, -15.0, 0.0);
    ViewOptions viewOptions = new ViewOptions();
    viewOptions.destinationPos = initialPosition;
    viewOptions.orientation = initialOrientation;
    viewOptions.endTransform = Matrix4.IDENTITY();
    csVPanel.getViewer().scene().camera().setView(viewOptions);
    contentPanel.add(new HTML("<p>A sample interior rendered with 3D Tiles.</p>"));
    contentPanel.add(csVPanel);
    initWidget(contentPanel);
}
Also used : ViewerPanel(org.cesiumjs.cs.widgets.ViewerPanel) Cartesian3(org.cesiumjs.cs.core.Cartesian3) ViewOptions(org.cesiumjs.cs.scene.options.ViewOptions) HTML(com.google.gwt.user.client.ui.HTML)

Example 47 with HTML

use of com.google.gwt.user.client.ui.HTML in project gwt-cs by iSergio.

the class Tiles3DPointCloud method buildPanel.

@Override
public void buildPanel() {
    final ViewerPanel csVPanel = new ViewerPanel();
    Cesium3DTileset tileset = (Cesium3DTileset) csVPanel.getViewer().scene().primitives().add(Cesium3DTileset.create("https://beta.cesium.com/api/assets/1460?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMzk2YzJiOS1jZGFmLTRlZmYtYmQ4MS00NTA3NjEwMzViZTkiLCJpZCI6NDQsImFzc2V0cyI6WzE0NjBdLCJpYXQiOjE0OTkyNjQ3NTV9.oWjvN52CRQ-dk3xtvD4e8ZnOHZhoWSpJLlw115mbQJM"));
    tileset.readyPromise().then(new Fulfill<Cesium3DTileset>() {

        @Override
        public void onFulfilled(Cesium3DTileset value) {
            BoundingSphere boundingSphere = value.boundingSphere();
            csVPanel.getViewer().camera.viewBoundingSphere(boundingSphere, new org.cesiumjs.cs.core.HeadingPitchRange(0.0, -0.5, boundingSphere.radius));
            csVPanel.getViewer().camera.lookAtTransform(Matrix4.IDENTITY());
        }
    });
    contentPanel.add(new HTML("<p>Example styles for a point cloud tileset.</p>"));
    contentPanel.add(csVPanel);
    initWidget(contentPanel);
}
Also used : ViewerPanel(org.cesiumjs.cs.widgets.ViewerPanel) BoundingSphere(org.cesiumjs.cs.core.BoundingSphere) HTML(com.google.gwt.user.client.ui.HTML) Cesium3DTileset(org.cesiumjs.cs.scene.Cesium3DTileset)

Example 48 with HTML

use of com.google.gwt.user.client.ui.HTML in project gwt-cs by iSergio.

the class CZML method buildPanel.

@Override
public void buildPanel() {
    csVPanel = new ViewerPanel();
    csVPanel.getViewer().dataSources().add(CzmlDataSource.load(GWT.getModuleBaseURL() + "SampleData/simple.czml"));
    csVPanel.getViewer().camera.flyHome(0);
    Button satellitesBtn = new Button("Satellites");
    satellitesBtn.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            reset();
            csVPanel.getViewer().dataSources().add(CzmlDataSource.load(GWT.getModuleBaseURL() + "SampleData/simple.czml"));
            csVPanel.getViewer().camera.flyHome(0);
        }
    });
    Button vehicleBtn = new Button("Vehicle");
    vehicleBtn.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent clickEvent) {
            reset();
            csVPanel.getViewer().dataSources().add(CzmlDataSource.load(GWT.getModuleBaseURL() + "SampleData/Vehicle.czml"));
            ViewOptions viewOptions = new ViewOptions();
            viewOptions.destinationPos = Cartesian3.fromDegrees(-116.52, 35.02, 95000);
            viewOptions.orientation = new HeadingPitchRoll(6, -Math.PI_OVER_TWO());
            csVPanel.getViewer().scene().camera().setView(viewOptions);
        }
    });
    HorizontalPanel hPanel = new HorizontalPanel();
    hPanel.setSpacing(10);
    hPanel.add(satellitesBtn);
    hPanel.add(vehicleBtn);
    AbsolutePanel aPanel = new AbsolutePanel();
    aPanel.add(csVPanel);
    aPanel.add(hPanel, 20, 20);
    contentPanel.add(new HTML("<p>A simple CZML example showing four satellites in orbit around the Earth, and some ground objects.</p>"));
    contentPanel.add(aPanel);
    initWidget(contentPanel);
}
Also used : ViewerPanel(org.cesiumjs.cs.widgets.ViewerPanel) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) Button(com.google.gwt.user.client.ui.Button) HeadingPitchRoll(org.cesiumjs.cs.core.HeadingPitchRoll) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) ViewOptions(org.cesiumjs.cs.scene.options.ViewOptions) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) AbsolutePanel(com.google.gwt.user.client.ui.AbsolutePanel) HTML(com.google.gwt.user.client.ui.HTML)

Example 49 with HTML

use of com.google.gwt.user.client.ui.HTML in project GwtMobile by dennisjzh.

the class SlidePanelPage method loadSlide.

@Override
public Slide loadSlide(int index) {
    if (index < 2) {
        return null;
    }
    Slide slide = new Slide();
    slide.addStyleName("Slide-Content");
    slide.add(new HTML("Slide Me!"));
    slide.add(new HTML("Dynamic Slide " + index));
    return slide;
}
Also used : Slide(com.gwtmobile.ui.client.widgets.Slide) HTML(com.google.gwt.user.client.ui.HTML)

Example 50 with HTML

use of com.google.gwt.user.client.ui.HTML in project perun by CESNET.

the class RemoveUserExtSource method testRemoving.

/**
 * Tests the values, if the process can continue
 *
 * @return true/false for continue/stop
 */
private boolean testRemoving() {
    boolean result = true;
    String errorMsg = "";
    if (userId == 0) {
        errorMsg += "Wrong parameter <strong>User ID</strong>. ";
        result = false;
    }
    if (uesId == 0) {
        errorMsg += "Wrong parameter <strong>User Ext Source ID</strong>. ";
        result = false;
    }
    if (errorMsg.length() > 0) {
        Confirm c = new Confirm("Error while adding user external source", new HTML(errorMsg), true);
        c.show();
    }
    return result;
}
Also used : Confirm(cz.metacentrum.perun.webgui.widgets.Confirm) HTML(com.google.gwt.user.client.ui.HTML)

Aggregations

HTML (com.google.gwt.user.client.ui.HTML)170 ViewerPanel (org.cesiumjs.cs.widgets.ViewerPanel)34 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)32 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)31 Confirm (cz.metacentrum.perun.webgui.widgets.Confirm)26 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)21 FlexTable (com.google.gwt.user.client.ui.FlexTable)17 JSONString (com.google.gwt.json.client.JSONString)16 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)14 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)14 Label (com.google.gwt.user.client.ui.Label)14 AbsolutePanel (com.google.gwt.user.client.ui.AbsolutePanel)13 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)12 Image (com.google.gwt.user.client.ui.Image)11 Widget (com.google.gwt.user.client.ui.Widget)11 ViewerOptions (org.cesiumjs.cs.widgets.options.ViewerOptions)11 Button (org.gwtbootstrap3.client.ui.Button)11 ListBox (com.google.gwt.user.client.ui.ListBox)10 ArrayList (java.util.ArrayList)10 SmallLabel (org.uberfire.ext.widgets.common.client.common.SmallLabel)10