com.vaadin.ui.Window.addWindow()方法的使用及代码示例

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

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

Window.addWindow介绍

[英]Adds a WindowModeChangeListener to the window. The WindowModeChangeEvent is fired when the user changed the display state by clicking the maximize/restore button or by double clicking on the window header. The event is also fired if the state is changed using #setWindowMode(WindowMode).
[中]将WindowModeChangeListener添加到窗口。当用户通过单击最大化/还原按钮或双击窗口标题更改显示状态时,将触发WindowModeChangeEvent。如果使用#setWindowMode(WindowMode)更改状态,也会触发该事件。

代码示例

代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin6

public void show(Window ui) throws Exception {
  ui.addWindow(this);
}

代码示例来源:origin: org.aperteworkflow/gui-commons

public void show(Application application) {
  application.getMainWindow().addWindow(this);
}

代码示例来源:origin: apache/ace

/**
 * @param parent
 *            the parent window to show this dialog on top of.
 */
public void showWindow(Window parent) {
  try {
    // Fill the artifacts table with the data from the OBR...
    populateArtifactTable(m_artifactsTable);
    parent.addWindow(this);
  }
  catch (Exception e) {
    // We've not yet added this window to the given parent, so we cannot use #showErrorNotification here...
    parent.showNotification("Failed to retrieve OBR repository!", "Reason: <br/>" + e.getMessage(), Notification.TYPE_ERROR_MESSAGE);
  }
}

代码示例来源:origin: apache/ace

public void open(Window parent) {
  parent.removeWindow(this);
  parent.addWindow(this);
  center();
}

代码示例来源:origin: apache/ace

/**
 * Shows this login window on screen.
 *
 * @param parent
 *            the parent window, cannot be <code>null</code>.
 */
public void openWindow(Window parent) {
  parent.addParameterHandler(this);
  parent.addWindow(this);
  center();
}

代码示例来源:origin: apache/ace

/**
 * @param parent
 *            the parent window of this editor, cannot be <code>null</code>.
 */
public void open(Window parent) {
  // In case this window is already open, close it first...
  close();
  // will show this window on screen, and call attach() above...
  parent.addWindow(this);
  center();
  m_applyButton.setEnabled(false);
}

代码示例来源:origin: org.aperteworkflow/base-widgets

protected <DialogType extends DialogWindow> DialogType showDialog(DialogType dialog) {
  dialog.setI18NSource(messageSource);
  dialog.buildLayout();
  application.getMainWindow().addWindow(dialog);
  return dialog;
}

代码示例来源:origin: org.aperteworkflow/editor

@Override
  public void run() {
    Window window = new NewLanguageWindow();
    MessageEditor.this.getApplication().getMainWindow().addWindow(window);
  }
}

代码示例来源:origin: apache/ace

/**
 * Shows this dialog on the parent window.
 * 
 * @param parent
 *            the parent for this window, cannot be <code>null</code>.
 */
public final void showWindow(Window parent) {
  try {
    // Fill the artifacts table with the data from the OBR...
    populateArtifactTable(m_artifactsTable, m_obrUrl);
    parent.addWindow(this);
  }
  catch (Exception e) {
    // We've not yet added this window to the given parent, so we cannot use #showErrorNotification here...
    parent.showNotification("Failed to retrieve OBR repository!", "Reason: <br/>" + e.getMessage(), Notification.TYPE_ERROR_MESSAGE);
    logError("Failed to retrieve OBR repository!", e);
  }
}

代码示例来源:origin: org.aperteworkflow/gui-commons

public void showDetailsWindow() {
  getApplication().getMainWindow().addWindow(getDetailsWindow());
}

代码示例来源:origin: apache/ace

/**
 * Shows this dialog on screen.
 *
 * @param window the parent window to show this dialog on, cannot be <code>null</code>.
 */
public void show(Window parent) {
  if (getParent() != null) {
    // window is already showing
    parent.showNotification("Window is already open!");
  }
  else {
    parent.addWindow(this);
  }
  setRelevantFocus();
}

代码示例来源:origin: apache/ace

