@Override public int getDepth() { try { return Integer.parseInt(getElement().getStyle().getZIndex()); } catch (NumberFormatException ex) { return 0; } }
@Override public int getDepth() { try { return Integer.parseInt(getElement().getStyle().getZIndex()); } catch (NumberFormatException ex) { return 0; } }
public int getZIndex() { return Integer.parseInt(this.getElement().getStyle().getZIndex()); }
@Override protected void onAttach() { super.onAttach(); // Try and set the z-index. Integer zIndex = null; Widget widget = this; while (zIndex == null && widget != null) { if (!widget.getElement().getStyle().getZIndex().equals("")) { try { zIndex = Integer.valueOf(widget.getElement().getStyle().getZIndex()); zIndex += 10; } catch (Exception e) { zIndex = null; } } widget = widget.getParent(); } if (zIndex != null) { getElement().getStyle().setZIndex(zIndex); } }
@Override protected void onAttach() { super.onAttach(); // Try and set the z-index. Integer zIndex = null; Widget widget = this; while (zIndex == null && widget != null) { if (!widget.getElement().getStyle().getZIndex().equals("")) { try { zIndex = Integer.valueOf(widget.getElement().getStyle().getZIndex()); zIndex += 10; } catch (Exception e) { zIndex = null; } } widget = widget.getParent(); } if (zIndex != null) { getElement().getStyle().setZIndex(zIndex); } }
public OriginalStyleInfo(final Widget w) { absoluteLeft = w.getAbsoluteLeft(); absoluteTop = w.getAbsoluteTop(); clientHeight = w.getElement().getClientHeight(); clientWidth = w.getElement().getClientWidth(); final Style style = w.getElement().getStyle(); position = style.getPosition(); top = style.getTop(); left = style.getLeft(); width = style.getWidth(); height = style.getHeight(); zIndex = style.getZIndex(); }
public void testDepth() { // UiBinder // given T widget = getWidget(false); final int DEPTH = 999; // when / then widget.setDepth(DEPTH); assertEquals(DEPTH, widget.getDepth()); // Standard // given attachWidget(); // when / then assertEquals(String.valueOf(DEPTH), widget.getElement().getStyle().getZIndex()); }
public void testDepth() { // UiBinder // given T widget = getWidget(false); final int DEPTH = 999; // when / then widget.setDepth(DEPTH); assertEquals(DEPTH, widget.getDepth()); // Standard // given attachWidget(); // when / then assertEquals(String.valueOf(DEPTH), widget.getElement().getStyle().getZIndex()); }
public static void forceFullRepaint(){ OsDetection d = MGWT.getOsDetection(); if(d.isAndroid()){ final String zIndex = Document.get().getBody().getStyle().getZIndex(); Document.get().getBody().getStyle().setZIndex(-1); new Timer(){ @Override public void run() { Document.get().getBody().getStyle().setProperty("zIndex", zIndex); } }.schedule(50); } } }
public static void forceFullRepaint(){ OsDetection d = MGWT.getOsDetection(); if(d.isAndroid()){ final String zIndex = Document.get().getBody().getStyle().getZIndex(); Document.get().getBody().getStyle().setZIndex(-1); new Timer(){ @Override public void run() { Document.get().getBody().getStyle().setProperty("zIndex", zIndex); } }.schedule(50); } } }