Class CmsScrollPanel

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.SimplePanel
com.google.gwt.user.client.ui.ScrollPanel
org.opencms.gwt.client.ui.CmsScrollPanel
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasScrollHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasResizeHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasHorizontalScrolling, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasScrolling, com.google.gwt.user.client.ui.HasVerticalScrolling, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.ProvidesResize, com.google.gwt.user.client.ui.RequiresResize, com.google.gwt.user.client.ui.SourcesScrollEvents, Iterable<com.google.gwt.user.client.ui.Widget>, I_CmsDescendantResizeHandler
Direct Known Subclasses:
CmsScrollPanelImpl

public class CmsScrollPanel extends com.google.gwt.user.client.ui.ScrollPanel implements com.google.gwt.event.logical.shared.HasResizeHandlers, I_CmsDescendantResizeHandler
Scroll panel implementation allowing focused scrolling.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    Inner class for the resize button.
    protected class 
    Drag and drop event preview handler.

    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
    Modifier and Type
    Field
    Description
    protected com.google.gwt.event.shared.HandlerRegistration
    The preview handler registration.

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

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Constructor.
    protected
    CmsScrollPanel(com.google.gwt.dom.client.Element root, com.google.gwt.dom.client.Element scrollabel, com.google.gwt.dom.client.Element container)
    Constructor to be used by CmsScrollPanelImpl.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gwt.event.shared.HandlerRegistration
    addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler handler)
     
    void
    enableFocusedScrolling(boolean enable)
    Enables or disables the focused scrolling feature.
    protected void
    Ensures the focused scrolling event preview handler is registered.
    protected void
     
    protected void
     
    void
    This method should be called when a descendant widget changes its size.
    boolean
    remove(com.google.gwt.user.client.ui.Widget w)
     
    void
    setDefaultHeight(double height)
    Sets the default height of the scrolling panel.
    protected void
    setNewHeight(com.google.gwt.user.client.Event event)
    Executed on mouse move while dragging.
    void
    setResizable(boolean resize)
    Sets the scrollpanel resizeable.
    protected void
    setStartParameters(com.google.gwt.event.dom.client.MouseDownEvent event)
    Sets the start parameters of the resize event.

    Methods inherited from class com.google.gwt.user.client.ui.ScrollPanel

    addScrollHandler, addScrollListener, ensureVisible, getContainerElement, getHorizontalScrollPosition, getMaximumHorizontalScrollPosition, getMaximumVerticalScrollPosition, getMinimumHorizontalScrollPosition, getMinimumVerticalScrollPosition, getScrollableElement, getScrollPosition, getVerticalScrollPosition, isTouchScrollingDisabled, onResize, removeScrollListener, scrollToBottom, scrollToLeft, scrollToRight, scrollToTop, setAlwaysShowScrollBars, setHeight, setHorizontalScrollPosition, setScrollPosition, setSize, setTouchScrollingDisabled, setVerticalScrollPosition, setWidth

    Methods inherited from class com.google.gwt.user.client.ui.SimplePanel

    add, getWidget, iterator, setWidget, setWidget

    Methods inherited from class com.google.gwt.user.client.ui.Panel

    add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove

    Methods inherited from class com.google.gwt.user.client.ui.Widget

    addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents

    Methods inherited from class com.google.gwt.user.client.ui.UIObject

    addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.gwt.event.shared.HasHandlers

    fireEvent

    Methods inherited from interface com.google.gwt.user.client.ui.IsWidget

    asWidget

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

    • m_previewHandlerRegistration

      protected com.google.gwt.event.shared.HandlerRegistration m_previewHandlerRegistration
      The preview handler registration.
  • Constructor Details

    • CmsScrollPanel

      public CmsScrollPanel()
      Constructor.

      See Also:
      • ScrollPanel()
    • CmsScrollPanel

      protected CmsScrollPanel(com.google.gwt.dom.client.Element root, com.google.gwt.dom.client.Element scrollabel, com.google.gwt.dom.client.Element container)
      Constructor to be used by CmsScrollPanelImpl.

      Parameters:
      root - the root element of the widget
      scrollabel - the scrollable element of the widget
      container - the container element of the widget
  • Method Details

    • addResizeHandler

      public com.google.gwt.event.shared.HandlerRegistration addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler handler)
      Specified by:
      addResizeHandler in interface com.google.gwt.event.logical.shared.HasResizeHandlers
      See Also:
      • HasResizeHandlers.addResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler)
    • enableFocusedScrolling

      public void enableFocusedScrolling(boolean enable)
      Enables or disables the focused scrolling feature.

      Focused scrolling is enabled by default.

      Parameters:
      enable - true to enable the focused scrolling feature
    • onResizeDescendant

      public void onResizeDescendant()
      Description copied from interface: I_CmsDescendantResizeHandler
      This method should be called when a descendant widget changes its size.

      Specified by:
      onResizeDescendant in interface I_CmsDescendantResizeHandler
      See Also:
    • remove

      public boolean remove(com.google.gwt.user.client.ui.Widget w)
      Specified by:
      remove in interface com.google.gwt.user.client.ui.HasWidgets
      Overrides:
      remove in class com.google.gwt.user.client.ui.SimplePanel
      See Also:
      • SimplePanel.remove(com.google.gwt.user.client.ui.Widget)
    • setDefaultHeight

      public void setDefaultHeight(double height)
      Sets the default height of the scrolling panel.
      Parameters:
      height - the default height
    • setResizable

      public void setResizable(boolean resize)
      Sets the scrollpanel resizeable.

      Parameters:
      resize - true if the scrollpanel should be resizeable.
    • ensureFocusedScrolling

      protected void ensureFocusedScrolling()
      Ensures the focused scrolling event preview handler is registered.

    • onAttach

      protected void onAttach()
      Overrides:
      onAttach in class com.google.gwt.user.client.ui.ScrollPanel
      See Also:
      • ScrollPanel.onAttach()
    • onDetach

      protected void onDetach()
      Overrides:
      onDetach in class com.google.gwt.user.client.ui.ScrollPanel
      See Also:
      • ScrollPanel.onDetach()
    • setNewHeight

      protected void setNewHeight(com.google.gwt.user.client.Event event)
      Executed on mouse move while dragging.

      Parameters:
      event - the event
    • setStartParameters

      protected void setStartParameters(com.google.gwt.event.dom.client.MouseDownEvent event)
      Sets the start parameters of the resize event.

      Parameters:
      event - the mouse event