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.

ComponentConnector.java 2.7KB

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