You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VPaintableWidget.java 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client;
  5. import com.google.gwt.user.client.ui.Widget;
  6. import com.vaadin.terminal.gwt.client.MeasureManager.MeasuredSize;
  7. /**
  8. * An interface used by client-side widgets or paintable parts to receive
  9. * updates from the corresponding server-side components in the form of
  10. * {@link UIDL}.
  11. *
  12. * Updates can be sent back to the server using the
  13. * {@link ApplicationConnection#updateVariable()} methods.
  14. */
  15. public interface VPaintableWidget extends VPaintable {
  16. /**
  17. * TODO: Rename to getWidget
  18. */
  19. public Widget getWidgetForPaintable();
  20. /**
  21. * Returns the parent {@link VPaintableWidgetContainer}
  22. *
  23. * @return
  24. */
  25. // FIXME: Rename to getParent()
  26. public VPaintableWidgetContainer getParent();
  27. public MeasuredSize getMeasuredSize();
  28. /**
  29. * Returns <code>true</code> if the width of this paintable is currently
  30. * undefined. If the width is undefined, the actual width of the paintable
  31. * is defined by its contents.
  32. *
  33. * @return <code>true</code> if the width is undefined, else
  34. * <code>false</code>
  35. */
  36. public boolean isUndefinedWidth();
  37. /**
  38. * Returns <code>true</code> if the height of this paintable is currently
  39. * undefined. If the height is undefined, the actual height of the paintable
  40. * is defined by its contents.
  41. *
  42. * @return <code>true</code> if the height is undefined, else
  43. * <code>false</code>
  44. */
  45. public boolean isUndefinedHeight();
  46. /**
  47. * Returns <code>true</code> if the width of this paintable is currently
  48. * relative. If the width is relative, the actual width of the paintable is
  49. * a percentage of the size allocated to it by its parent.
  50. *
  51. * @return <code>true</code> if the width is undefined, else
  52. * <code>false</code>
  53. */
  54. public boolean isRelativeWidth();
  55. /**
  56. * Returns <code>true</code> if the height of this paintable is currently
  57. * relative. If the height is relative, the actual height of the paintable
  58. * is a percentage of the size allocated to it by its parent.
  59. *
  60. * @return <code>true</code> if the width is undefined, else
  61. * <code>false</code>
  62. */
  63. public boolean isRelativeHeight();
  64. /**
  65. * Gets the width of this paintable as defined on the server.
  66. *
  67. * @return the server side width definition
  68. */
  69. public String getDefinedWidth();
  70. /**
  71. * Gets the height of this paintable as defined on the server.
  72. *
  73. * @return the server side height definition
  74. */
  75. public String getDefinedHeight();
  76. }