本文整理了Java中com.vaadin.ui.Window.isAttached()
方法的一些代码示例,展示了Window.isAttached()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.isAttached()
方法的具体详情如下:
包路径:com.vaadin.ui.Window
类名称:Window
方法名:isAttached
暂无
代码示例来源:origin: com.vaadin/vaadin-server
/**
* Adds a window as a subwindow inside this UI. To open a new browser window
* or tab, you should instead use a {@link UIProvider}.
*
* @param window
* @throws IllegalArgumentException
* if the window is already added to an application
* @throws NullPointerException
* if the given <code>Window</code> is <code>null</code>.
*/
public void addWindow(Window window)
throws IllegalArgumentException, NullPointerException {
if (window == null) {
throw new NullPointerException("Argument must not be null");
}
if (window.isAttached()) {
throw new IllegalArgumentException(
"Window is already attached to an application.");
}
attachWindow(window);
}
代码示例来源:origin: eclipse/hawkbit
private void refreshCaption() {
setCaption(null);
setEnabled(notificationsWindow.isAttached());
if (unreadNotificationCounter > 0) {
setVisible(true);
setEnabled(true);
setCaption("<div class='" + STYLE_UNREAD_COUNTER + "'>" + unreadNotificationCounter + "</div>");
}
setDescription(i18n.getMessage(DESCRIPTION, unreadNotificationCounter));
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void refreshCaption() {
setCaption(null);
setEnabled(notificationsWindow.isAttached());
if (unreadNotificationCounter > 0) {
setVisible(true);
setEnabled(true);
setCaption("<div class='" + STYLE_UNREAD_COUNTER + "'>" + unreadNotificationCounter + "</div>");
}
setDescription(i18n.getMessage(DESCRIPTION, new Object[] { unreadNotificationCounter }));
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void toggleWindow(final ClickEvent event) {
if (notificationsWindow.isAttached()) {
getUI().removeWindow(notificationsWindow);
return;
}
createUnreadMessagesLayout();
notificationsWindow.setPositionY(event.getClientY() - event.getRelativeY() + 40);
getUI().addWindow(notificationsWindow);
currentView.refreshView(unreadNotifications.keySet());
clear();
notificationsWindow.focus();
}
代码示例来源:origin: eclipse/hawkbit
private void toggleWindow(final ClickEvent event) {
if (notificationsWindow.isAttached()) {
getUI().removeWindow(notificationsWindow);
return;
}
createUnreadMessagesLayout();
notificationsWindow.setPositionY(event.getClientY() - event.getRelativeY() + 40);
getUI().addWindow(notificationsWindow);
currentView.refreshView(unreadNotifications.keySet());
clear();
notificationsWindow.focus();
}
代码示例来源:origin: OpenNMS/opennms
@Override
public void graphChanged(GraphContainer graphContainer) {
// are there any vertices to display?
boolean verticesAvailable = !graphContainer.getGraph().getDisplayVertices().isEmpty();
boolean collapsibleCriteriaInFocus = hasCollapsibleCriteriaInFocus(graphContainer);
// toggle view
if (verticesAvailable || collapsibleCriteriaInFocus) {
m_noContentWindow.setVisible(false);
removeWindow(m_noContentWindow);
m_topologyComponent.setEnabled(true);
} else {
m_topologyComponent.setEnabled(false);
m_noContentWindow.setVisible(true);
if(!m_noContentWindow.isAttached()){
addWindow(m_noContentWindow);
}
}
updateTabVisibility();
updateMenu();
if (m_currentHudDisplay != null) {
m_currentHudDisplay.setVertexFocusCount(getFocusVertices(m_graphContainer));
}
}
代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.app
@Override
public void graphChanged(GraphContainer graphContainer) {
// are there any vertices to display?
boolean verticesAvailable = !graphContainer.getGraph().getDisplayVertices().isEmpty();
boolean collapsibleCriteriaInFocus = hasCollapsibleCriteriaInFocus(graphContainer);
// toggle view
if (verticesAvailable || collapsibleCriteriaInFocus) {
m_noContentWindow.setVisible(false);
removeWindow(m_noContentWindow);
m_topologyComponent.setEnabled(true);
} else {
m_topologyComponent.setEnabled(false);
m_noContentWindow.setVisible(true);
if(!m_noContentWindow.isAttached()){
addWindow(m_noContentWindow);
}
}
updateTabVisibility();
updateMenu();
if (m_currentHudDisplay != null) {
m_currentHudDisplay.setVertexFocusCount(getFocusVertices(m_graphContainer));
}
}
代码示例来源:origin: com.github.markash/components
if (!notificationsWindow.isAttached()) {
notificationsWindow.setPositionY(event.getClientY() - event.getRelativeY() + 40);
notificationsWindow.setPositionX(event.getClientX() - event.getRelativeX() - 300);
内容来源于网络,如有侵权,请联系作者删除!