/** * Convert each element of the array to a String and join them with a comma * separator. The value returned from this method may vary between browsers * based on how JavaScript values are converted into strings. */ public final native String join(String separator) /*-{ return this.join(separator); }-*/;
@SuppressWarnings("unchecked") protected <T> T[] getArrayBase(String n, T[] r, Class<T> clazz) { JsObjectArray<?> a = p.getArray(n).cast(); int l = r.length; for (int i = 0; i < l; i++) { Object w = a.get(i); Class<?> c = w.getClass(); do { if (c.equals(clazz)) { r[i] = (T) w; break; } c = c.getSuperclass(); } while (c != null); } return r; }
/** * Gets the contents of the given {@link JsArrayMixed} as a double array. * * @param o {@link JsArrayMixed} * @return double[] if the array is not null, else null */ private static double[] getDoubleArray(JsArrayMixed o) { if (o != null) { double[] a = new double[o.length()]; for (int i = 0; i < o.length(); i++) { a[i] = o.getNumber(i); } return a; } else { return null; } }
public final Gradient getTo() { return getArray( FILL_COLOR_COLORS_KEY ).getObject( 1 ); } }
/** * Get the maximum zoomlevel for this layer. * * @return maximum zoomlevel */ public int getMaxZoomLevel() { return getMinZoomLevel() + LayerImpl.getResolutions(this.getJSObject()).length() - 1; }
public final MetaDataArray getMetaDataArray(String name) { if (m_jso.typeOf(name) == NativeInternalType.ARRAY) { MetaDataArrayJSO jso = m_jso.getArray(name).cast(); return new MetaDataArray(jso); } return null; }
/** * Wrap a GQuery around an existing javascript element, event, node, nodelist, function or array. */ public static GQuery $(JavaScriptObject jso) { if (jso == null) { return $(); } // Execute a native javascript function like jquery does if (JsUtils.isFunction(jso)) { new JsUtils.JsFunction(jso).fe(); return $(); } // Wraps a native array like jquery does if (!JsUtils.isWindow(jso) && !JsUtils.isElement(jso) && JsUtils.isArray(jso)) { JsArrayMixed c = jso.cast(); JsNodeArray elms = JsNodeArray.create(); for (int i = 0; i < c.length(); i++) { Object obj = c.getObject(i); if (obj instanceof Node) { elms.addNode((Node) obj); } } return $(elms); } return JsUtils.isWindow(jso) ? $(jso.<Element> cast()) : JsUtils.isElement(jso) ? $(jso.<Element> cast()) : JsUtils.isEvent(jso) ? $(jso.<Event> cast()) : JsUtils.isNodeList(jso) ? $(jso.<NodeList<Element>> cast()) : $(jso.<Element> cast()); }
public final Gradient getFrom() { return getArray( FILL_COLOR_COLORS_KEY ).getObject( 0 ); }
public final DashArray getDashArray() { final JsArrayMixed dash = getArray(Attribute.DASH_ARRAY.getProperty()); if (null != dash) { final NFastDoubleArrayJSO djso = dash.cast(); return new DashArray(djso); } return new DashArray(); }
/** * Convert each element of the array to a String and join them with a comma * separator. The value returned from this method may vary between browsers * based on how JavaScript values are converted into strings. */ public final native String join(String separator) /*-{ return this.join(separator); }-*/;
public final DashArray getDashArray() { final JsArrayMixed dash = getArray(Attribute.DASH_ARRAY.getProperty()); if (null != dash) { final NFastDoubleArrayJSO djso = dash.cast(); return new DashArray(djso); } return new DashArray(); }
/** * Convert each element of the array to a String and join them with a comma * separator. The value returned from this method may vary between browsers * based on how JavaScript values are converted into strings. */ public final native String join(String separator) /*-{ return this.join(separator); }-*/;
public final DashArray getDashArray() { final JsArrayMixed dash = getArray(Attribute.DASH_ARRAY.getProperty()); if (null != dash) { final NFastDoubleArrayJSO djso = dash.cast(); return new DashArray(djso); } return new DashArray(); }
public final DashArray getDashArray() { final JsArrayMixed dash = getArray(Attribute.DASH_ARRAY.getProperty()); if (null != dash) { final NFastDoubleArrayJSO djso = dash.cast(); return new DashArray(djso); } return new DashArray(); }
public final DashArray getDashArray() { JsArrayMixed dash = getArray(Attribute.DASH_ARRAY.getProperty()); if (null != dash) { DashArrayJSO djso = dash.cast(); return new DashArray(djso); } return new DashArray(); }
public final DashArray getDashArray() { JsArrayMixed dash = getArray(Attribute.DASH_ARRAY.getProperty()); if (null != dash) { NFastDoubleArrayJSO djso = dash.cast(); return new DashArray(djso); } return new DashArray(); }
public final DashArray getDashArray() { final JsArrayMixed dash = getArray(Attribute.DASH_ARRAY.getProperty()); if (null != dash) { final NFastDoubleArrayJSO djso = dash.cast(); return new DashArray(djso); } return new DashArray(); }
for (String k : prop.keys()) { String ky = k.matches("\\d+") ? k : "\"" + k + "\""; JsCache o = prop.getArray(k).cast(); if (o != null) { ret += ky + ":[";
for (String k : prop.keys()) { ret += ret.isEmpty() ? "" : "&"; JsCache o = prop.getArray(k).cast(); if (o != null) { for (int i = 0, l = o.length(); i < l; i++) {