public class ScrollPaneGuiImpl extends ScrollPane<GuiOutputManager>
| Modifier and Type | Class and Description |
|---|---|
static class |
ScrollPaneGuiImpl.ShowBars
Container show bars options:
AS_NEEDED - Only when needed.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
both
True when have both horizontal and vertical scroll bars
|
protected GuiColorResolver |
gc
Color resolver
|
private GuiDriver |
gd
Screen driver
|
private ScrollBarGuiImpl |
hBar
Horizontal scroll bar
|
private boolean |
horizBarQuirk
Flag which activates a 4GL bug, which will not show the horizontal scrollbar, even if
forced.
|
protected Container |
intersectionPanel
Panel which is drawn in bottom-right corner when at least one scrollbar is visible.
|
private ScrollPaneGuiImpl.ShowBars |
showBars
Scroll bars show policy
|
private ScrollBarGuiImpl |
vBar
Vertical scroll bar
|
private Widget |
widget
child widget
|
private java.util.Optional<java.util.function.Supplier<TopLevelWindow<GuiOutputManager>>> |
wnd
top level window supplier
|
config, rootPanellisteners, location, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
ScrollPaneGuiImpl(ScrollableWidget<GuiOutputManager> widget)
Constructor.
|
ScrollPaneGuiImpl(ScrollableWidget<GuiOutputManager> widget,
java.util.function.Supplier<TopLevelWindow<GuiOutputManager>> wnd)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
adjustIntersectionPanel()
Adjust the size and location of the intersection panel in regard to the visible scroll-bars.
|
private void |
adjustScrollBar(ScrollBar.Orientation orientation,
int max,
boolean visible)
Adjust scroll bar max value.
|
void |
adjustScrollLayout()
Adjust the scroll layout for this pane, as scrollbars may have been added/removed.
|
protected void |
adjustScrollLayoutImpl()
Adjusts viewport size, scroll bar visibility and positions.
|
void |
afterConfigUpdate(BaseConfig beforeUpdate)
The method is called after the configuration associated with the implementor changes.
|
double |
barSize(ScrollBar.Orientation orientation)
Get scroll bar size in characters.
|
int |
barSizeNative(ScrollBar.Orientation orientation)
Get scroll bar size in pixel units.
|
Dimension |
calcInitialViewportSize()
Calculates and returns initial viewport size.
|
Dimension |
calcViewportSizeWithoutScrollbars()
Calculates and returns initial viewport size taking into account that scrollbars occupy
extra space.
|
private ScrollBarGuiImpl |
createScrollBar(ScrollBar.Orientation orientation)
Create scroll bar.
|
private void |
createScrollBars(ScrollBar.Bars bars)
Create and attach container scroll bars.
|
void |
draw()
Widget drawing method.
|
void |
draw(Widget<GuiOutputManager>[] list)
The secondary renderer for this container.
|
boolean |
enforceDefaultMousePtr()
Check if the default mouse pointer should be used regardless of
the parent settings
|
MousePtrWrapper |
getEffectiveMousePointer()
Get the current effective custom mouse pointer
|
(package private) NativeRectangle |
getIntersectionRect()
Retrieve the rectangle which should be placed in the bottom-right corner.
|
java.util.Optional<MousePtrWrapper> |
getLoadedMousePointer()
Get the Loaded custom mouse pointer if it is set
|
ScrollBarGuiImpl |
getScrollBar(ScrollBar.Orientation orientation)
Get the vertical or horizontal scroll bar controlled by this pane.
|
void |
handleScrollEvent(ScrollEvent event)
This method is invoked when scroll pane is scrolled.
|
protected boolean |
hasIntersectionPanel()
Helper to identify if a custom intersection panel is set.
|
protected int[] |
mouseActions()
Determine the mouse actions processed by this widget.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Notification of a mouse clicked event occurred for this widget.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Notification of a mouse moved event occurred for this widget.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Notification of a mouse released event occurred for this widget.
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Notification of a mouse wheel moved event occurred for this widget.
|
void |
setEnabled(boolean enabled)
Enable/disable widget.
|
(package private) void |
setHorizBarQuirk(boolean quirk)
Flag which activates a 4GL bug, which will not show the horizontal scrollbar, even if
forced.
|
(package private) void |
setIntersectionPanel(Container panel)
Setter for the intersection panel which is drawn in the bottom-right corner when at least
one scroll-bar is visible.
|
void |
setScrollBarController(ScrollBar.Orientation orientation,
ScrollBarControllerGuiImpl controller)
Set custom controller for one of the scroll bars.
|
void |
setScrollBars(ScrollBar.Bars bars)
Set container scroll bars.
|
void |
setShowBars(ScrollPaneGuiImpl.ShowBars showBars)
Set show bars policy.
|
boolean |
supportsCustomMousePointer()
Check if the widget supports LOAD-MOUSE-POINTER() method
|
TopLevelWindow<GuiOutputManager> |
topLevelWindow()
Get ancestor TopLevelWindow for this widget.
|
calcHscroll, calcVscroll, config, doLayout, getBorder, getChild, getRootPanel, initialize, isFocusable, minimumSize, setBorder, setLocation, setSize, viewportadd, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, defaultFocus, deregisterSelectedWidget, destroy, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusTraversable, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, height, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, processKeyEvent, reflectAncestorChange, reflectLocationChanged, registerSelectedWidget, remove, removeContainerStateListener, repaint, replace, requestFocus, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setPhysicalDimensionInt, setSize, setTabItemList, setWidth, startSizeChange, swap, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, widgetStateChanged, width_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getId, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseDragged, mouseEntered, mouseExited, mousePressed, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setHidden, setHighlighted, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, showPopupMenu, sync, toString, translate, triggerLocationChanged, unregisterWidgetListener, updateSystemParent, widgetRealized, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwidgetsAsListacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getId, getIdForTrigger, getLegacyWidget, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setHidden, setHighlighted, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, startTrigger, systemFocusGrabbed, unregisterWidgetListener, validateDisplayValue, windowprivate GuiDriver gd
protected GuiColorResolver gc
private ScrollBarGuiImpl hBar
private ScrollBarGuiImpl vBar
private ScrollPaneGuiImpl.ShowBars showBars
protected Container intersectionPanel
boolean both
private final Widget widget
private final java.util.Optional<java.util.function.Supplier<TopLevelWindow<GuiOutputManager>>> wnd
private boolean horizBarQuirk
public ScrollPaneGuiImpl(ScrollableWidget<GuiOutputManager> widget)
widget - Child widget.public ScrollPaneGuiImpl(ScrollableWidget<GuiOutputManager> widget, java.util.function.Supplier<TopLevelWindow<GuiOutputManager>> wnd)
widget - Child widget.wnd - TopLevelWindow supplierpublic void adjustScrollLayout()
public void draw()
draw in interface Widget<GuiOutputManager>draw in class ScrollPane<GuiOutputManager>public ScrollBarGuiImpl getScrollBar(ScrollBar.Orientation orientation)
orientation - Which scroll bar to get.public void setScrollBarController(ScrollBar.Orientation orientation, ScrollBarControllerGuiImpl controller)
orientation - Orientation of the target scroll bar.controller - Custom controller for the scroll bar.public void draw(Widget<GuiOutputManager>[] list)
draw in class ScrollPane<GuiOutputManager>list - Array of components to draw.public void setEnabled(boolean enabled)
setEnabled in interface Widget<GuiOutputManager>setEnabled in class AbstractWidget<GuiOutputManager>enabled - New enabled state.public void setScrollBars(ScrollBar.Bars bars)
setScrollBars in class ScrollPane<GuiOutputManager>bars - Scroll bars.public void setShowBars(ScrollPaneGuiImpl.ShowBars showBars)
showBars - Show bars policy.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListenermouseWheelMoved in class AbstractWidget<GuiOutputManager>e - The mouse event.public MousePtrWrapper getEffectiveMousePointer()
getEffectiveMousePointer in interface Widget<GuiOutputManager>getEffectiveMousePointer in class AbstractWidget<GuiOutputManager>public java.util.Optional<MousePtrWrapper> getLoadedMousePointer()
getLoadedMousePointer in interface Widget<GuiOutputManager>getLoadedMousePointer in class AbstractWidget<GuiOutputManager>public boolean enforceDefaultMousePtr()
true if the default mouse pointer should always be usedpublic boolean supportsCustomMousePointer()
supportsCustomMousePointer in interface Widget<GuiOutputManager>supportsCustomMousePointer in class AbstractWidget<GuiOutputManager>true if the widget supports
LOAD-MOUSE-POINTER() methodpublic TopLevelWindow<GuiOutputManager> topLevelWindow()
topLevelWindow in interface Widget<GuiOutputManager>topLevelWindow in class AbstractWidget<GuiOutputManager>java.lang.IllegalStateException - When this widget is not attached to a top-level window.public void afterConfigUpdate(BaseConfig beforeUpdate)
SelectionListGuiImpl, then
activate/deactivate direct manipulation. Otherwise call the default method from superclass.afterConfigUpdate in interface ConfigOwner<BaseConfig>afterConfigUpdate in class ScrollPane<GuiOutputManager>beforeUpdate - Configuration before updateprotected int[] mouseActions()
mouseActions in class AbstractWidget<GuiOutputManager>public void handleScrollEvent(ScrollEvent event)
handleScrollEvent in interface ScrollListenerhandleScrollEvent in class ScrollPane<GuiOutputManager>event - Event which triggered this call.public Dimension calcInitialViewportSize()
calcInitialViewportSize in class ScrollPane<GuiOutputManager>public Dimension calcViewportSizeWithoutScrollbars()
public int barSizeNative(ScrollBar.Orientation orientation)
orientation - Scroll bar orientation.protected void adjustScrollLayoutImpl()
void setHorizBarQuirk(boolean quirk)
quirk - The bug's state.void setIntersectionPanel(Container panel)
panel - The panel widget to be drawn in the bottom-right corner.protected boolean hasIntersectionPanel()
true if an intersection panel was set.NativeRectangle getIntersectionRect()
null
if no space should be reserved in the bottom-right corner.private void adjustScrollBar(ScrollBar.Orientation orientation, int max, boolean visible)
orientation - Scroll bar orientation.max - Max value.visible - The new visibility state.public double barSize(ScrollBar.Orientation orientation)
orientation - Scroll bar orientation.protected void adjustIntersectionPanel()
private void createScrollBars(ScrollBar.Bars bars)
bars - Scroll bars.private ScrollBarGuiImpl createScrollBar(ScrollBar.Orientation orientation)
orientation - Scroll bar orientation.