/** * Adds zero or none CSS values for padding, margin and border to prevent * stylesheet overrides. Returns the element for convenience to support * builder pattern. * * @param elem the element * @return the element */ static final Element preventBoxStyles(final Element elem) { DOM.setIntStyleAttribute(elem, "padding", 0); DOM.setIntStyleAttribute(elem, "margin", 0); elem.getStyle().setProperty("border", "none"); return elem; }
/** * Make sure the element is always on top. */ public static void onTop(final Element element) { // Use camel case style names that GWT prefers instead of the standard name. // Not "z-index". GWT code has assertions for this which are enabled // in dev mode. DOM.setIntStyleAttribute(element, "zIndex", Integer.MAX_VALUE); } }
/** * Make sure the element is always on top. */ public static void onTop(final Element element) { // Use camel case style names that GWT prefers instead of the standard name. // Not "z-index". GWT code has assertions for this which are enabled // in dev mode. DOM.setIntStyleAttribute(element, "zIndex", Integer.MAX_VALUE); } }
/** * Sets the element's z-index. * * @param zIndex the z-index value * @return this */ public El setZIndex(int zIndex) { DOM.setIntStyleAttribute(dom, "zIndex", Math.max(0, zIndex)); return this; }
DOM.setIntStyleAttribute(focusable, "left", 0); DOM.setIntStyleAttribute(focusable, "top", 0); return;
private void init(ImageAdapter images, boolean useLeafImages) { setImages(images, useLeafImages); setElement(DOM.createDiv()); getElement().getStyle().setProperty("position", "relative"); // Fix rendering problem with relatively-positioned elements and their // children by // forcing the element that is positioned relatively to 'have layout' getElement().getStyle().setProperty("zoom", "1"); focusable = FocusPanel.impl.createFocusable(); focusable.getStyle().setProperty("fontSize", "0"); focusable.getStyle().setProperty("position", "absolute"); // Hide focus outline in Mozilla/Webkit focusable.getStyle().setProperty("outline", "0px"); // Hide focus outline in IE 6/7 focusable.setAttribute("hideFocus", "true"); DOM.setIntStyleAttribute(focusable, "zIndex", -1); DOM.appendChild(getElement(), focusable); sinkEvents(Event.ONMOUSEDOWN | Event.ONCLICK | Event.KEYEVENTS); DOM.sinkEvents(focusable, Event.FOCUSEVENTS); // The 'root' item is invisible and serves only as a container // for all top-level items. root = new TreeItem(true); root.setTree(this); setStyleName("gwt-Tree"); // Add a11y role "tree" Roles.getTreeRole().set(focusable); }
/** * Adds zero or none CSS values for padding, margin and border to prevent * stylesheet overrides. Returns the element for convenience to support * builder pattern. * * @param elem the element * @return the element */ static final Element preventBoxStyles(final Element elem) { DOM.setIntStyleAttribute(elem, "padding", 0); DOM.setIntStyleAttribute(elem, "margin", 0); elem.getStyle().setProperty("border", "none"); return elem; }
/** * Adds zero or none CSS values for padding, margin and border to prevent * stylesheet overrides. Returns the element for convenience to support * builder pattern. * * @param elem the element * @return the element */ static final Element preventBoxStyles(final Element elem) { DOM.setIntStyleAttribute(elem, "padding", 0); DOM.setIntStyleAttribute(elem, "margin", 0); elem.getStyle().setProperty("border", "none"); return elem; }
/** * Sets the z-index of the panel. * * @param index the z index */ public void setZIndex(int index) { index = Math.max(1, index); if (GXT.isIE) { setZIndexIE(index); } else { DOM.setIntStyleAttribute(getElement(), "zIndex", index); } }
DOM.setIntStyleAttribute(focusable, "left", 0); DOM.setIntStyleAttribute(focusable, "top", 0); return;
DOM.setIntStyleAttribute(focusable, "left", 0); DOM.setIntStyleAttribute(focusable, "top", 0); return;
private void init(ImageAdapter images, boolean useLeafImages) { setImages(images, useLeafImages); setElement(DOM.createDiv()); getElement().getStyle().setProperty("position", "relative"); // Fix rendering problem with relatively-positioned elements and their // children by // forcing the element that is positioned relatively to 'have layout' getElement().getStyle().setProperty("zoom", "1"); focusable = FocusPanel.impl.createFocusable(); focusable.getStyle().setProperty("fontSize", "0"); focusable.getStyle().setProperty("position", "absolute"); // Hide focus outline in Mozilla/Webkit focusable.getStyle().setProperty("outline", "0px"); // Hide focus outline in IE 6/7 focusable.setAttribute("hideFocus", "true"); DOM.setIntStyleAttribute(focusable, "zIndex", -1); DOM.appendChild(getElement(), focusable); sinkEvents(Event.ONMOUSEDOWN | Event.ONCLICK | Event.KEYEVENTS); DOM.sinkEvents(focusable, Event.FOCUSEVENTS); // The 'root' item is invisible and serves only as a container // for all top-level items. root = new TreeItem(true); root.setTree(this); setStyleName("gwt-Tree"); // Add a11y role "tree" Roles.getTreeRole().set(focusable); }
private void init(ImageAdapter images, boolean useLeafImages) { setImages(images, useLeafImages); setElement(DOM.createDiv()); getElement().getStyle().setProperty("position", "relative"); // Fix rendering problem with relatively-positioned elements and their // children by // forcing the element that is positioned relatively to 'have layout' getElement().getStyle().setProperty("zoom", "1"); focusable = FocusPanel.impl.createFocusable(); focusable.getStyle().setProperty("fontSize", "0"); focusable.getStyle().setProperty("position", "absolute"); // Hide focus outline in Mozilla/Webkit focusable.getStyle().setProperty("outline", "0px"); // Hide focus outline in IE 6/7 focusable.setAttribute("hideFocus", "true"); DOM.setIntStyleAttribute(focusable, "zIndex", -1); DOM.appendChild(getElement(), focusable); sinkEvents(Event.ONMOUSEDOWN | Event.ONCLICK | Event.KEYEVENTS); DOM.sinkEvents(focusable, Event.FOCUSEVENTS); // The 'root' item is invisible and serves only as a container // for all top-level items. root = new TreeItem(true); root.setTree(this); setStyleName("gwt-Tree"); // Add a11y role "tree" Roles.getTreeRole().set(focusable); }
DOM.setIntStyleAttribute(dialog.getElement(), "z-index", Integer.MAX_VALUE);
DOM.setIntStyleAttribute(dialog.getElement(), "z-index", Integer.MAX_VALUE);