public abstract class ScrollContainer<O extends OutputManager<?>> extends AbstractContainer<O> implements WidgetWithConfig<BaseConfig>, ScrollableWidget<O>, ScrollPublisher
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
protected BaseConfig |
config
The widget config.
|
private java.util.ArrayList<ScrollListener> |
scrollListeners
Storage for listeners.
|
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
ScrollContainer()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addScrollListener(ScrollListener listener)
Add scroll listener.
|
void |
afterConfigUpdate(BaseConfig beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
BaseConfig |
config()
Get container configuration.
|
NativeDimension |
getScrollStep()
Returns the dimension of the base scroll step desired by the widget
in the X and Y directions.
|
Viewport<O> |
getViewport()
Returns the viewport reference.
|
void |
initialize(WidgetId id,
BaseConfig cfg)
Replacement API for the logic which should exist in the widget's c'tor, but the logic
can't be executed as it depends on the widget being registered into the official registry.
|
boolean |
isScrollPopupSupported()
Check if this widget that supports scrolling also supports scroll popup.
|
protected void |
postScrollEvent(java.lang.Integer scrollX,
java.lang.Integer scrollY)
Post scroll event with the specified scroll positions.
|
add, add, add, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, currentFocus, cycleFocus, defaultFocus, destroy, detach, dimension, doLayout, draw, endSizeChange, findMouseSource, firstFocus, focus, focusTraversable, focusWorker, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getWidgetsList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, prepareWidgets, prevFocus, processKeyEvent, remove, repaint, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setWidth, startSizeChange, unrealize, updateSizeWorker, widgets, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getScrollDimension, getVisibleDimension, scroll
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, defaultMousePtr, destroy, dimension, displayPhysicalLocation, draw, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, height, hidden, hide, highlighted, insets, isDirectManipulable, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestFocus, requestSync, resizeTo, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, topLevelWindow, unrealize, width, window
protected BaseConfig config
private java.util.ArrayList<ScrollListener> scrollListeners
public void initialize(WidgetId id, BaseConfig cfg)
This API is called after the widget is created and added to the registry.
initialize
in interface WidgetWithConfig<BaseConfig>
id
- The widget's ID.cfg
- The config used to initialize this widget.public BaseConfig config()
config
in interface Widget<O extends OutputManager<?>>
config
in interface ConfigOwner<BaseConfig>
config
in class AbstractWidget<O extends OutputManager<?>>
public void afterConfigUpdate(BaseConfig beforeUpdate)
afterConfigUpdate
in interface ConfigOwner<BaseConfig>
beforeUpdate
- public NativeDimension getScrollStep()
The scroll step must be in the same units as the dimensions returned
by ScrollableWidget.getScrollDimension()
and ScrollableWidget.getVisibleDimension()
.
getScrollStep
in interface ScrollableWidget<O extends OutputManager<?>>
public void addScrollListener(ScrollListener listener)
addScrollListener
in interface ScrollPublisher
listener
- Listener to add.public boolean isScrollPopupSupported()
isScrollPopupSupported
in interface ScrollableWidget<O extends OutputManager<?>>
true
if this widget supports scroll popup.protected void postScrollEvent(java.lang.Integer scrollX, java.lang.Integer scrollY)
scrollX
- New X position.scrollY
- New Y position.