/** * Programatically change the displayed page to the given {@link JQMPage} * instance. This uses the default transition which is Transition.FADE */ public static void changePage(JQMContainer container) { changePage(container, false/*dialog*/); }
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 JQMActivityManager(ActivityMapper mapper, EventBus eventBus) { super(mapper, eventBus); super.setDisplay(new JQMAwareDisplay()); // GWT will monitor the hashes for us JQMContext.disableHashListening(); // disable page hash changes JQMContext.setDefaultChangeHash(false); }
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); } }
private void prepareHoverStyle() { if (hoverStyle != null) return; String theme = getCurrentTheme(); String rule = ".ui-btn.ui-btn-" + theme + ":hover"; hoverStyle = cachedCssRules.get(rule); if (hoverStyle != null) return; String ruleIE = ".ui-btn-" + theme + ".ui-btn:hover"; // IE9 changes/rearranges css rules! hoverStyle = cachedCssRules.get(ruleIE); if (hoverStyle != null) return; JsArrayString jsStrs = JQMContext.getJsArrayString(HOVER_PROPS); JsArrayString jsRegex = JQMContext.getJsArrayString(HOVER_REGEX); hoverStyle = JQMContext.getCssForRule(rule, jsStrs, jsRegex); if (hoverStyle != null) { cachedCssRules.put(rule, hoverStyle); } else { hoverStyle = JQMContext.getCssForRule(ruleIE, jsStrs, jsRegex); if (hoverStyle != null) cachedCssRules.put(ruleIE, hoverStyle); } }
/** * Appends the given {@link JQMPage} to the DOM so that JQueryMobile is * able to manipulate it and render it. This should only be done once per * page, otherwise duplicate HTML would be added to the DOM and this would * result in elements with overlapping IDs. * */ public static void attachAndEnhance(JQMContainer container) { if (container == null) return; RootPanel p = getRootPanel(); if (p == null) return; p.add(container); enhance(container); container.setEnhanced(true); }
public static TransitionIntf<?> getDefaultDialogTransition() { String val = getDefaultDialogTransitionImpl(); TransitionIntf<?> t = defaultDialogTransition.parseJqmValue(val); return t != null ? t : Transition.POP; }
public static TransitionIntf<?> getDefaultTransition() { String val = getDefaultTransitionImpl(); TransitionIntf<?> t = defaultTransition.parseJqmValue(val); return t != null ? t : Transition.FADE; }
/** * Sets the containerId so it can be referenced by name. This can only be set once. All subsequent attempts on this * instance will result in an IllegalStateException. * @param containerId */ @Override public void setContainerId(String containerId) { if (getId() == null) { super.setContainerId(containerId); JQMContext.attachAndEnhance(this); } else if (! containerId.equals(getId())) { throw new IllegalStateException("Attempt to change JQMPage with containerId '" + getId() + "' to '" + containerId + "' failed - once set, it cannot be changed."); } }
/** * Appends the given {@link JQMPage} to the DOM so that JQueryMobile is * able to manipulate it and render it. This should only be done once per * page, otherwise duplicate HTML would be added to the DOM and this would * result in elements with overlapping IDs. * */ public static void attachAndEnhance(JQMContainer container) { if (container == null) return; RootPanel p = RootPanel.get(); if (p == null) return; p.add(container); enhance(container); container.setEnhanced(true); }
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 JQMActivityManager(ActivityMapper mapper, EventBus eventBus) { super(mapper, eventBus); super.setDisplay(new JQMAwareDisplay()); // GWT will monitor the hashes for us JQMContext.disableHashListening(); // disable page hash changes JQMContext.setDefaultChangeHash(false); }
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); } }
private void prepareHoverStyle() { if (hoverStyle != null) return; String theme = getCurrentTheme(); String rule = ".ui-btn.ui-btn-" + theme + ":hover"; hoverStyle = cachedCssRules.get(rule); if (hoverStyle != null) return; String ruleIE = ".ui-btn-" + theme + ".ui-btn:hover"; // IE9 changes/rearranges css rules! hoverStyle = cachedCssRules.get(ruleIE); if (hoverStyle != null) return; JsArrayString jsStrs = JQMContext.getJsArrayString(HOVER_PROPS); JsArrayString jsRegex = JQMContext.getJsArrayString(HOVER_REGEX); hoverStyle = JQMContext.getCssForRule(rule, jsStrs, jsRegex); if (hoverStyle != null) { cachedCssRules.put(rule, hoverStyle); } else { hoverStyle = JQMContext.getCssForRule(ruleIE, jsStrs, jsRegex); if (hoverStyle != null) cachedCssRules.put(ruleIE, hoverStyle); } }
public static TransitionIntf<?> getDefaultDialogTransition() { String val = getDefaultDialogTransitionImpl(); TransitionIntf<?> t = defaultDialogTransition.parseJqmValue(val); return t != null ? t : Transition.POP; }
public static TransitionIntf<?> getDefaultTransition() { String val = getDefaultTransitionImpl(); TransitionIntf<?> t = defaultTransition.parseJqmValue(val); return t != null ? t : Transition.FADE; }
/** * Sets the containerId so it can be referenced by name. This can only be set once. All subsequent attempts on this * instance will result in an IllegalStateException. * @param containerId */ @Override public void setContainerId(String containerId) { if (getId() == null) { super.setContainerId(containerId); JQMContext.attachAndEnhance(this); } else if (! containerId.equals(getId())) { throw new IllegalStateException("Attempt to change JQMPage with containerId '" + getId() + "' to '" + containerId + "' failed - once set, it cannot be changed."); } }
/** * Appends the given {@link JQMPage} to the DOM so that JQueryMobile is * able to manipulate it and render it. This should only be done once per * page, otherwise duplicate HTML would be added to the DOM and this would * result in elements with overlapping IDs. * */ public static void attachAndEnhance(JQMContainer container) { if (container == null) return; RootPanel p = RootPanel.get(); if (p == null) return; p.add(container); enhance(container); container.setEnhanced(true); }
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); }
/** * Programatically change the displayed page to the given {@link JQMPage} * instance. This uses the default transition which is Transition.FADE */ public static void changePage(JQMContainer container) { changePage(container, false/*dialog*/); }