Tabnine Logo
JsArrayMixed
Code IndexAdd Tabnine to your IDE (free)

How to use
JsArrayMixed
in
com.google.gwt.core.client

Best Java code snippets using com.google.gwt.core.client.JsArrayMixed (Showing top 20 results out of 315)

origin: com.google.gwt/gwt-servlet

/**
 * 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);
}-*/;
origin: com.googlecode.gwtquery/gwtquery

@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;
}
origin: com.googlecode.gwtquery/gwtquery

/**
 * Execute a function around each object.
 */
public static void each(JsArrayMixed objects, Function f) {
 for (int i = 0, l = objects.length(); i < l; i++) {
  f.f(i, objects.getObject(i));
 }
}
origin: geosdi/GWT-OpenLayers

/**
 * 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;
  }
}
origin: nmorel/gflot

  public final Gradient getTo()
  {
    return getArray( FILL_COLOR_COLORS_KEY ).getObject( 1 );
  }
}
origin: geosdi/GWT-OpenLayers

/**
 * Get the maximum zoomlevel for this layer.
 *
 * @return maximum zoomlevel
 */
public int getMaxZoomLevel() {
  return getMinZoomLevel() + LayerImpl.getResolutions(this.getJSObject()).length() - 1;
}
origin: org.dashbuilder/dashbuilder-lienzo-core

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;
}
origin: com.googlecode.gwtquery/gwtquery

/**
 * 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());
}
origin: nmorel/gflot

public final Gradient getFrom()
{
  return getArray( FILL_COLOR_COLORS_KEY ).getObject( 0 );
}
origin: com.ahome-it/lienzo-tests

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();
}
origin: net.wetheinter/gwt-user

/**
 * 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);
}-*/;
origin: org.kie/lienzo-tests

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();
}
origin: com.vaadin.external.gwt/gwt-user

/**
 * 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);
}-*/;
origin: ahome-it/lienzo-core

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();
}
origin: com.ahome-it/lienzo-core

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();
}
origin: com.rht-emitrom/lienzo-core

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();
}
origin: org.dashbuilder/dashbuilder-lienzo-core

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();
}
origin: ahome-it/lienzo-core

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();
}
origin: com.googlecode.gwtquery/gwtquery

for (String k : prop.keys()) {
 String ky = k.matches("\\d+") ? k : "\"" + k + "\"";
 JsCache o = prop.getArray(k).cast();
 if (o != null) {
  ret += ky + ":[";
origin: com.googlecode.gwtquery/gwtquery

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++) {
com.google.gwt.core.clientJsArrayMixed

Javadoc

A simple wrapper around an heterogeneous native array of values. This class may not be directly instantiated, and can only be returned from a native method. For example, native JsArrayMixed getNativeArray() /*-{ return [ { x: 0, y: 1}, "apple", 12345, ]; }-* /;

Most used methods

  • cast
  • join
  • getObject
    Gets the JavaScriptObject at a given index.
  • length
    Gets the length of the array.
  • getNumber
    Gets the double at a given index.
  • push
    Pushes the given boolean onto the end of the array.
  • set
    Sets the boolean value at a given index. If the index is out of bounds, the value will still be set.

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JComboBox (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now