本文整理汇总了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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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");
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}