public static void setStyleIcon(Element elt, String icon) { if (icon == null || icon.isEmpty()) { removeStylesStartsWith(elt, STYLE_UI_ICON); return; } String s = STYLE_UI_ICON + icon; if (hasStyle(elt, s)) return; removeStylesStartsWith(elt, STYLE_UI_ICON); elt.addClassName(s); }
public static void setStyleIcon(Element elt, String icon) { if (icon == null || icon.isEmpty()) { removeStylesStartsWith(elt, STYLE_UI_ICON); return; } String s = STYLE_UI_ICON + icon; if (hasStyle(elt, s)) return; removeStylesStartsWith(elt, STYLE_UI_ICON); elt.addClassName(s); }
public static void setStyleIcon(Element elt, String icon) { if (icon == null || icon.isEmpty()) { removeStylesStartsWith(elt, STYLE_UI_ICON); return; } String s = STYLE_UI_ICON + icon; if (hasStyle(elt, s)) return; removeStylesStartsWith(elt, STYLE_UI_ICON); elt.addClassName(s); }
private void checkColClsNamesDependants() { if (colClsNames == null || colClsNames.isEmpty()) { if (colClsNamesHead != null) colClsNamesHead.clear(); if (colClsNamesBody != null) colClsNamesBody.clear(); return; } if (colClsNamesHead == null || colClsNamesHead.isEmpty()) { if (colClsNamesHead == null) colClsNamesHead = new HashMap<>(colClsNames.size()); for (Entry<Integer, String> i : colClsNames.entrySet()) { String s = i.getValue(); s = JQMCommon.removeStylesStartsWith(s, ColumnStyleClass.JQM_BODY_ONLY_PREFIX); colClsNamesHead.put(i.getKey(), s); } } if (colClsNamesBody == null || colClsNamesBody.isEmpty()) { if (colClsNamesBody == null) colClsNamesBody = new HashMap<>(colClsNames.size()); for (Entry<Integer, String> i : colClsNames.entrySet()) { String s = i.getValue(); s = JQMCommon.removeStylesStartsWith(s, ColumnStyleClass.JQM_HEAD_ONLY_PREFIX); colClsNamesBody.put(i.getKey(), s); } } }
private static void setEltHeaderTheme(Element elt, String value) { if (elt == null) return; String s = getEltHeaderTheme(elt); String newTheme = value != null && !value.isEmpty() ? JQMCommon.STYLE_UI_BAR + value : null; if (s == newTheme || s != null && s.equals(newTheme)) return; JQMCommon.removeStylesStartsWith(elt, JQMCommon.STYLE_UI_BAR); if (newTheme != null) elt.addClassName(newTheme); }
private static void setEltHeaderTheme(Element elt, String value) { if (elt == null) return; String s = getEltHeaderTheme(elt); String newTheme = value != null && !value.isEmpty() ? JQMCommon.STYLE_UI_BAR + value : null; if (s == newTheme || s != null && s.equals(newTheme)) return; JQMCommon.removeStylesStartsWith(elt, JQMCommon.STYLE_UI_BAR); if (newTheme != null) elt.addClassName(newTheme); }
private static void setEltHeaderTheme(Element elt, String value) { if (elt == null) return; String s = getEltHeaderTheme(elt); String newTheme = value != null && !value.isEmpty() ? JQMCommon.STYLE_UI_BAR + value : null; if (s == newTheme || s != null && s.equals(newTheme)) return; JQMCommon.removeStylesStartsWith(elt, JQMCommon.STYLE_UI_BAR); if (newTheme != null) elt.addClassName(newTheme); }
public void setBackgroundTheme(String value) { String s = getBackgroundTheme(); String newTheme = value != null && !value.isEmpty() ? JQMCommon.STYLE_UI_BODY + value : null; if (s == newTheme || s != null && s.equals(newTheme)) return; JQMCommon.removeStylesStartsWith(this.getElement(), JQMCommon.STYLE_UI_BODY); if (newTheme != null) this.getElement().addClassName(newTheme); }
public static void removeStylesStartsWith(Element elt, String startsWith) { if (elt == null || startsWith == null || startsWith.isEmpty()) return; String oldStyles = elt.getPropertyString("className"); String newStyles = removeStylesStartsWith(oldStyles, startsWith); if (!StrUtils.equals(oldStyles, newStyles)) { elt.setPropertyString("className", newStyles); } }
public void setBackgroundTheme(String value) { String s = getBackgroundTheme(); String newTheme = value != null && !value.isEmpty() ? JQMCommon.STYLE_UI_BODY + value : null; if (s == newTheme || s != null && s.equals(newTheme)) return; JQMCommon.removeStylesStartsWith(this.getElement(), JQMCommon.STYLE_UI_BODY); if (newTheme != null) this.getElement().addClassName(newTheme); }
public void setBackgroundTheme(String value) { String s = getBackgroundTheme(); String newTheme = value != null && !value.isEmpty() ? JQMCommon.STYLE_UI_BODY + value : null; if (s == newTheme || s != null && s.equals(newTheme)) return; JQMCommon.removeStylesStartsWith(this.getElement(), JQMCommon.STYLE_UI_BODY); if (newTheme != null) this.getElement().addClassName(newTheme); }