public void openDialog() { TransitionIntf<?> t = this.getTransition(); if (t == null) t = JQMContext.getDefaultDialogTransition(); //Element actPg = Mobile.getActivePage(); if (JQMCommon.isDataDialog(getElement())) { // we don't need to forcefully pass "dialog=true" in that case JQMContext.changePage(this, t); } else { JQMContext.changePage(this, true/*dialog*/, t); } }
/** * Defines content band's height as percent of available content area's height. */ public void setContentHeightPercent(double contentHeightPercent) { double oldVal = this.contentHeightPercent; this.contentHeightPercent = contentHeightPercent; if (oldVal != this.contentHeightPercent && content != null && content.isAttached()) { recalcContentHeightPercent(); centerContent(); initWindowResize(); } }
@Override protected void onLoad() { super.onLoad(); bindLifecycleEvents(this, getElement()); }
public static void changePage(JQMContainer container, boolean dialog) { TransitionIntf<?> t = container.getTransition(); if (t == null) { t = dialog || JQMCommon.isDataDialog(container.getElement()) ? getDefaultDialogTransition() : getDefaultTransition(); } changePage(container, dialog, t); }
/** * @param prevPage - DOM element that we are transitioning away from. * Could be null when the first page is transitioned in during application startup. */ protected void doPageBeforeShow(Element prevPage) { onPageBeforeShow(); JQMPageEvent.fire(this, PageState.BEFORE_SHOW, findPage(prevPage), this); if (isDialog()) { isDlgCloseable = true; prepareTransparentPrevPage(prevPage); } }
/** * @param positionTo - jQuery selector for finding element (must be visible) */ public static EltCoords calcEltCoords(String positionTo) { JavaScriptObject o = jsCalcEltCoords(positionTo); if (o == null) return null; Double left = JsUtils.getObjDoubleValue(o, "left"); Double top = JsUtils.getObjDoubleValue(o, "top"); Double width = JsUtils.getObjDoubleValue(o, "width"); Double height = JsUtils.getObjDoubleValue(o, "height"); return new EltCoords(left, top, width, height); }
/** * There is no "correct" way to restore dialog after it was called as page, * so this method is ugly hack, but it's useful and working. */ public void restoreRoleDialog() { JQMCommon.setDataRole(this, Mobile.DATA_ROLE_DIALOG); internRestoreDialog(getElement()); }
/** * Removes the footer element set on this page. If no footer is set then * this has no effect. */ public void removeFooter() { if (footer != null) { removeLogical(footer.getFooterStage()); footer = null; removeToolBar("footer"); } }
/** * Creates a content container on this page and returns it. Content can * then be added to this secondary container. There is no limit to the * number of secondary content containers that can be created. */ public JQMContent createContent() { JQMContent content = new JQMContent(); Element elt = getElement(); add(content, elt); return content; }
/** * See <a href="http://api.jquerymobile.com/filterable/#option-children">Filterable Children</a> */ public void setFilterChildren(String filterChildren) { JQMCommon.setFilterChildren(getDataFilterWidget(), filterChildren); }
@Override public void setContainerId(String containerId) { super.setContainerId(containerId); removeAttribute("data-url"); }
public static DataIcon getIconEx(Element elt) { String s = getIconExStr(elt); DataIcon icon = DataIcon.fromJqmValue(s); return icon; }
public String getFilterSearchText() { Element elt = getFilterSearchElt(); if (elt == null) return null; return JQMCommon.getAttribute(elt, "data-lastval"); }
/** * Invokes the $.mobile.changePage method */ static void changePage(String url, TransitionIntf<?> t, boolean reverse, boolean changeHash, boolean dialog) { changePage(url, t.getJqmValue(), reverse, changeHash, dialog ? DATA_ROLE_DIALOG : null); }
public static void changePage(JQMContainer container, boolean dialog) { TransitionIntf<?> t = container.getTransition(); if (t == null) { t = dialog || JQMCommon.isDataDialog(container.getElement()) ? getDefaultDialogTransition() : getDefaultTransition(); } changePage(container, dialog, t); }
public void openDialog() { TransitionIntf<?> t = this.getTransition(); if (t == null) t = JQMContext.getDefaultDialogTransition(); //Element actPg = Mobile.getActivePage(); if (JQMCommon.isDataDialog(getElement())) { // we don't need to forcefully pass "dialog=true" in that case JQMContext.changePage(this, t); } else { JQMContext.changePage(this, true/*dialog*/, t); } }
/** * @param positionTo - jQuery selector for finding element (must be visible) */ public static EltCoords calcEltCoords(String positionTo) { JavaScriptObject o = jsCalcEltCoords(positionTo); if (o == null) return null; Double left = JsUtils.getObjDoubleValue(o, "left"); Double top = JsUtils.getObjDoubleValue(o, "top"); Double width = JsUtils.getObjDoubleValue(o, "width"); Double height = JsUtils.getObjDoubleValue(o, "height"); return new EltCoords(left, top, width, height); }
/** * See <a href="http://api.jquerymobile.com/filterable/#option-children">Filterable Children</a> */ public void setFilterChildren(String filterChildren) { JQMCommon.setFilterChildren(getDataFilterWidget(), filterChildren); }
public static void changePage(JQMContainer container, boolean dialog) { TransitionIntf<?> t = container.getTransition(); if (t == null) { t = dialog || JQMCommon.isDataDialog(container.getElement()) ? getDefaultDialogTransition() : getDefaultTransition(); } changePage(container, dialog, t); }
public void openDialog() { TransitionIntf<?> t = this.getTransition(); if (t == null) t = JQMContext.getDefaultDialogTransition(); //Element actPg = Mobile.getActivePage(); if (JQMCommon.isDataDialog(getElement())) { // we don't need to forcefully pass "dialog=true" in that case JQMContext.changePage(this, t); } else { JQMContext.changePage(this, true/*dialog*/, t); } }