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

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

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

Window.setDraggable介绍

[英]Enables or disables that a window can be dragged (moved) by the user. By default a window is draggable.
[中]启用或禁用用户可以拖动(移动)窗口。默认情况下,窗口是可拖动的。

代码示例

代码示例来源:origin: com.holon-platform.vaadin7/holon-vaadin-navigator

@Override
public ViewWindowConfigurator draggable(boolean draggable) {
  getInstance().setDraggable(draggable);
  return this;
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private void decorateWindow(final Window window) {
  if (id != null) {
    window.setId(id);
  }
  if (SPUIDefinitions.CONFIRMATION_WINDOW.equals(type)) {
    window.setDraggable(false);
    window.setClosable(true);
    window.addStyleName(SPUIStyleDefinitions.CONFIRMATION_WINDOW_CAPTION);
  } else if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) {
    window.setDraggable(true);
    window.setClosable(true);
  }
}

代码示例来源:origin: eclipse/hawkbit

private void decorateWindow(final Window window) {
  if (id != null) {
    window.setId(id);
  }
  if (SPUIDefinitions.CONFIRMATION_WINDOW.equals(type)) {
    window.setDraggable(false);
    window.setClosable(true);
    window.addStyleName(SPUIStyleDefinitions.CONFIRMATION_WINDOW_CAPTION);
  } else if (SPUIDefinitions.CREATE_UPDATE_WINDOW.equals(type)) {
    window.setDraggable(true);
    window.setClosable(true);
  }
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private void createNotificationWindow() {
  notificationsWindow = new Window();
  notificationsWindow.setWidth(300.0F, Unit.PIXELS);
  notificationsWindow.addStyleName(STYLE_POPUP);
  notificationsWindow.addStyleName(STYLE_NO_CLOSEBOX);
  notificationsWindow.setClosable(true);
  notificationsWindow.setResizable(false);
  notificationsWindow.setDraggable(false);
  notificationsWindow.setId(UIComponentIdProvider.NOTIFICATION_UNREAD_POPUP_ID);
  notificationsWindow.addCloseListener(event -> refreshCaption());
  notificationsWindow.addBlurListener(this::closeWindow);
}

代码示例来源:origin: eclipse/hawkbit

private void createNotificationWindow() {
  notificationsWindow = new Window();
  notificationsWindow.setWidth(300.0F, Unit.PIXELS);
  notificationsWindow.addStyleName(STYLE_POPUP);
  notificationsWindow.addStyleName(STYLE_NO_CLOSEBOX);
  notificationsWindow.setClosable(true);
  notificationsWindow.setResizable(false);
  notificationsWindow.setDraggable(false);
  notificationsWindow.setId(UIComponentIdProvider.NOTIFICATION_UNREAD_POPUP_ID);
  notificationsWindow.addCloseListener(event -> refreshCaption());
  notificationsWindow.addBlurListener(this::closeWindow);
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework

public Window build() {
  Window dialog = new Window();
  dialog.addStyleName("light-box");
  dialog.setDraggable(false);
  dialog.setResizable(false);
  dialog.setModal(true);
  dialog.setWidth(95, Sizeable.Unit.PERCENTAGE);
  CssLayout contentWrapper = new CssLayout(content);
  contentWrapper.setSizeFull();
  contentWrapper.setStyleName("light-box-content");
  dialog.setContent(contentWrapper);
  dialog.center();
  return dialog;
}

代码示例来源:origin: com.github.markash/components

notificationsWindow.setClosable(true);
notificationsWindow.setResizable(true);
notificationsWindow.setDraggable(true);
notificationsWindow.addCloseShortcut(KeyCode.ESCAPE);
notificationsWindow.setContent(notificationsLayout);

相关文章

微信公众号

最新文章

更多