/** * Useful for complex buttons, for example buttons with vertically centered text. **/ public void setHtml(String html) { Element e = getElement(); e.setInnerHTML(html); }
private void removeHoverStyle() { if (hoverStyleApplied != null) { Style st = getElement().getStyle(); for (StyleItem item : hoverStyleApplied) { st.setProperty(item.property, item.oldValue); } } hoverStyleApplied = null; hoverStyle = null; }
/** * Sets the transition to be used by this button when loading the URL. */ @Override public void setTransition(Transition transition) { JQMCommon.setTransition(getElement(), transition); }
private void removeHoverStyle() { if (hoverStyleApplied != null) { Style st = getElement().getStyle(); for (StyleItem item : hoverStyleApplied) { st.setProperty(item.property, item.oldValue); } } hoverStyleApplied = null; hoverStyle = null; }
private static native void refresh(Element elt) /*-{ if ($wnd.$ === undefined || $wnd.$ === null) return; // jQuery is not loaded var w = $wnd.$(elt); if (w.data('mobile-button') !== undefined) { w.button('refresh'); } }-*/;
private void removeHoverStyle() { if (hoverStyleApplied != null) { Style st = getElement().getStyle(); for (StyleItem item : hoverStyleApplied) { st.setProperty(item.property, item.oldValue); } } hoverStyleApplied = null; hoverStyle = null; }
private static native void refresh(Element elt) /*-{ if ($wnd.$ === undefined || $wnd.$ === null) return; // jQuery is not loaded var w = $wnd.$(elt); if (w.data('mobile-button') !== undefined) { w.button('refresh'); } }-*/;
/** * Useful for complex buttons, for example buttons with vertically centered text. **/ public void setHtml(String html) { Element e = getElement(); e.setInnerHTML(html); }
/** * Sets the icon used by this button. See {@link DataIcon}. */ @Override public void setBuiltInIcon(DataIcon icon) { JQMCommon.setIconEx(this, icon); JQMCommon.invalidateIconPosEx(getElement(), JQMCommon.STYLE_UI_BTN_ICONPOS); }
/** * Sets the icon used by this button. See {@link DataIcon}. */ @Override public void setBuiltInIcon(DataIcon icon) { JQMCommon.setIconEx(this, icon); JQMCommon.invalidateIconPosEx(getElement(), JQMCommon.STYLE_UI_BTN_ICONPOS); }
@Override public void setIconURL(String src) { Element elt = getElement(); JQMCommon.setIconEx(elt, src); JQMCommon.invalidateIconPosEx(elt, JQMCommon.STYLE_UI_BTN_ICONPOS); }
@Override public void setIconURL(String src) { Element elt = getElement(); JQMCommon.setIconEx(elt, src); JQMCommon.invalidateIconPosEx(elt, JQMCommon.STYLE_UI_BTN_ICONPOS); }
/** * Restore the button's active state each time the page is shown while it exists in the DOM. */ @UiChild(limit = 1, tagname = "buttonActivePersist") public void addActivePersist(final JQMButton button) { if (button == null) return; addActive(button); button.getElement().addClassName("ui-state-persist"); }
/** * Restore the button's active state each time the page is shown while it exists in the DOM. */ @UiChild(limit = 1, tagname = "buttonActivePersist") public void addActivePersist(final JQMButton button) { if (button == null) return; addActive(button); button.getElement().addClassName("ui-state-persist"); }
/** * Restore the button's active state each time the page is shown while it exists in the DOM. */ @UiChild(limit = 1, tagname = "buttonActivePersist") public void addActivePersist(final JQMButton button) { if (button == null) return; addActive(button); button.getElement().addClassName("ui-state-persist"); }
private String getCurrentTheme() { String s = getTheme(); if (s != null && !s.isEmpty()) return s; Element elt = getElement().getParentElement(); while (elt != null) { s = getCurrentTheme(elt); if (s != null) return s; elt = elt.getParentElement(); } return "a"; // just meaningful default value }
private String getCurrentTheme() { String s = getTheme(); if (s != null && !s.isEmpty()) return s; Element elt = getElement().getParentElement(); while (elt != null) { s = getCurrentTheme(elt); if (s != null) return s; elt = elt.getParentElement(); } return "a"; // just meaningful default value }
protected JQMButton(Widget widget) { initWidget(widget); setStyleName("jqm4gwt-button"); initEltAsButton(getElement()); setId(); }
protected JQMButton(Widget widget) { initWidget(widget); setStyleName("jqm4gwt-button"); initEltAsButton(getElement()); setId(); }
private static LIElement getBtnLi(JQMButton btn) { Element elt = btn.getElement().getParentElement(); while (elt != null) { if (LIElement.is(elt)) { return elt.cast(); } elt = elt.getParentElement(); } return null; }