当前位置: 首页>>代码示例>>Java>>正文


Java DecoratorPanel.add方法代码示例

本文整理汇总了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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:24,代码来源:WfsCapabilitiesPanel.java

示例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");
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:23,代码来源:FeatureInfoPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:18,代码来源:HtmlMarkerPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:19,代码来源:LayerVisibilityPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:19,代码来源:LayerRefreshPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:20,代码来源:CapabilitiesPanel.java

示例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);
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:17,代码来源:ListenerPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:19,代码来源:ClientSideOsmLayerPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:27,代码来源:LayerOpacityPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:20,代码来源:WmsLayerPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:19,代码来源:ViewPortEventPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:18,代码来源:ResizeMapPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:23,代码来源:CanvasRenderingPanel.java

示例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;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:26,代码来源:LayerOrderPanel.java

示例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 );
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:40,代码来源:SiteLoadingGlassPanel.java


注:本文中的com.google.gwt.user.client.ui.DecoratorPanel.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。