public class ScrollablePanel<T extends Component> extends Component<Component> implements Viewport
Constructor and Description |
---|
ScrollablePanel()
Default constructor.
|
ScrollablePanel(float x,
float y,
float width,
float height)
Constructor with position and size parameters.
|
ScrollablePanel(org.joml.Vector2f position,
org.joml.Vector2f size)
Constructor with position and size parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Component<T> |
getContainer()
Returns container which should used to add components to scrollable panel.
|
ScrollBar |
getHorizontalScrollBar()
Returns horizontal scrollbar.
|
ScrollBar |
getVerticalScrollBar()
Returns vertical scrollbar.
|
Component<Component> |
getViewport() |
int |
hashCode() |
void |
resize()
Used to resize scrollable panel.
|
void |
setContainer(Component<T> container)
Used to set container which should used to add components to scrollable panel.
|
void |
setHorizontalScrollBar(ScrollBar horizontalScrollBar)
Used to set horizontal scroll bar.
|
void |
setVerticalScrollBar(ScrollBar verticalScrollBar)
Used to set vertical scroll bar.
|
java.lang.String |
toString() |
void |
updateViewport()
Used to update container position in viewport.
|
add, addAll, clearChilds, containerIterator, contains, containsAll, count, forEach, getAbsolutePosition, getBackgroundColor, getBorder, getChilds, getCornerRadius, getFocusedStrokeColor, getIntersector, getListenerMap, getMetadata, getParent, getPosition, getSize, getTooltip, intersects, isEmpty, isEnabled, isFocused, isHovered, isPressed, isVisible, parallelStream, remove, removeAll, removeIf, setBackgroundColor, setBackgroundColor, setBorder, setCornerRadius, setEnabled, setFocused, setFocusedStrokeColor, setFocusedStrokeColor, setHovered, setIntersector, setListenerMap, setParent, setPosition, setPosition, setPressed, setSize, setSize, setTooltip, setVisible, stream
public ScrollablePanel()
Also if you want to make it easy to use with Json marshaller/unmarshaller component should contain empty constructor.
public ScrollablePanel(float x, float y, float width, float height)
x
- x position position in parent component.y
- y position position in parent component.width
- width of component.height
- height of component.public ScrollablePanel(org.joml.Vector2f position, org.joml.Vector2f size)
position
- position position in parent component.size
- size of component.public void resize()
public void updateViewport()
updateViewport
in interface Viewport
public ScrollBar getVerticalScrollBar()
public void setVerticalScrollBar(ScrollBar verticalScrollBar)
verticalScrollBar
- vertical scroll bar to set.public ScrollBar getHorizontalScrollBar()
public void setHorizontalScrollBar(ScrollBar horizontalScrollBar)
horizontalScrollBar
- horizontal scroll bar to set.public Component<T> getContainer()
public void setContainer(Component<T> container)
container
- container which should used to add components to scrollable panel.