private void formatGridDateEx(int yyyy, int mm, int dd, String iso8601, boolean selectedDateVisible, JavaScriptObject result) { if (!(gridDateFormatter instanceof GridDateFormatterEx)) { JsUtils.setObjValue(result, "text", String.valueOf(dd)); JsUtils.setObjValue(result, "class", ""); } else { String text = gridDateFormatter.format(yyyy, mm, dd, iso8601, selectedDateVisible); String cls = ((GridDateFormatterEx) gridDateFormatter).getStyleNames( yyyy, mm, dd, iso8601, selectedDateVisible); JsUtils.setObjValue(result, "text", text); JsUtils.setObjValue(result, "class", cls); } }
/** * @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); }
String p = JsUtils.getObjValue(openOptions, "positionTo"); Double x = JsUtils.getObjDoubleValue(openOptions, "x"); Double y = JsUtils.getObjDoubleValue(openOptions, "y"); if (p != null && !p.isEmpty()) JsUtils.deleteObjProperty(openOptions, "positionTo"); } else { JsUtils.setObjValue(openOptions, "positionTo", newP); if (x != null) JsUtils.deleteObjProperty(openOptions, "x"); } else { JsUtils.setObjDoubleValue(openOptions, "x", newX); if (y != null) JsUtils.deleteObjProperty(openOptions, "y"); } else { JsUtils.setObjDoubleValue(openOptions, "y", newY);
if (hoverStyleApplied == null) { hoverStyleApplied = new ArrayList<StyleItem>(); JsArrayString keys = JsUtils.getObjKeys(hoverStyle); if (keys == null) return; for (int i = 0; i < keys.length(); i++) { String key = keys.get(i); String val = JsUtils.getObjValue(hoverStyle, key); if (val == null) continue; String prop = keys.get(i);
public static String getOrientation(JQMEvent<?> event) { if (event == null) return null; JavaScriptObject nativeEvent = event.getJQueryEvent().getNative(); String s = JsUtils.getObjValue(nativeEvent, "orientation"); return s; } }
String p = JsUtils.getObjValue(openOptions, "positionTo"); Double x = JsUtils.getObjDoubleValue(openOptions, "x"); Double y = JsUtils.getObjDoubleValue(openOptions, "y"); if (p != null && !p.isEmpty()) JsUtils.deleteObjProperty(openOptions, "positionTo"); } else { JsUtils.setObjValue(openOptions, "positionTo", newP); if (x != null) JsUtils.deleteObjProperty(openOptions, "x"); } else { JsUtils.setObjDoubleValue(openOptions, "x", newX); if (y != null) JsUtils.deleteObjProperty(openOptions, "y"); } else { JsUtils.setObjDoubleValue(openOptions, "y", newY);
if (hoverStyleApplied == null) { hoverStyleApplied = new ArrayList<StyleItem>(); JsArrayString keys = JsUtils.getObjKeys(hoverStyle); if (keys == null) return; for (int i = 0; i < keys.length(); i++) { String key = keys.get(i); String val = JsUtils.getObjValue(hoverStyle, key); if (val == null) continue; String prop = keys.get(i);
private String getRowId(JavaScriptObject rowData) { String rowId = JsUtils.getObjValue(rowData, DT_ROWID); if (Empty.is(rowId) && rowIdHelper != null) { rowId = rowIdHelper.calcRowId(this, rowData); } return rowId; }
String p = JsUtils.getObjValue(openOptions, "positionTo"); Double x = JsUtils.getObjDoubleValue(openOptions, "x"); Double y = JsUtils.getObjDoubleValue(openOptions, "y"); if (p != null && !p.isEmpty()) JsUtils.deleteObjProperty(openOptions, "positionTo"); } else { JsUtils.setObjValue(openOptions, "positionTo", newP); if (x != null) JsUtils.deleteObjProperty(openOptions, "x"); } else { JsUtils.setObjDoubleValue(openOptions, "x", newX); if (y != null) JsUtils.deleteObjProperty(openOptions, "y"); } else { JsUtils.setObjDoubleValue(openOptions, "y", newY);
if (hoverStyleApplied == null) { hoverStyleApplied = new ArrayList<StyleItem>(); JsArrayString keys = JsUtils.getObjKeys(hoverStyle); if (keys == null) return; for (int i = 0; i < keys.length(); i++) { String key = keys.get(i); String val = JsUtils.getObjValue(hoverStyle, key); if (val == null) continue; String prop = keys.get(i);
private String getRowId(JavaScriptObject rowData) { String rowId = JsUtils.getObjValue(rowData, DT_ROWID); if (Empty.is(rowId) && rowIdHelper != null) { rowId = rowIdHelper.calcRowId(this, rowData); } return rowId; }
private void formatGridDateEx(int yyyy, int mm, int dd, String iso8601, boolean selectedDateVisible, int curYear, int curMonth, JavaScriptObject result) { if (!(gridDateFormatter instanceof GridDateFormatterEx)) { JsUtils.setObjValue(result, "text", String.valueOf(dd)); JsUtils.setObjValue(result, "class", ""); } else { String text = gridDateFormatter.format(yyyy, mm, dd, iso8601, selectedDateVisible, curYear, curMonth); String cls = ((GridDateFormatterEx) gridDateFormatter).getStyleNames( yyyy, mm, dd, iso8601, selectedDateVisible, curYear, curMonth); JsUtils.setObjValue(result, "text", text); JsUtils.setObjValue(result, "class", cls); } }
/** * @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); }
public static String getOrientation(JQMEvent<?> event) { if (event == null) return null; JavaScriptObject nativeEvent = event.getJQueryEvent().getNative(); String s = JsUtils.getObjValue(nativeEvent, "orientation"); return s; } }
/** * @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); }
public static String getOrientation(JQMEvent<?> event) { if (event == null) return null; JavaScriptObject nativeEvent = event.getJQueryEvent().getNative(); String s = JsUtils.getObjValue(nativeEvent, "orientation"); return s; } }