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);
}
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);
}
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);
}
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;
}
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;
}
Aggregations