com.smartgwt.client.widgets.Window类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(11.6k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中com.smartgwt.client.widgets.Window类的一些代码示例,展示了Window类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window类的具体详情如下:
包路径:com.smartgwt.client.widgets.Window
类名称:Window

Window介绍

[英]A general purpose Window class for implementing dialogs, portlets, alerts, prompts, wizards and desktop-like windowing interfaces.

Windows can contain arbitrary Smart GWT components, configured via the com.smartgwt.client.widgets.Window#getItems property. Windows may be com.smartgwt.client.widgets.Window#getIsModal or non-modal.

Windows provide a series of highly configurable and skinnable autoChildren including a header, various header controls, footer, and corner resizer.

The more specialized com.smartgwt.client.widgets.Dialog subclass of Window has additional functionality targetted at simple prompts and confirmations, such as buttons with default actions, and single-method com.smartgwt.client.util.isc#warn for common application dialogs.
[中]一个通用窗口类,用于实现对话框、Portlet、警报、提示、向导和类似桌面的窗口界面。
Windows可以包含通过com配置的任意智能GWT组件。smartgwt。客户小部件。窗口#getItems属性。Windows可能是com。smartgwt。客户小部件。窗口#获取模态或非模态。
Windows提供了一系列高度可配置和可蒙皮的自动儿童,包括页眉、各种页眉控件、页脚和角大小调整器。
更专业的com。smartgwt。客户小部件。Window的Dialog子类具有针对简单提示和确认的附加功能,例如带有默认操作的按钮和单一方法com。smartgwt。客户util。isc#警告常见应用程序对话框。

代码示例

代码示例来源:origin: org.geomajas/geomajas-project-deskmanager-gwt

/**
   * Show the window.
   */
  public void show() {
    final Window winModal = new Window();
    winModal.setWidth(500);
    winModal.setHeight(300);
    winModal.setTitle(MESSAGES.rolesWindowUnauthorizedWindowTitle());
    winModal.setShowMinimizeButton(false);
    winModal.setIsModal(true);
    winModal.setShowModalMask(true);
    winModal.centerInPage();
    winModal.setShowCloseButton(false);
    winModal.setZIndex(GdmLayout.roleSelectZindex);

    HTMLPane pane = new HTMLPane();
    pane.setContents("<br/><br/><center>" + MESSAGES.rolesWindowInsufficientRightsForDesk() + "</center>");
    winModal.addItem(pane);
    winModal.show();
  }
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private void getToasterWindow() {
  if (this.toasterWindow == null) {
    this.toasterWindow = new Window();
    this.layout = new VLayout();
    this.layout.setTabIndex( -1);
    this.toasterWindow.setParentElement(this.parentElem);
    this.toasterWindow.setAnimateFadeTime(fadeout);
    this.toasterWindow.setHeight(this.height);
    this.toasterWindow.setWidth(this.width);
    this.toasterWindow.setTitle(this.title);
    this.toasterWindow.setAutoSize(new Boolean(false));
    this.toasterWindow.setOverflow(Overflow.AUTO);
    this.left = this.toasterWindow.getParentElement().getWidth().intValue() - this.width - 10;
    this.top = this.toasterWindow.getParentElement().getHeight().intValue() - this.height - 30;
    this.toasterWindow.setLeft(this.left);
    this.toasterWindow.setTop(this.top);
    this.toasterWindow.setCanDragResize(true);
    this.toasterWindow.setShowMaximizeButton(true);
    this.toasterWindow.setID(this.id);
    this.toasterWindow.addItem(this.layout);
    this.toasterWindow.addCloseClickHandler(new CloseClickHandler() {
      public void onCloseClick(CloseClickEvent event) {
        hide();
      }
    });
  }
}

代码示例来源:origin: org.geomajas.widget/geomajas-widget-searchandfilter-gwt

private void destroyWindow() {
  if (window != null) {
    window.destroy();
    window = null;
  }
}

代码示例来源:origin: org.geomajas.widget/geomajas-widget-featureinfo-gwt

public void onSuccess() {
  window.animateRect(originalLeft, originalTop, originalWidth, null);
  window.setCanDragReposition(originalDragRepo);
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

public void onClick(ClickEvent event) {
    DataControlsTimeSeries.this.expertsWindow.centerInPage();
    DataControlsTimeSeries.this.expertsWindow.show();
  }
});

代码示例来源:origin: org.geomajas.widget/geomajas-widget-featureinfo-gwt

private Window createWindow(String subtitle) {
  Window w = new Window();
  w.setWidth(windowWidth);
  w.setHeight(windowHeight);
  w.setTitle(I18nProvider.getAttribute().getAttributeWindowTitle(subtitle));
  w.setCanDragReposition(true);
  w.setCanDragResize(true);
  w.setAutoCenter(true);
  w.setKeepInParentRect(true);
  return w;
}

代码示例来源:origin: com.github.livesense/org.liveSense.jcr.explorer

