本文整理汇总了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);
}
示例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();
}
});
}
示例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);
}
}
}
示例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;
}
示例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);
}
示例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;
}
}
}
示例7: createOverlay
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
@Override
protected VOverlay createOverlay() {
return new MyVOverlay(true, false);
}
示例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;
}
示例9: createCubaTableContextMenu
import com.vaadin.client.ui.VOverlay; //导入依赖的package包/类
public static VOverlay createCubaTableContextMenu() {
final VOverlay tableContextMenu = createContextMenu();
tableContextMenu.setStyleName("c-context-menu");
return tableContextMenu;
}