com.smartgwt.client.widgets.Window.setCanDragReposition()方法的使用及代码示例

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

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

Window.setCanDragReposition介绍

[英]If true, this Window may be moved around by the user by dragging on the Window header. Note that if the header is not showing, the Window can't be drag-repositioned regardless of this setting.
[中]如果为true,用户可以通过拖动窗口标题来移动此窗口。请注意,如果标题未显示,则无论此设置如何,都无法拖动窗口重新定位。

代码示例

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

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

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

public void onMinimizeClick(MinimizeClickEvent event) {
  originalWidth = window.getWidth();
  originalLeft = window.getLeft();
  originalTop = window.getTop();
  originalDragRepo = window.getCanDragReposition();
  window.setCanDragReposition(false); // doens't work !?
  window.setAutoCenter(false);
  docked = true;
  GWT.runAsync(new RunAsyncCallback() {
    public void onSuccess() {
      window.animateRect(currentPosition, Document.get().getBody().getClientHeight() - minimizedHeight,
          minimizedWidth, null, new AnimationCallback() {
            public void execute(boolean earlyFinish) {
              currentPosition += window.getWidth(); // not
                                // necessarily
                                // equal
                                // to
                                // minimizedWidth.
            }
          });
    }
    public void onFailure(Throwable reason) {
    }
  });
}

代码示例来源: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: 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: 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

private Window createBinaryImgWindow(String title, String path, String mimeType) {
  Window binaryWindow = new Window();
  Img img = new Img(BINARY_SERVLET_PATH + path);
  img.setImageType(ImageStyle.STRETCH);
  img.setHeight100();
  img.setWidth100();
  binaryWindow.addItem(img);
  binaryWindow.setTitle(title);
  binaryWindow.setShowMaximizeButton(true);
  binaryWindow.setCanDragReposition(true);
  binaryWindow.setCanDragResize(true);
  binaryWindow.setHeight("40%");
  binaryWindow.setWidth("40%");
  binaryWindow.setAutoCenter(true);
  binaryWindow.setShowResizeBar(true);
  //binaryWindow.setDefaultResizeBars(LayoutResizeBarPolicy.MARKED);
  binaryWindow.show();
  return binaryWindow;
}

代码示例来源: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: com.github.livesense/org.liveSense.jcr.explorer

addMixinTypeWindow.setCanDragReposition(true);
addMixinTypeWindow.setCanDragResize(true);
addMixinTypeWindow.setHeight(120);

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

changeNodeTypeWindow.setShowModalMask(true);  
changeNodeTypeWindow.setTitle("Change Node Type Icon");
changeNodeTypeWindow.setCanDragReposition(true);
changeNodeTypeWindow.setCanDragResize(false);
changeNodeTypeWindow.setAutoCenter(true);

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

addNewNodeWindow.setCanDragReposition(true);
addNewNodeWindow.setCanDragResize(true);
addNewNodeWindow.setHeight(200);

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

window.setAutoSize(true);
window.setTitle(i18n.createNewUser());
window.setCanDragReposition(true);
window.setCanDragResize(true);
window.centerInPage();

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

window.setAutoSize(true);
window.setTitle(i18n.editUserData());
window.setCanDragReposition(true);
window.setCanDragResize(true);
window.centerInPage();

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

editPropertyWindow.setTitle("Edit Property");
editPropertyWindow.setCanDragReposition(true);
editPropertyWindow.setCanDragResize(true);
editPropertyWindow.setHeight(600);

相关文章