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.

ContainerResizedListener.java 1.4KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. @ITMillApache2LicenseForJavaFiles@
  3. */
  4. package com.itmill.toolkit.terminal.gwt.client;
  5. /**
  6. * ContainerResizedListener interface is useful for Widgets that support
  7. * relative sizes and who need some additional sizing logic.
  8. */
  9. public interface ContainerResizedListener {
  10. /**
  11. * This function is run when container box has been resized. Object
  12. * implementing ContainerResizedListener is responsible to call the same
  13. * function on its ancestors that implement NeedsLayout in case their
  14. * container has resized. runAnchestorsLayout(HasWidgets parent) function
  15. * from Util class may be a good helper for this.
  16. *
  17. * The width and height parameters specifies the space available for the
  18. * component (in pixels) if the parent container can or want to produce
  19. * these numbers. If the parent container does not know (has not calculated)
  20. * or cannot produce (undefined dimensions) one of these numbers -1 is
  21. * passed.
  22. *
  23. * Note that these numbers should not be considered the maximum size for the
  24. * widget if the layout has undefined dimension. In that case the currently
  25. * allocated space is passed (eg. OrderedLayout with undefined width might
  26. * pass availableWidth 100 if the widest component in the layout is 100 but
  27. * it will still stretch if another 200 pixel wide component is rendered)
  28. */
  29. public void iLayout(int availableWidth, int availableHeight);
  30. }