選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

VHtml5File.java 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright 2000-2016 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.client.ui.dd;
  17. import com.google.gwt.core.client.JavaScriptObject;
  18. /**
  19. * Wrapper for html5 File object.
  20. *
  21. * @author Vaadin Ltd
  22. * @deprecated Since 8.1, will be replaced by FileDropTargetExtensionConnector
  23. * and FileDropTargetExtension,
  24. * https://github.com/vaadin/framework/issues/8891
  25. */
  26. @Deprecated
  27. public class VHtml5File extends JavaScriptObject {
  28. protected VHtml5File() {
  29. }
  30. public final native String getName()
  31. /*-{
  32. return this.name;
  33. }-*/;
  34. public final native String getType()
  35. /*-{
  36. return this.type;
  37. }-*/;
  38. /*
  39. * Browser implementations support files >2GB dropped and report the value
  40. * as long. Due to JSNI limitations this value needs to be sent as double
  41. * and then cast back to a long value.
  42. * www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html#important
  43. */
  44. public final native double getSize()
  45. /*-{
  46. return this.size ? this.size : 0;
  47. }-*/;
  48. }