public class UIScrollBar extends UIComponent<UIScrollBar> implements IControlComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
UIScrollBar.Type |
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate| Modifier and Type | Field and Description |
|---|---|
boolean |
autoHide |
protected GuiIcon |
disabledIcon |
protected GuiIcon |
horizontalDisabledIcon |
protected GuiIcon |
horizontalIcon |
protected int |
scrollHeight |
protected GuiShape |
scrollShape |
protected int |
scrollThickness |
protected UIScrollBar.Type |
type |
protected GuiIcon |
verticalDisabledIcon |
protected GuiIcon |
verticalIcon |
| Constructor and Description |
|---|
UIScrollBar(MalisisGui gui,
T parent,
UIScrollBar.Type type) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addScrollbar(UIComponent component,
UIScrollBar scrollbar) |
protected void |
createShape(MalisisGui gui) |
void |
drawBackground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called first when drawing this
UIComponent. |
void |
drawForeground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called last when drawing this
UIComponent. |
int |
getHeight()
Gets the height of this
UIComponent. |
int |
getLength() |
float |
getOffset() |
java.lang.String |
getPropertyString()
Gets the property string.
|
protected IScrollable |
getScrollable() |
static UIScrollBar |
getScrollbar(UIComponent component,
UIScrollBar.Type type) |
int |
getWidth()
Gets the width of this
UIComponent. |
boolean |
hasVisibleOtherScrollbar() |
boolean |
isHorizontal() |
void |
onClick(MouseEvent.Press event) |
void |
onContentUpdate(ContentUpdateEvent event) |
void |
onDrag(MouseEvent.Drag event) |
void |
onKeyTyped(KeyboardEvent event) |
void |
onScrollWheel(MouseEvent.ScrollWheel event) |
void |
scrollBy(float amount) |
void |
scrollTo(float offset) |
UIScrollBar |
setAutoHide(boolean autoHide) |
UIScrollBar |
setLength(int length) |
protected void |
setPosition() |
void |
setScrollSize(int thickness,
int height)
Sets the scroll size.
|
void |
updateScrollbars() |
addControlComponent, componentX, componentY, draw, fireEvent, fireKeyboardEvent, fireMouseEvent, getAlpha, getAnchor, getComponentAt, getGui, getName, getParent, getRawHeight, getRawWidth, getTooltip, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, toString, unregisterclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdraw, fireKeyboardEvent, getComponentAt, getParent, setParentprotected int scrollThickness
protected int scrollHeight
protected GuiIcon disabledIcon
protected GuiIcon verticalIcon
protected GuiIcon verticalDisabledIcon
protected GuiIcon horizontalIcon
protected GuiIcon horizontalDisabledIcon
protected UIScrollBar.Type type
public boolean autoHide
protected GuiShape scrollShape
public UIScrollBar(MalisisGui gui, T parent, UIScrollBar.Type type)
public void setScrollSize(int thickness,
int height)
thickness - the thicknessheight - the heightprotected void setPosition()
protected void createShape(MalisisGui gui)
protected IScrollable getScrollable()
public boolean hasVisibleOtherScrollbar()
public boolean isHorizontal()
public UIScrollBar setAutoHide(boolean autoHide)
public int getWidth()
UIComponentUIComponent.getWidth in class UIComponent<UIScrollBar>public int getHeight()
UIComponentUIComponent.getHeight in class UIComponent<UIScrollBar>public int getLength()
public UIScrollBar setLength(int length)
public float getOffset()
public void scrollTo(float offset)
public void scrollBy(float amount)
public void updateScrollbars()
public void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponentUIComponent.drawBackground in class UIComponent<UIScrollBar>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void drawForeground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponentUIComponent.drawForeground in class UIComponent<UIScrollBar>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void onContentUpdate(ContentUpdateEvent event)
public void onClick(MouseEvent.Press event)
public void onDrag(MouseEvent.Drag event)
public void onScrollWheel(MouseEvent.ScrollWheel event)
public void onKeyTyped(KeyboardEvent event)
public java.lang.String getPropertyString()
UIComponentgetPropertyString in class UIComponent<UIScrollBar>public static UIScrollBar getScrollbar(UIComponent component, UIScrollBar.Type type)
public static void addScrollbar(UIComponent component, UIScrollBar scrollbar)