public class UI2dScrollContext extends UI2dContext
UI2dContainer.ArrowKeyFocus, UI2dContainer.LayoutbottomMargin, height, leftMargin, rightMargin, textAlignHorizontal, textAlignVertical, textOffsetX, textOffsetY, topMargin, width, x, ychildren, hasFocus, mousePressContextMenu, visible| Constructor and Description |
|---|
UI2dScrollContext(UI ui,
float x,
float y,
float w,
float h) |
| Modifier and Type | Method and Description |
|---|---|
float |
getScrollHeight() |
float |
getScrollWidth() |
float |
getScrollX() |
float |
getScrollY() |
protected void |
onMouseWheel(MouseEvent e,
float mx,
float my,
float delta)
Subclasses override to receive mouse events
|
protected void |
onResize()
Subclasses may override this method, invoked when the component is resized
|
UI2dContainer |
setContentSize(float w,
float h) |
UI2dScrollContext |
setHorizontalScrollingEnabled(boolean horizontalScrollingEnabled) |
UI2dScrollContext |
setMaxHeight(float maxHeight)
Sets a maximum height on the scroll container.
|
UI2dScrollContext |
setScrollHeight(float scrollHeight) |
UI2dScrollContext |
setScrollSize(float scrollWidth,
float scrollHeight) |
UI2dScrollContext |
setScrollWidth(float scrollWidth) |
UI2dScrollContext |
setScrollX(float scrollX) |
UI2dScrollContext |
setScrollY(float scrollY) |
UI2dScrollContext |
setVerticalScrollingEnabled(boolean verticalScrollingEnabled) |
drawBackground, getGraphicsaddChildren, addTopLevelComponent, getChild, getChildren, getContentHeight, getContentTarget, getContentWidth, iterator, newHorizontalContainer, newHorizontalContainer, newHorizontalContainer, newVerticalContainer, newVerticalContainer, newVerticalContainer, onKeyPressed, reflow, removeAllChildren, setArrowKeyFocus, setChildMargin, setChildSpacing, setChildSpacing, setContentHeight, setContentTarget, setContentWidth, setLayout, setMinHeight, setMinWidth, setPadding, setPadding, setPaddingaddToContainer, addToContainer, breakTextToWidth, clipTextToWidth, contains, drawBorder, drawFocus, drawFocusCorners, drawFocusCorners, getBackgroundColor, getBorderColor, getBorderRounding, getBorderWeight, getContainer, getFocusColor, getFocusSize, getFont, getFontColor, getHeight, getNextSibling, getParent, getPrevSibling, getWidth, getX, getY, hasBackground, hasBorder, hasFont, hasFontColor, isMappable, redraw, removeFromContainer, setBackground, setBackgroundColor, setBorder, setBorderColor, setBorderRounding, setBorderWeight, setBottomMargin, setContainerIndex, setDescription, setFocusBackground, setFocusBackgroundColor, setFocusColor, setFocusCorners, setFont, setFontColor, setFontColor, setHeight, setLeftMargin, setMappable, setMargin, setMargin, setMargin, setPosition, setPosition, setPosition, setPosition, setRightMargin, setSize, setTextAlignment, setTextAlignment, setTextOffset, setTopMargin, setVisible, setWidth, setX, setYaddLoopTask, beginDraw, blur, bringToFront, consumeKeyEvent, consumeMousePress, consumeMouseWheelEvent, endDraw, focus, getDescription, getFocusedChild, getLX, getUI, hasDirectFocus, hasFocus, isVisible, keyEventConsumed, loop, mousePressConsumed, onBlur, onDraw, onFocus, onUIResize, removeLoopTask, toggleVisibleonKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseMoved, onMouseOut, onMouseOver, onMousePressed, onMouseReleasedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic UI2dScrollContext(UI ui, float x, float y, float w, float h)
public UI2dScrollContext setMaxHeight(float maxHeight)
maxHeight - Maximum height before scrolling kicks inpublic UI2dContainer setContentSize(float w, float h)
setContentSize in class UI2dContainerpublic UI2dScrollContext setScrollSize(float scrollWidth, float scrollHeight)
public float getScrollHeight()
public UI2dScrollContext setScrollHeight(float scrollHeight)
public float getScrollWidth()
public UI2dScrollContext setScrollWidth(float scrollWidth)
public UI2dScrollContext setHorizontalScrollingEnabled(boolean horizontalScrollingEnabled)
public UI2dScrollContext setVerticalScrollingEnabled(boolean verticalScrollingEnabled)
protected void onResize()
UI2dComponentonResize in class UI2dContextpublic float getScrollX()
public float getScrollY()
public UI2dScrollContext setScrollX(float scrollX)
public UI2dScrollContext setScrollY(float scrollY)
protected void onMouseWheel(MouseEvent e, float mx, float my, float delta)
UIEventHandleronMouseWheel in class UIEventHandlere - Mouse eventmx - x-coordinatemy - y-coordinatedelta - Amount of wheel movementLX library by Mark C. Slee. © 2012-2020