本文整理了Java中com.vaadin.ui.Window.getParent()
方法的一些代码示例,展示了Window.getParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.getParent()
方法的具体详情如下:
包路径:com.vaadin.ui.Window
类名称:Window
方法名:getParent
暂无
代码示例来源:origin: org.aperteworkflow/base-widgets
@Override
public void buttonClick(Button.ClickEvent event) {
newCommentWindow.getParent().removeWindow(newCommentWindow);
}
});
代码示例来源:origin: org.aperteworkflow/gui-commons
@Override
public void buttonClick(Button.ClickEvent event) {
newConfirmationWindow.getParent().removeWindow(newConfirmationWindow);
if (okEvent != null) {
okEvent.onEvent();
}
}
});
代码示例来源:origin: org.aperteworkflow/gui-commons
@Override
public void buttonClick(Button.ClickEvent event) {
newConfirmationWindow.getParent().removeWindow(newConfirmationWindow);
if (cancelEvent != null) {
cancelEvent.onEvent();
}
}
});
代码示例来源:origin: org.aperteworkflow/gui-commons
@Override
public void buttonClick(Button.ClickEvent event) {
newConfirmationWindow.getParent().removeWindow(newConfirmationWindow);
if (buttonEvent != null) {
buttonEvent.onEvent();
}
}
});
代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin-navigator
/**
* If current View is displayed in a Window, close the Window
*/
protected void closeCurrentViewWindow() {
final String currentState = navigator.getState();
if (currentState != null && viewWindows.containsKey(currentState)) {
synchronized (viewWindows) {
final WeakReference<Window> windowRef = viewWindows.get(currentState);
if (windowRef != null) {
final Window wnd = windowRef.get();
if (wnd != null && wnd.getParent() != null) {
// if was displayed in Window, close the Window
try {
navigateBackOnWindowClose = false;
wnd.close();
} finally {
navigateBackOnWindowClose = true;
}
}
}
viewWindows.remove(currentState);
}
}
}
代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin-navigator
/**
* Close all opened Windows displaying Views
*/
protected void closeAllViewWindows() {
final List<String> toRemove = new LinkedList<>();
for (Entry<String, WeakReference<Window>> entry : viewWindows.entrySet()) {
// remove Window
WeakReference<Window> windowRef = viewWindows.get(entry.getKey());
if (windowRef != null) {
final Window wnd = windowRef.get();
if (wnd != null && wnd.getParent() != null) {
// if was displayed in Window, close the Window
try {
navigateBackOnWindowClose = false;
wnd.close();
} finally {
navigateBackOnWindowClose = true;
}
}
}
toRemove.add(entry.getKey());
}
toRemove.forEach(state -> {
viewWindows.remove(state);
// remove from history
if (!getNavigationHistory().isEmpty()) {
getNavigationHistory().remove(state);
}
});
}
代码示例来源:origin: eclipse/hawkbit
/**
* TenantAwareEvent handler for button clicks.
*
* @param event
* the click event.
*/
@Override
public void buttonClick(final ClickEvent event) {
if (window.getParent() != null) {
isImplicitClose = true;
UI.getCurrent().removeWindow(window);
}
callback.response(event.getSource().equals(okButton));
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
/**
* TenantAwareEvent handler for button clicks.
*
* @param event
* the click event.
*/
@Override
public void buttonClick(final ClickEvent event) {
if (window.getParent() != null) {
isImplicitClose = true;
UI.getCurrent().removeWindow(window);
}
callback.response(event.getSource().equals(okButton));
}
代码示例来源:origin: org.aperteworkflow/base-widgets
@Override
public void buttonClick(Button.ClickEvent event) {
if (f.isValid()) {
f.commit();
bic.addBean(bi.getBean());
refreshData();
newCommentWindow.getParent().removeWindow(newCommentWindow);
}
else {
StringBuilder sb = new StringBuilder("<ul>");
for (Object propertyId : f.getItemPropertyIds()) {
Field field = f.getField(propertyId);
if (!field.isValid() && field.isRequired()) {
sb.append("<li>").append(field.getRequiredError()).append("</li>");
}
}
sb.append("</ul>");
VaadinUtility.validationNotification(getApplication(), i18NSource, sb.toString());
}
}
});
代码示例来源:origin: viritin/viritin
protected void adjustResetButtonState() {
if (popup != null && popup.getParent() != null) {
// Assume cancel button in a form opened to a popup also closes
// it, allows closing via cancel button by default
getResetButton().setEnabled(true);
return;
}
if (isBound()) {
boolean modified = hasChanges();
getResetButton().setEnabled(modified || popup != null);
}
}
代码示例来源:origin: viritin/viritin
protected void adjustResetButtonState() {
if (popup != null && popup.getParent() != null) {
// Assume cancel button in a form opened to a popup also closes
// it, allows closing via cancel button by default
getResetButton().setEnabled(true);
return;
}
if (isEagerValidation() && isBound()) {
boolean modified = fieldGroup.isBeanModified();
getResetButton().setEnabled(modified || popup != null);
}
}
内容来源于网络,如有侵权,请联系作者删除!