本文整理汇总了Java中com.vaadin.client.ui.VOverlay类的典型用法代码示例。如果您正苦于以下问题:Java VOverlay类的具体用法?Java VOverlay怎么用?Java VOverlay使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VOverlay类属于com.vaadin.client.ui包,在下文中一共展示了VOverlay类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: DefaultOfflineMode
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
public DefaultOfflineMode() {
active = false;
flowPanel = new FlowPanel();
overlay = new VOverlay();
msg = GWT.create(OfflineModeMessages.class);
overlay.addStyleName("v-window");
overlay.addStyleName("v-touchkit-offlinemode");
// Make sure that the outer and containers have 100% sizes
overlay.getElement().getStyle().setWidth(100, Unit.PCT);
overlay.getElement().getStyle().setHeight(100, Unit.PCT);
overlay.setWidth("100%");
overlay.setHeight("100%");
// Make sure this is overloading the indicator
overlay.getElement().getStyle().setZIndex(Z_INDEX);
overlay.add(flowPanel);
}
开发者ID:vaadin,项目名称:touchkit,代码行数:20,代码来源:DefaultOfflineMode.java
示例2: Android2NativeSelectReplacement
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
public Android2NativeSelectReplacement() {
setStyleName(B.css().android23Select());
container.clear();
l = new Label(" ");
container.add(l);
l.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
overlay = new VOverlay(true, true);
overlay.setStyleName(B.css().android23SelectOverlay());
overlay.setGlassEnabled(true);
overlay.setGlassStyleName(B.css().android23SelectOverlayGlass());
overlay.add(options);
TouchScrollDelegate.enableTouchScrolling(overlay, overlay.getElement());
overlay.center();
}
});
}
开发者ID:vaadin,项目名称:touchkit,代码行数:19,代码来源:Android2NativeSelectReplacement.java
示例3: isUnderOverlay
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
protected static boolean isUnderOverlay(Element dropZoneElement) {
Widget dropZoneWidget = WidgetUtil.findWidget(dropZoneElement, null);
if (dropZoneWidget == null)
return false;
ComponentConnector dropZoneConnector = Util.findConnectorFor(dropZoneWidget);
if (dropZoneConnector == null)
return false;
ApplicationConnection ac = dropZoneConnector.getConnection();
List<WindowConnector> windowConnectors = ac.getUIConnector().getSubWindows();
if (windowConnectors == null || windowConnectors.size() == 0)
return false;
List<VWindow> windows = windowConnectors.stream()
.map(WindowConnector::getWidget)
.collect(Collectors.toList());
Widget dropZoneTopParent = getWidgetTopParent(dropZoneWidget);
if (dropZoneTopParent instanceof VWindow) {
return modalWindowIsUnderOverlay((VWindow) dropZoneTopParent, windows);
} else if (dropZoneTopParent instanceof VUI) {
return containsModalWindow(windows);
} else {
Widget topParentOwner = ((VOverlay) dropZoneTopParent).getOwner();
Widget ownerParent = getWidgetTopParent(topParentOwner);
if (ownerParent instanceof VWindow) {
return modalWindowIsUnderOverlay((VWindow) ownerParent, windows);
} else {
return containsModalWindow(windows);
}
}
}
开发者ID:cuba-platform,项目名称:cuba,代码行数:35,代码来源:JQueryFileUploadOverlay.java
示例4: getWidgetTopParent
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
protected static Widget getWidgetTopParent(Widget widget) {
Widget parent = widget.getParent();
while (!(parent instanceof VWindow) &&
!(parent instanceof VUI) &&
!(parent instanceof VOverlay)) {
parent = parent.getParent();
}
return parent;
}
开发者ID:cuba-platform,项目名称:cuba,代码行数:12,代码来源:JQueryFileUploadOverlay.java
示例5: showPopup
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
public static void showPopup(VOverlay overlay, int left, int top) {
overlay.setAutoHideEnabled(true);
overlay.setVisible(false);
overlay.show();
Widget widget = overlay.getWidget();
if (widget instanceof VVerticalLayout) {
resetItemSelection(widget);
VVerticalLayout verticalLayout = (VVerticalLayout) widget;
if (verticalLayout.getStyleName().contains(CUBA_CONTEXT_MENU_CONTAINER)) {
int widgetCount = verticalLayout.getWidgetCount();
if (widgetCount > 1) {
Widget verticalSlot = verticalLayout.getWidget(0);
Widget buttonWidget = ((Slot) verticalSlot).getWidget();
buttonWidget.addStyleName(SELECTED_ITEM_STYLE);
if (buttonWidget instanceof FocusWidget) {
((FocusWidget) buttonWidget).setFocus(true);
}
}
}
}
// mac FF gets bad width due GWT popups overflow hacks,
// re-determine width
int offsetWidth = overlay.getOffsetWidth();
int offsetHeight = overlay.getOffsetHeight();
if (offsetWidth + left > Window.getClientWidth()) {
left = left - offsetWidth;
if (left < 0) {
left = 0;
}
}
if (offsetHeight + top > Window.getClientHeight()) {
top = top - offsetHeight;
if (top < 0) {
top = 0;
}
}
overlay.setPopupPosition(left, top);
overlay.setVisible(true);
}
开发者ID:cuba-platform,项目名称:cuba,代码行数:44,代码来源:Tools.java
示例6: setDockable
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
public void setDockable(boolean dockable) {
if (isDockable() == dockable) {
return;
}
if (dockable) {
dockButton = new CubaPlaceHolderWidget();
dockButton.setStyleName(SP_DOCK_BUTTON);
dockButton.addStyleName(SP_DOCK_BUTTON_LEFT);
dockButton.addDomHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
onDockButtonClick();
}
}, ClickEvent.getType());
dockButtonContainer = new VOverlay();
dockButtonContainer.addStyleName(SP_DOCK_OVERLAY);
dockButtonContainer.getElement().getStyle().setZIndex(9999);
if (dockMode == SplitPanelDockMode.LEFT) {
dockButtonContainer.setStyleName(SP_DOCK_LEFT);
} else if (dockMode == SplitPanelDockMode.RIGHT) {
dockButtonContainer.setStyleName(SP_DOCK_RIGHT);
}
dockButtonContainer.setOwner(this);
dockButtonContainer.setWidget(dockButton);
dockButtonContainer.show();
updateDockButtonPosition();
} else {
if (dockButtonContainer != null) {
dockButtonContainer.hide();
dockButtonContainer.removeFromParent();
dockButtonContainer = null;
dockButton = null;
}
}
}
开发者ID:cuba-platform,项目名称:cuba,代码行数:42,代码来源:CubaHorizontalSplitPanelWidget.java
示例7: createOverlay
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
@Override
protected VOverlay createOverlay() {
return new MyVOverlay(true, false);
}
开发者ID:vaadin,项目名称:context-menu,代码行数:5,代码来源:MyVMenuBar.java
示例8: createCubaTablePopup
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
public static VOverlay createCubaTablePopup(boolean autoClose) {
final VOverlay tableCustomPopup = autoClose ? createContextMenu() : new VOverlay();
tableCustomPopup.setStyleName("c-table-popup");
return tableCustomPopup;
}
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:Tools.java
示例9: createCubaTableContextMenu
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
public static VOverlay createCubaTableContextMenu() {
final VOverlay tableContextMenu = createContextMenu();
tableContextMenu.setStyleName("c-context-menu");
return tableContextMenu;
}
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:Tools.java
注:本文中的com.vaadin.client.ui.VOverlay类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论