本文整理汇总了Java中com.google.gwt.user.client.ui.DecoratorPanel.add方法的典型用法代码示例。如果您正苦于以下问题:Java DecoratorPanel.add方法的具体用法?Java DecoratorPanel.add怎么用?Java DecoratorPanel.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.DecoratorPanel
的用法示例。
在下文中一共展示了DecoratorPanel.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the mapPresenter and add an InitializationHandler:
MapConfiguration mapConfiguration = TileBasedLayerClient.getInstance().createOsmMap(25);
mapPresenter = GeomajasImpl.getInstance().createMapPresenter(mapConfiguration, 480, 480);
mapPresenter.getEventBus().addHandler(ShowFeatureHandler.TYPE, new ShowFeatureHandler() {
@Override
public void onShowFeature(ShowFeatureEvent event) {
showFeature(event.getFeature());
}
});
osmLayer = TileBasedLayerClient.getInstance().createOsmLayer("osm", 25,
"http://otile1.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png");
mapPresenter.getLayersModel().addLayer(osmLayer);
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
return layout;
}
示例2: FeatureInfoPanel
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public FeatureInfoPanel() {
rootPanel = UI_BINDER.createAndBindUi(this);
// Create the MapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
mapPresenter.getEventBus().addMapInitializationHandler(new MyMapInitializationHandler());
// Add the map to the GUI, using a decorator for nice borders:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Add a feature info control to the map (displays feature info in a dialogbox):
leftPanel.add(new FeatureInfoControlWidget(mapPresenter).asWidget());
// Also show feature information in the side panel:
mapPresenter.getEventBus().addHandler(FeatureClickedHandler.TYPE, this);
// Initialize the map
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapCountries");
}
示例3: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the MapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
mapPresenter.getEventBus().addMapInitializationHandler(new MyMapInitializationHandler());
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the map, and return the layout:
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapOsm");
return layout;
}
示例4: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the MapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
mapPresenter.getEventBus().addMapInitializationHandler(new MyMapInitializationHandler());
mapPresenter.getEventBus().addLayerVisibilityHandler(new MyLayerVisibilityHandler());
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the map, and return the layout:
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapLayerVisibility");
return layout;
}
示例5: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the MapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
mapPresenter.getEventBus().addMapInitializationHandler(new MyMapInitializationHandler());
mapPresenter.getEventBus().addLayerRefreshedHandler(new MyLayerRefreshedHandler());
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the map, and return the layout:
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapCountries");
return layout;
}
示例6: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the mapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the map, and return the layout:
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapEmpty");
capaUrl.setInnerHTML(getCapaUrl());
return layout;
}
示例7: ListenerPanel
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public ListenerPanel() {
layout = UI_BINDER.createAndBindUi(this);
// Create the MapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapLayerVisibility");
// Add a passive listener that print out mouse coordinates:
mapPresenter.addMapListener(new MapMouseMoveListener());
// Add the map to the GUI:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
}
示例8: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the mapPresenter
MapConfiguration configuration = TileBasedLayerClient.getInstance().createOsmMap(19);
mapPresenter = GeomajasImpl.getInstance().createMapPresenter(configuration, 480, 480);
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the OSM layer:
initializeLayer();
return layout;
}
示例9: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the MapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the map, and return the layout:
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapOsm");
// Make sure the text box also reacts to the "Enter" key:
opacityBox.addKeyUpHandler(new KeyUpHandler() {
public void onKeyUp(KeyUpEvent event) {
if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
changeOpacity();
}
}
});
return layout;
}
示例10: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the mapPresenter and add an InitializationHandler:
MapConfiguration configuration = new MapConfigurationImpl();
configuration.setCrs(EPSG, CrsType.DEGREES);
configuration.setMaxBounds(new Bbox(-180, -90, 360, 180));
configuration.setMinimumResolution(2.1457672119140625E-5);
mapPresenter = GeomajasImpl.getInstance().createMapPresenter(configuration, 480, 480);
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
initialize();
return layout;
}
示例11: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
// Create the layout for this sample:
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the MapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
mapPresenter.getEventBus().addViewPortChangedHandler(new MyViewPortChangedHandler());
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the map, and return the layout:
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapOsm");
return layout;
}
示例12: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the mapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
mapPresenter.getEventBus().addMapInitializationHandler(new MyMapInitializationHandler());
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the map, and return the layout:
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapOsm");
return layout;
}
示例13: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
Widget layout = UI_BINDER.createAndBindUi(this);
// Create the MapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
mapPresenter.getEventBus().addMapInitializationHandler(new MyMapInitializationHandler());
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the map, and return the layout:
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapOsm");
label.setVisible(false);
for (int option : options) {
countBox.addItem(option + "");
}
countBox.setSelectedIndex(2);
return layout;
}
示例14: asWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
public Widget asWidget() {
RESOURCE.css().ensureInjected();
// Define the left layout:
Widget layout = UI_BINDER.createAndBindUi(this);
layerDragController = new PickupDragController(dndBoundary, false);
layerDragController.setBehaviorMultipleSelection(false);
layerDragController.registerDropController(new VerticalPanelDropController(layerPanel));
layerDragController.addDragHandler(new LayerDragHandler());
// Create the MapPresenter and add an InitializationHandler:
mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
mapPresenter.setSize(480, 480);
mapPresenter.getEventBus().addMapCompositionHandler(new MyLayerAddHandler());
// Define the whole layout:
DecoratorPanel mapDecorator = new DecoratorPanel();
mapDecorator.add(mapPresenter.asWidget());
mapPanel.add(mapDecorator);
// Initialize the map, and return the layout:
GeomajasServerExtension.getInstance().initializeMap(mapPresenter, "gwt-app", "mapLegend");
return layout;
}
示例15: SiteLoadingGlassPanel
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
/**
* The basic constructor
*/
public SiteLoadingGlassPanel( final FocusPanel theMainFocusPanel ) {
//Store the main focus panel reference
this.theMainFocusPanel = theMainFocusPanel;
//Get the title manager
final UITitlesI18N titlesI18N = I18NManager.getTitles();
//Set up the component's content
final DecoratorPanel decoratedPanel = new DecoratorPanel();
decoratedPanel.setStyleName( CommonResourcesContainer.INTERNAL_ROUNDED_CORNER_PANEL_STYLE );
//Add the content to the decorated panel
final HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
horizontalPanel.setStyleName( CommonResourcesContainer.INTERNAL_ROUNDED_CORNER_PANEL_CONTENT_STYLE );
//Add the loading image
horizontalPanel.add( new Image( ServerSideAccessManager.getActivityImageURL( ) ) );
//Add the spacing
horizontalPanel.add( new HTML(" ") );
//Add the communicating label
final Label loadingLabel = new Label( titlesI18N.communicatingText() );
loadingLabel.setStyleName( CommonResourcesContainer.LOADING_LABEL_STYLE );
horizontalPanel.add( loadingLabel );
//Store the content in the decorated panel
decoratedPanel.add( horizontalPanel );
//Put the stuff into the glass panel, make sure it is centered
loadingGlassPanel.insertRow( 0 );
loadingGlassPanel.insertCell( 0, 0 );
loadingGlassPanel.getCellFormatter().setAlignment( 0, 0, HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE );
loadingGlassPanel.setWidget( 0, 0, decoratedPanel );
loadingGlassPanel.setVisible( false );
loadingGlassPanel.setTitle( titlesI18N.communicatingToolTipText() );
loadingGlassPanel.setStyleName( CommonResourcesContainer.SITE_LOADING_COMPONENT_GLASS_PANEL_STYLE );
//Initialize the widget
initWidget( loadingGlassPanel );
}