Class ResizeInterceptor

  • All Implemented Interfaces:
    com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.RequiresResize, Iterable<com.google.gwt.user.client.ui.Widget>

    public class ResizeInterceptor
    extends com.google.gwt.user.client.ui.Composite
    implements com.google.gwt.user.client.ui.RequiresResize, com.google.gwt.user.client.ui.HasWidgets

    Simple wrapper widget that can be used between a ProvidesResize widget (such as a ScrollPanel or LayoutPanel) and other widgets in a Composite panel to allow you to get notifications when it is resized.

    Implements HasWidgets so it can contain any number of child widgets (can be used as a replacement for a FlowPanel).

    A use case would be where you have a Composite panel containing a SplitLayoutPanel which in turn contains a ScrollPanel containing some elements which you need to base manual positioning logic on. You can then place this ResizeInterceptor inside the ScrollPanel, set a listener implementation on it using setListener(Listener), and implement your repositioning logic in the ResizeInterceptor.Listener.onResize() method.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  ResizeInterceptor.Listener  
      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
      • Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

        com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
    • Field Summary

      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(com.google.gwt.user.client.ui.Widget w)  
      void clear()  
      Iterator<com.google.gwt.user.client.ui.Widget> iterator()  
      void onResize()  
      boolean remove​(com.google.gwt.user.client.ui.Widget w)  
      void setListener​(ResizeInterceptor.Listener listener)  
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, initializeClaimedElement, isAttached, onBrowserEvent, render, render
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, fireEvent, getLayoutData, getParent, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class com.google.gwt.user.client.ui.UIObject

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
    • Constructor Detail

      • ResizeInterceptor

        public ResizeInterceptor()
    • Method Detail

      • onResize

        public void onResize()
        Specified by:
        onResize in interface com.google.gwt.user.client.ui.RequiresResize
      • add

        public void add​(com.google.gwt.user.client.ui.Widget w)
        Specified by:
        add in interface com.google.gwt.user.client.ui.HasWidgets
      • clear

        public void clear()
        Specified by:
        clear in interface com.google.gwt.user.client.ui.HasWidgets
      • iterator

        public Iterator<com.google.gwt.user.client.ui.Widget> iterator()
        Specified by:
        iterator in interface com.google.gwt.user.client.ui.HasWidgets
        Specified by:
        iterator in interface Iterable<com.google.gwt.user.client.ui.Widget>
      • remove

        public boolean remove​(com.google.gwt.user.client.ui.Widget w)
        Specified by:
        remove in interface com.google.gwt.user.client.ui.HasWidgets