public class UITab extends UIComponent<UITab>
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate| Modifier and Type | Field and Description |
|---|---|
protected boolean |
active |
protected boolean |
autoHeight |
protected boolean |
autoWidth |
protected int |
color |
protected UIContainer |
container |
protected UIImage |
image |
protected java.lang.String |
label |
| Constructor and Description |
|---|
UITab(MalisisGui gui,
java.lang.String label) |
UITab(MalisisGui gui,
UIImage image) |
| Modifier and Type | Method and Description |
|---|---|
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 |
getColor() |
UITabGroup.TabPosition |
getTabPosition() |
boolean |
isAutoHeight() |
boolean |
isAutoWidth() |
protected boolean |
isHorizontal() |
void |
onClick(MouseEvent.Release event) |
void |
setActive(boolean active)
Sets this tab to be active.
|
UITab |
setColor(int color)
Sets the color for this
UITab. |
UITab |
setContainer(UIContainer container)
Set the
UIContainer linked with this UITab. |
UITab |
setImage(UIImage image)
Sets the image
UITab. |
UITab |
setLabel(java.lang.String label)
Sets the label for this
UITab. |
void |
setParent(UIComponent parent)
Sets the parent of this
UIComponent. |
UITab |
setSize(int width,
int height)
Sets the size of this
UIComponent. |
addControlComponent, componentX, componentY, draw, fireEvent, fireKeyboardEvent, fireMouseEvent, getAlpha, getAnchor, getComponentAt, getGui, getHeight, getName, getParent, getPropertyString, getRawHeight, getRawWidth, getTooltip, getWidth, 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, setPosition, setPosition, setTooltip, setTooltip, setVisible, setZIndex, toString, unregisterprotected java.lang.String label
protected UIImage image
protected boolean autoWidth
protected boolean autoHeight
protected UIContainer container
protected boolean active
protected int color
public UITab(MalisisGui gui, java.lang.String label)
public UITab(MalisisGui gui, UIImage image)
protected boolean isHorizontal()
UITab is horizontally positioned.public UITab setColor(int color)
UITab. Also sets the color for its UIContainer.color - the colorUITabpublic int getColor()
UITab.public void setParent(UIComponent parent)
UIComponentUIComponent.setParent in class UIComponent<UITab>parent - the parentpublic UITab setSize(int width, int height)
UIComponentUIComponent.setSize in interface ITransformable.Size<UITab>setSize in class UIComponent<UITab>width - the widthheight - the heightUIComponentpublic boolean isAutoWidth()
public boolean isAutoHeight()
public UITab setLabel(java.lang.String label)
UITab. Removes the image if was previously set.label - the labelUITabpublic UITab setImage(UIImage image)
UITab. Removes the label if was previously set.image - the imageUITabpublic UITab setContainer(UIContainer container)
UIContainer linked with this UITab.container - the containerUITabpublic UITabGroup.TabPosition getTabPosition()
UITab position around the container.public void setActive(boolean active)
active - true if activepublic void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponentUIComponent.drawBackground in class UIComponent<UITab>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<UITab>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void onClick(MouseEvent.Release event)