/**
 * Shows this dialog on screen.
 * 
 * @param window
 *            the parent window to show this dialog on, cannot be <code>null</code>.
 */
public void show(final Window window) {
  if (getParent() != null) {
    // window is already showing
    window.showNotification("Window is already open");
  }
  else {
    // Open the subwindow by adding it to the parent window
    window.addWindow(this);
  }
  setRelevantFocus();
}

代码示例来源:origin: org.apache.ace/org.apache.ace.webui.vaadin

public void show() {
  if (getParent() != null) {
    // window is already showing
    m_main.getWindow().showNotification("Window is already open");
  } else {
    // Open the subwindow by adding it to the parent
    // window
    m_main.getWindow().addWindow(this);
  }
  setRelevantFocus();
}

代码示例来源:origin: org.apache.ace/org.apache.ace.webui.vaadin

public void show() {
  if (getParent() != null) {
    // window is already showing
    m_main.getWindow().showNotification("Window is already open");
  } else {
    // Open the subwindow by adding it to the parent
    // window
    m_main.getWindow().addWindow(this);
  }
  setRelevantFocus();
}

代码示例来源:origin: org.apache.ace/org.apache.ace.webui.vaadin

private void showAddArtifactDialog(final Window main) {
  final AddArtifactWindow featureWindow = new AddArtifactWindow(main);
  if (featureWindow.getParent() != null) {
    // window is already showing
    main.getWindow().showNotification("Window is already open");
  }
  else {
    // Open the subwindow by adding it to the parent
    // window
    main.getWindow().addWindow(featureWindow);
  }
}

代码示例来源:origin: fi.vm.sade.organisaatio/organisaatio-ui-widgets

@Override
  public void buttonClick(Button.ClickEvent clickEvent) {
    popup.refreshData(organisationsHierarchy);
    popup.setWidth("50%");
    popup.setHeight("500px");
    popup.setModal(true);
    getApplication().getMainWindow().addWindow(popup);
  }
});

代码示例来源:origin: nz.co.senanque/madura-vaadinsupport

public void loadObject(T object, boolean newRow) {
  if (object == null) {
    close();
  } else {
    setItemDataSource(new BeanItem<T>(object));
    if (getParent() == null) {
      getViewManager().getMainWindow().addWindow(this);
      this.center();
    }
    m_object = object;
    m_newRow = newRow;
  }
}

代码示例来源:origin: apache/ace

public void buttonClick(ClickEvent event) {
  // Avoid double-clicks...
  event.getButton().setEnabled(false);
  try {
    if (getRepositoryAdmin().isModified()) {
      // Revert all changes...
      getWindow().addWindow(
        new ConfirmationDialog("Revert changes?",
          "Are you sure you want to overwrite all local changes?", this));
    }
    else {
      // Nothing to revert...
      showWarning("Nothing to revert", "There are no local changes that need to be reverted.");
    }
  }
  catch (IOException e) {
    handleIOException(e);
  }
}

代码示例来源:origin: apache/ace

public void buttonClick(ClickEvent event) {
  // Avoid double-clicks...
  event.getButton().setEnabled(false);
  final RepositoryAdmin repoAdmin = getRepositoryAdmin();
  try {
    if (repoAdmin.isModified()) {
      // Warn the user about the possible loss of changes...
      getWindow().addWindow(
        new ConfirmationDialog("Retrieve latest changes?",
          "The repository is changed. Are you sure you want to loose all local changes?", this));
    }
    else {
      retrieveData();
    }
  }
  catch (IOException e) {
    handleIOException(e);
  }
}

代码示例来源:origin: apache/ace

public void buttonClick(ClickEvent event) {
  // Avoid double-clicks...
  event.getButton().setEnabled(false);
  final RepositoryAdmin repoAdmin = getRepositoryAdmin();
  try {
    if (repoAdmin.isModified() && repoAdmin.isCurrent()) {
      getWindow().addWindow(
        new ConfirmationDialog("Revert changes?",
          "The repository is changed. Are you sure you want to loose all local changes?", this));
    }
    else {
      logout();
    }
  }
  catch (IOException e) {
    showError("Changes not stored", "Failed to store the changes to the server.", e);
  }
}

相关文章