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.
|
Widget.ZOrderClass
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.
|
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, rootPanel
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 |
---|---|
private void |
adjustScrollBar(ScrollBar.Orientation orientation,
int max,
boolean visible)
Adjust scroll bar max value.
|
(package private) 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.
|
private 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.
|
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
|
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 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 |
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.
|
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.
|
afterConfigUpdate, calcHscroll, calcVscroll, config, doLayout, getBorder, getChild, getRootPanel, initialize, isFocusable, minimumSize, setBorder, setLocation, setSize, viewport
add, add, add, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, currentFocus, cycleFocus, defaultFocus, destroy, detach, dimension, endSizeChange, findMouseSource, firstFocus, focus, focusTraversable, focusWorker, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getWidgetsList, hasFocusable, height, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, prepareWidgets, prevFocus, processKeyEvent, remove, repaint, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, 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, getId, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, manageSystemActions, mouseDragged, mouseEntered, mouseExited, mousePressed, 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, setHidden, setHighlighted, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, sync, toString, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getId, getLegacyWidget, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, isDirectManipulable, isDisplayed, isEnabled, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, requestSync, resizeTo, screen, screenLocation, screenPhysicalLocation, setHidden, setHighlighted, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, window
private GuiDriver gd
protected GuiColorResolver gc
private ScrollBarGuiImpl hBar
private ScrollBarGuiImpl vBar
private ScrollPaneGuiImpl.ShowBars showBars
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 suppliervoid 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
- 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.MouseListener
mouseReleased
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
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.protected int[] mouseActions()
mouseActions
in class AbstractWidget<GuiOutputManager>
public void handleScrollEvent(ScrollEvent event)
handleScrollEvent
in interface ScrollListener
handleScrollEvent
in class ScrollPane<GuiOutputManager>
event
- Event which triggered this call.public Dimension calcInitialViewportSize()
calcInitialViewportSize
in class ScrollPane<GuiOutputManager>
public int barSizeNative(ScrollBar.Orientation orientation)
orientation
- Scroll bar orientation.protected void adjustScrollLayoutImpl()
void setHorizBarQuirk(boolean quirk)
quirk
- The bug's state.private void adjustScrollBar(ScrollBar.Orientation orientation, int max, boolean visible)
orientation
- Scroll bar orientation.max
- Max value.private double barSize(ScrollBar.Orientation orientation)
orientation
- Scroll bar orientation.private void createScrollBars(ScrollBar.Bars bars)
bars
- Scroll bars.private ScrollBarGuiImpl createScrollBar(ScrollBar.Orientation orientation)
orientation
- Scroll bar orientation.