/** * Returns the value of the attribute with the given name */ public String getAttribute(String name) { return JQMCommon.getAttribute(this, name); }
/** * Returns the value of the attribute with the given name */ protected String getAttribute(String name) { return JQMCommon.getAttribute(this, name); }
/** @return - true in case corners where explicitly specified with data-corners attribute */ public static boolean hasExplicitCorners(Element elt) { String s = getAttribute(elt, DATA_CORNERS); if (s == null || s.isEmpty()) return false; return true; }
private static boolean isSelected(Element elt) { if (elt == null) return false; String sel = JQMCommon.getAttribute(elt, ARIA_SELECTED); return sel != null && "true".equals(sel); }
public boolean isShadow() { String s = JQMCommon.getAttribute(this, "data-shadow"); boolean noShadow = "false".equals(s); return !noShadow; }
/** * Returns true if the select is set to render in native mode. */ @Override public boolean isNative() { // an element is native by default. So this returns true if native is not set to false. String s = JQMCommon.getAttribute(select, "data-native-menu"); if (s == null || s.isEmpty()) return true; return !"false".equals(s); }
public static boolean isCorners(Element elt) { String s = getAttribute(elt, DATA_CORNERS); if (s == null || s.isEmpty()) return true; // corners are ON by default return "true".equals(s); }
public static boolean isCorners(Element elt) { String s = getAttribute(elt, DATA_CORNERS); if (s == null || s.isEmpty()) return true; // corners are ON by default return "true".equals(s); }
public boolean isShadow() { String s = JQMCommon.getAttribute(select, "data-shadow"); if (s == null || s.isEmpty()) return true; return !"false".equals(s); }
public boolean isHidePlaceholderMenuItems() { String s = JQMCommon.getAttribute(select, "data-hide-placeholder-menu-items"); if (s == null || s.isEmpty()) return true; return !"false".equals(s); }
public boolean isShadow() { String s = JQMCommon.getAttribute(select, "data-shadow"); if (s == null || s.isEmpty()) return true; return !"false".equals(s); }
public boolean isHidePlaceholderMenuItems() { String s = JQMCommon.getAttribute(select, "data-hide-placeholder-menu-items"); if (s == null || s.isEmpty()) return true; return !"false".equals(s); }
public Integer getColumns() { String grid = JQMCommon.getAttribute(this, "data-grid"); if (grid == null || grid.isEmpty()) return null; grid = grid.trim().toLowerCase(); if ("solo".equals(grid)) return 1; else if ("a".equals(grid)) return 2; else if ("b".equals(grid)) return 3; else if ("c".equals(grid)) return 4; else if ("d".equals(grid)) return 5; else return null; }
public String getFilterSearchText() { Element elt = getFilterSearchElt(); if (elt == null) return null; return JQMCommon.getAttribute(elt, "data-lastval"); }
public static String getIconExStr(Element elt) { String s = getStyleStartsWith(elt, STYLE_UI_ICON); if (s != null && !s.isEmpty()) { s = s.substring(STYLE_UI_ICON.length()); return s; } s = getAttribute(elt, DATA_ICON); if (DataIcon.NONE.getJqmValue().equals(s)) return s; // NONE has no className, but stored in attribute return null; }
public static String getIconExStr(Element elt) { String s = getStyleStartsWith(elt, STYLE_UI_ICON); if (s != null && !s.isEmpty()) { s = s.substring(STYLE_UI_ICON.length()); return s; } s = getAttribute(elt, DATA_ICON); if (DataIcon.NONE.getJqmValue().equals(s)) return s; // NONE has no className, but stored in attribute return null; }
public boolean isIconPosNone() { if (!select.getElement().hasAttribute(JQMCommon.DATA_ICONPOS)) return false; String v = JQMCommon.getAttribute(select, JQMCommon.DATA_ICONPOS); return "".equals(v); }
public boolean isIconPosNone() { if (!select.getElement().hasAttribute(JQMCommon.DATA_ICONPOS)) return false; String v = JQMCommon.getAttribute(select, JQMCommon.DATA_ICONPOS); return "".equals(v); }
public static IconPos getIconPosEx(Element elt, String prefix) { String s = getStyleStartsWith(elt, prefix); if (s != null && !s.isEmpty()) { s = s.substring(prefix.length()); return IconPos.fromJqmValue(s); } // className is present only if STYLE_UI_ICON is defined, // so first check className and if empty then attribute return IconPos.fromJqmValue(getAttribute(elt, DATA_ICONPOS)); }
public static IconPos getIconPosEx(Element elt, String prefix) { String s = getStyleStartsWith(elt, prefix); if (s != null && !s.isEmpty()) { s = s.substring(prefix.length()); return IconPos.fromJqmValue(s); } // className is present only if STYLE_UI_ICON is defined, // so first check className and if empty then attribute return IconPos.fromJqmValue(getAttribute(elt, DATA_ICONPOS)); }