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


Java DecoratorPanel类代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.DecoratorPanel的典型用法代码示例。如果您正苦于以下问题:Java DecoratorPanel类的具体用法?Java DecoratorPanel怎么用?Java DecoratorPanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DecoratorPanel类属于com.google.gwt.user.client.ui包,在下文中一共展示了DecoratorPanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeFixedSizeContainer

import com.google.gwt.user.client.ui.DecoratorPanel; //导入依赖的package包/类
public Panel makeFixedSizeContainer(int width, int height, boolean decorated) {

        SimplePanel panel= new SimplePanel();
        panel.setWidget(this);
        panel.setPixelSize(width,height);

        Panel retval= panel;

        if (decorated) {
            DecoratorPanel dp= new DecoratorPanel();
            dp.setWidget(panel);
            retval= dp;
        }
        return retval;

    }
 
开发者ID:lsst,项目名称:firefly,代码行数:17,代码来源:MiniPlotWidget.java

示例2: makeFailureMessage

import com.google.gwt.user.client.ui.DecoratorPanel; //导入依赖的package包/类
public Panel makeFailureMessage(String message, int width, int height, boolean decorated) {
    VerticalPanel panel= new VerticalPanel();
    HTML header = new HTML(getTitle());
    Widget msg = GwtUtil.centerAlign(new HTML(message));
    header.addStyleName("preview-title");
    GwtUtil.setStyle(msg, "padding", "5px");
    panel.add(header);
    panel.add(msg);
    panel.setPixelSize(width, height);

    Panel retval= panel;

    if (decorated) {
        DecoratorPanel dp= new DecoratorPanel();
        dp.setWidget(panel);
        retval= dp;
    }
    return retval;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:20,代码来源:MiniPlotWidget.java

示例3: onSuccess

import com.google.gwt.user.client.ui.DecoratorPanel; //导入依赖的package包/类
public void onSuccess(List<PacketBbsThread> result) {
	for (final PacketBbsThread thread : result) {
		final LazyPanel lazyPanel = new LazyPanel() {
			@Override
			protected Widget createWidget() {
				DecoratorPanel decoratorPanel = new DecoratorPanel();
				decoratorPanel.setWidget(new PanelThread((int) thread.id, thread.title));
				return decoratorPanel;
			}
		};

		OpenHandler<DisclosurePanel> openHandler = new OpenHandler<DisclosurePanel>() {
			@Override
			public void onOpen(OpenEvent<DisclosurePanel> event) {
				lazyPanel.ensureWidget();
			}
		};

		DisclosurePanel disclosurePanel = new DisclosurePanel(thread.title);
		disclosurePanel.setContent(lazyPanel);
		disclosurePanel.addOpenHandler(openHandler);
		add(disclosurePanel);
	}
}
 
开发者ID:nodchip,项目名称:QMAClone,代码行数:25,代码来源:PanelThreadList.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:
	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

示例5: 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

示例6: asWidget

import com.google.gwt.user.client.ui.DecoratorPanel; //导入依赖的package包/类
public Widget asWidget() {
	// Define the left layout:
	Widget layout = UI_BINDER.createAndBindUi(this);

	// Create the MapPresenter and add an InitializationHandler:
	mapPresenter = GeomajasImpl.getInstance().createMapPresenter();
	mapPresenter.setSize(480, 480);
	mapPresenter.getEventBus().addMapCompositionHandler(new MyMapCompositionHandler());
	legendPanel.add(new MapControlPanel(mapPresenter));

	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,代码行数:19,代码来源:LegendAddRemoveSample.java

示例7: 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));
	List<Double> resolutions = new ArrayList<Double>();
	resolutions.add(0.703125);
	resolutions.add(0.3515625);
	resolutions.add(0.17578125);
	resolutions.add(0.087890625);
	resolutions.add(0.0439453125);
	configuration.setResolutions(resolutions);
	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,代码行数:26,代码来源:TmsLayerPanel.java

示例8: 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

示例9: onProfile

import com.google.gwt.user.client.ui.DecoratorPanel; //导入依赖的package包/类
@UiHandler("profileBox")
protected void onProfile(ChangeEvent event) {
	String name = profileBox.getValue(profileBox.getSelectedIndex());
	if (name != null) {
		Profile profile = Profile.valueOf(name);			
		MapConfiguration configuration = null;
		if (Profile.GLOBAL_GEODETIC.equals(profile)) {
			configuration = TmsClient.getInstance().createGeodeticMap();
		} else {
			configuration = TmsClient.getInstance().createMercatorMap();
		}
		mapPanel.clear();
		mapPresenter = GeomajasImpl.getInstance().createMapPresenter(configuration, 480, 480);
		DecoratorPanel mapDecorator = new DecoratorPanel();
		mapDecorator.add(mapPresenter.asWidget());
		mapPanel.add(mapDecorator);
		getCapabilities();
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:20,代码来源:ProfilesPanel.java

示例10: 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

示例11: 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

示例12: 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

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

示例14: 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

示例15: 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,代码来源:ScreenSpaceRenderingPanel.java


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