Refine search
/** * Gets the singleton instance of RootLayoutPanel. This instance will always * be attached to the document body via {@link RootPanel#get()}. * * <p> * Note that, unlike {@link RootPanel#get(String)}, this class provides no way * to get an instance for any element on the page other than the document * body. This is because we know of no way to get resize events for anything * but the window. * </p> */ public static RootLayoutPanel get() { if (singleton == null) { singleton = new RootLayoutPanel(); RootPanel.get().add(singleton); } return singleton; }
private void setImages(ImageAdapter images, boolean useLeafImages) { this.images = images; this.useLeafImages = useLeafImages; if (!useLeafImages) { Image image = images.treeLeaf().createImage(); image.getElement().getStyle().setProperty("visibility", "hidden"); RootPanel.get().add(image); int size = image.getWidth() + TreeItem.IMAGE_PAD; image.removeFromParent(); indentValue = (size) + "px"; } }
private void onInstantaneousRun() { maybeShowGlass(); if (showing) { // Set the position attribute, and then attach to the DOM. Otherwise, // the PopupPanel will appear to 'jump' from its static/relative // position to its absolute position (issue #1231). curPanel.getElement().getStyle().setProperty("position", "absolute"); if (curPanel.topPosition != -1) { curPanel.setPopupPosition(curPanel.leftPosition, curPanel.topPosition); } RootPanel.get().add(curPanel); } else { if (!isUnloading) { RootPanel.get().remove(curPanel); } } curPanel.getElement().getStyle().setProperty("overflow", "visible"); } }
private void setImages(ImageAdapter images, boolean useLeafImages) { this.images = images; this.useLeafImages = useLeafImages; if (!useLeafImages) { Image image = images.treeLeaf().createImage(); image.getElement().getStyle().setProperty("visibility", "hidden"); RootPanel.get().add(image); int size = image.getWidth() + TreeItem.IMAGE_PAD; image.removeFromParent(); indentValue = (size) + "px"; } }