List of usage examples for com.google.gwt.dom.client Style getTop
public String getTop()
From source file:com.bearsoft.gwt.ui.containers.window.WindowPanel.java
private void snapshotMetrics() throws NumberFormatException { // measurement Style targetStyle = getWidget().getElement().getStyle(); // content String sHeight = targetStyle.getHeight(); contentHeightToRestore = Double.parseDouble(sHeight.substring(0, sHeight.length() - 2)); String sWidth = targetStyle.getWidth(); contentWidthToRestore = Double.parseDouble(sWidth.substring(0, sWidth.length() - 2)); targetStyle = getMovableTarget().getElement().getStyle(); // window String sLeft = targetStyle.getLeft(); leftToRestore = Double.parseDouble(sLeft.substring(0, sLeft.length() - 2)); String sTop = targetStyle.getTop(); topToRestore = Double.parseDouble(sTop.substring(0, sTop.length() - 2)); }
From source file:com.gwtmobile.ui.client.widgets.ScrollPanel.java
License:Apache License
private int getStyleTop() { Style style = getWidget().getElement().getStyle(); String top = style.getTop(); if (top.isEmpty()) { return 0; } else {// www .j a v a 2 s . c o m return Integer.parseInt(top.replace("px", "")); } }
From source file:com.nubotech.client.ui.ScrollToCommand.java
License:Apache License
public ScrollToCommand(View view) { this.view = view; Style style = view.content_panel.getContents().getElement().getStyle(); String top_str = (style.getTop().length() == 0 ? "0" : style.getTop()); yPos = (int) Utils.parseDouble(top_str); }
From source file:de.swm.commons.mobile.client.widgets.scroll.ScrollPanel.java
License:Apache License
/** * Returns the top style//from w ww . j av a2s . c om * * @return the top style in px */ private int getStyleTop() { Style style = getWidget().getElement().getStyle(); String top = style.getTop(); if (top.isEmpty()) { return 0; } else { return Integer.parseInt(top.replace("px", "")); } }
From source file:next.i.util.FxUtil.java
License:Apache License
public static double getStyleTop(Widget w) { Style style = w.getElement().getStyle(); String top = style.getTop(); if (top.isEmpty()) { return 0; } else {/*from w w w .j a v a2 s. c o m*/ return Double.parseDouble(top.replace("px", "")); } }
From source file:nz.co.doltech.gwt.sdm.ui.SuperDevModeUI.java
License:Apache License
/** * Show the SuperDevModeUI message panel. * @param content the content to display. *//*from w w w . j a va 2 s.c o m*/ public void showMessagePanel(AbsolutePanel content) { PopupPanel popupPanel = new PopupPanel(true); popupPanel.addStyleName(resources.style().errorPanel()); popupPanel.add(content); popupPanel.setAnimationEnabled(true); popupPanel.setGlassEnabled(true); sdmPanel.add(popupPanel); popupPanel.center(); Style popupStyle = popupPanel.getElement().getStyle(); double top = StyleUtil.getMeasurementValue(popupStyle.getTop()); Unit unit = StyleUtil.getMeasurementUnit(popupStyle.getTop()); popupStyle.setTop(top - 75, unit); popupPanel.show(); }