code: public static String[] getFormats() {
  
          JsArrayString tempArr = nativeGetFormats();
          if ((tempArr == null) || (tempArr.length() == 0)) {
              return null;
          }
          String[] result = new String[tempArr.length()];
          for (int i = 0; i < tempArr.length(); i++) {
              result[i] = tempArr.get(i);
          }
          return result;
      }
docs: Returns the available image formats for gallery widget mode.<p>
  
  @return the available image formats