public Window addMixinTypeBox(JcrExplorer jackrabbitExplorer) {
  final Window addMixinTypeWindow = new Window();
  addMixinTypeWindow.setShowMinimizeButton(false);  
  addMixinTypeWindow.setIsModal(true);  
  addMixinTypeWindow.setShowModalMask(true);  
  addMixinTypeWindow.setTitle("Add New Mixin type");
  addMixinTypeWindow.setCanDragReposition(true);
  addMixinTypeWindow.setCanDragResize(true);
  addMixinTypeWindow.setHeight(120);
  addMixinTypeWindow.setWidth(400);
  addMixinTypeWindow.setTop("30%");
  addMixinTypeWindow.setLeft("35%");
  addMixinTypeForm.addSubmitValuesHandler(new AddNodeSubmitValuesHandler(jackrabbitExplorer));
  addMixinTypeForm.setItems(mixinNodeType, addMixinTypeSubmitItem);
  addMixinTypeWindow.addItem(addMixinTypeForm);
  addMixinTypeWindow.show();
  mixinNodeType.focusInItem();
  return addMixinTypeWindow;

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

Window window = new Window();
window.setWidth(300);
window.setHeight(250);
window.setAutoSize(true);
window.setTitle(i18n.createNewUser());
window.setCanDragReposition(true);
window.setCanDragResize(true);
window.centerInPage();
window.addItem(form);
window.draw();

代码示例来源:origin: com.github.livesense/org.liveSense.jcr.explorer

private Window createRemoteWindow(String title, String url) {
  Window remoteWindow = new Window();
  HTMLPane htmlPane = new HTMLPane();
  htmlPane.setContentsURL(url);
  htmlPane.setContentsType(ContentsType.PAGE);
  remoteWindow.addItem(htmlPane);
  remoteWindow.setTitle(title);
  remoteWindow.setShowMaximizeButton(true);
  remoteWindow.setCanDragReposition(true);
  remoteWindow.setCanDragResize(true);
  remoteWindow.setHeight("40%");
  remoteWindow.setWidth("40%");
  remoteWindow.setAutoCenter(true);
  remoteWindow.setShowResizeBar(true);
  remoteWindow.setDefaultResizeBars(LayoutResizeBarPolicy.MARKED);
  remoteWindow.show();
  return remoteWindow;
}

代码示例来源:origin: com.github.livesense/org.liveSense.jcr.explorer

public Window editPropertyBox(JcrExplorer jackrabbitExplorer, JcrProperty prop, final boolean isNew) {
  final Window editPropertyWindow = new Window();
  editPropertyWindow.setShowMinimizeButton(false);  
  editPropertyWindow.setIsModal(true);  
  editPropertyWindow.setShowModalMask(true);  
  editPropertyWindow.centerInPage();
  if (isNew)
    editPropertyWindow.setTitle("Add New Property");
  else 
    editPropertyWindow.setTitle("Edit Property");
  editPropertyWindow.setCanDragReposition(true);
  editPropertyWindow.setCanDragResize(true);
  editPropertyWindow.setHeight(600);
  editPropertyWindow.setWidth(800);
  editPropertyWindow.setAutoCenter(true);
  vStack.setPadding(10);
  vStack.addMember(hStack);
  editPropertyWindow.addItem(vStack);
  editPropertyWindow.show();
  propName.focusInItem();
  if (prop != null) setFieldsFromProperty(prop);

代码示例来源:origin: com.github.livesense/org.liveSense.jcr.explorer

private Window createPossibleIconsWindow(ListGrid listGrid) {
  Window changeNodeTypeWindow = new Window();
  changeNodeTypeWindow.setShowMinimizeButton(false);  
  changeNodeTypeWindow.setIsModal(true);  
  changeNodeTypeWindow.setShowModalMask(true);  
  changeNodeTypeWindow.setTitle("Change Node Type Icon");
  changeNodeTypeWindow.setCanDragReposition(true);
  changeNodeTypeWindow.setCanDragResize(false);
  changeNodeTypeWindow.setAutoCenter(true);
  changeNodeTypeWindow.setWidth(500);
  changeNodeTypeWindow.setHeight(400);
  changeNodeTypeWindow.setAlign(VerticalAlignment.BOTTOM);
  verticalStack.addMember(horizontalStack);
  changeNodeTypeWindow.addItem(verticalStack);
  return changeNodeTypeWindow;

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

public void onClick(ClickEvent event) {
    com.smartgwt.client.widgets.Window w = new com.smartgwt.client.widgets.Window();
    w.setTitle(i18n.Impressum());
    w.setWidth(450);
    w.setHeight(460);
    w.centerInPage();
    w.setIsModal(true);
    VLayout layout = new VLayout();
    HTMLPane pane = new HTMLPane();
    pane.setContentsURL(i18n.imprintPath());
    layout.setStyleName("n52_sensorweb_client_imprint_content");
    layout.addMember(pane);
    w.addItem(layout);
    w.show();
  }
});

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-geocoder-gwt

public void onSelectAlternative(SelectAlternativeEvent event) {
  if (null == altWindow) {
    altGrid = new GeocoderAlternativesGrid(geocoderWidget, event.getAlternatives());
    altWindow = new Window();
    altWindow.setAutoSize(true);
    altWindow.setTitle(messages.alternativeSelectTitle());
    altWindow.setAutoSize(true);
    altWindow.setLeft(20);
    altWindow.setTop(20);
    altWindow.setCanDragReposition(true);
    altWindow.setCanDragResize(true);
    altWindow.addItem(altGrid);
    altWindow.addCloseClickHandler(new CloseClickHandler() {
      public void onCloseClick(CloseClickEvent closeClickEvent) {
        removeAltWindow();
      }
    });
    map.addChild(altWindow);
  } else {
    altGrid.update(event.getAlternatives());
  }
}
// @extract-end

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private void createInformationWindow() {
  informationWindow = new Window();
  informationWindow.setTitle(LegendEntryTimeSeries.this.getTimeSeries().getTimeSeriesLabel());
  informationWindow.setWidth(450);
  informationWindow.setHeight(500);
  informationWindow.setShowMinimizeButton(false);
  informationWindow.centerInPage();
  HTMLPane htmlPane = new HTMLPane();
  htmlPane.setContentsURL(LegendEntryTimeSeries.this
      .getTimeSeries().getMetadataUrl()); 
  htmlPane.setContentsType(ContentsType.PAGE);
  informationWindow.addItem(htmlPane);
}

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

private Canvas createStyleToolsWindow() {
  this.styleChanger = new Window();
  this.styleChanger.setShowModalMask(true);
  this.styleChanger.setWidth(250);
  this.styleChanger.setHeight(280);
  this.styleChanger.setIsModal(true);
  this.styleChanger.centerInPage();
  this.styleChanger.setCanDragResize(true);
  this.styleChanger.setShowCloseButton(true);
  vlayout.addMember(buttonsStyle);
  this.styleChanger.setStyleName("n52_sensorweb_client_styleChangerForm");
  this.styleChanger.addItem(vlayout);
  this.styleChanger.hide();

代码示例来源:origin: org.geomajas.widget/geomajas-widget-featureinfo-gwt-example-jar

public Window createFeatureDetailWindow(Feature feature, boolean editingAllowed) {
  Window w = new Window();
  w.setAutoSize(true);
  w.setTitle(I18nProvider.getAttribute().getAttributeWindowTitle(feature.getLabel()));
  w.setCanDragReposition(true);
  w.setCanDragResize(true);
  w.addItem(new CustomCountriesFeatureInfoCanvas(feature));
  return w;
}

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-print-gwt

@Override
public void onClick(ClickEvent event) {
  PrintPreferencesCanvas canvas = new PrintPreferencesCanvas(mapWidget);
  canvas.setMargin(WidgetLayout.marginSmall);
  Window window = new KeepInScreenWindow();
  window.setTitle(MESSAGES.printPrefsTitle());
  window.addItem(canvas);
  window.centerInPage();
  window.setAutoSize(true);
  window.show();
}

代码示例来源:origin: org.geomajas.widget/geomajas-widget-searchandfilter-gwt

public void onAddRequested(final FavouriteEvent event) {
  final SearchFavourite fav = event.getNewFavourite();
  final Window addWindow = new DockableWindow();
  addWindow.setTitle(messages.favouritesControllerAddTitle());
  addWindow.setWidth(310);
  addWindow.setHeight(145);
  addWindow.setAutoCenter(true);
  addWindow.setShowMinimizeButton(false);
  addWindow.setIsModal(true);
  addWindow.setKeepInParentRect(true);
  mainLayout.addMember(form);
  mainLayout.addMember(buttonLayout);
  addWindow.addItem(mainLayout);
  addWindow.show();

代码示例来源:origin: org.geomajas.widget/geomajas-widget-searchandfilter-gwt

layout.addMember(img);
Window w = new DockableWindow();
w.setTitle(messages.searchControllerSearchingTitle());
w.setAlign(Alignment.CENTER);
w.setPadding(5);
w.setHeight(100);
w.setWidth(300);
w.addItem(layout);
w.setShowMinimizeButton(false);
w.setShowCloseButton(false);
w.setKeepInParentRect(true);
w.setAutoCenter(true);
return w;

代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui

this.bottomLayout.setTabIndex(-1);
this.expertsWindow = new Window();
this.expertsWindow.setTitle(i18n.expertsMenu());
this.expertsWindow.setIsModal(true);
this.expertsWindow.setWidth(290);
this.expertsWindow.setHeight(130);
this.expertsWindow.setCanDragResize(true);
this.expertsWindow.setShowModalMask(true);
this.expertsWindow.addItem(this.expertsLayout);

相关文章