Package net.risingworld.api.ui
Class UIScrollView
java.lang.Object
net.risingworld.api.ui.UIElement
net.risingworld.api.ui.UIScrollView
Represents a dynamic scroll view. Child elements added to the scroll view will only be visible
within the scroll area. You can add any kind of content to the scroll view element.
Example: Create scroll view and add some elements to it
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
Fields inherited from class net.risingworld.api.ui.UIElement
hoverStyle, style
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
float
Gets the visibility setting for the horizontal scroll element.float
Gets the scroll view mode.float
Gets the visibility setting for the vertical scroll element.void
setElasticity
(float elasticity) void
setHorizontalPageSize
(float pageSize) void
Sets the visibility for the horizontal scroll element.void
setMouseWheelScrollSize
(float scrollSize) void
setVerticalPageSize
(float pageSize) void
Sets the visibility for the vertical scroll element.Methods inherited from class net.risingworld.api.ui.UIElement
addChild, addStyleSheet, addToClassList, getChildCount, getChilds, getID, getParent, getPluginID, isClickable, onClick, removeAllChilds, removeChild, removeFromClassList, removeFromParent, removeStyleSheet, resetPivot, resetPosition, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBorderColor, setBorderEdgeRadius, setClickable, setOpacity, setPickable, setPivot, setPosition, setSize, setVisible, updateStyle
-
Constructor Details
-
UIScrollView
Creates a new scroll view.- Parameters:
mode
- scroll view mode. Cannot be changed retroactively.
-
-
Method Details
-
getScrollViewMode
Gets the scroll view mode.- Returns:
- the scroll view mode.
-
setHorizontalScrollerVisibility
Sets the visibility for the horizontal scroll element.- Parameters:
visibility
- the visibility setting for the horizontal scroller.
-
getHorizontalScrollerVisibility
Gets the visibility setting for the horizontal scroll element.- Returns:
- the horizontal scroller visibility setting.
-
setVerticalScrollerVisibility
Sets the visibility for the vertical scroll element.- Parameters:
visibility
- the visibility setting for the vertical scroller.
-
getVerticalScrollerVisibility
Gets the visibility setting for the vertical scroll element.- Returns:
- the vertical scroller visibility setting.
-
setHorizontalPageSize
public void setHorizontalPageSize(float pageSize) -
getHorizontalPageSize
public float getHorizontalPageSize() -
setVerticalPageSize
public void setVerticalPageSize(float pageSize) -
getVerticalPageSize
public float getVerticalPageSize() -
setMouseWheelScrollSize
public void setMouseWheelScrollSize(float scrollSize) -
getMouseWheelScrollSize
public float getMouseWheelScrollSize() -
setElasticity
public void setElasticity(float elasticity) -
getElasticity
public float getElasticity()
-