public class UITab extends UIComponent<UITab> implements IGuiText<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
Whether this
UITab is currently active. |
protected FontRenderOptions |
activeFro
The
FontRenderOptions to use for this UITooltip when active. |
protected boolean |
autoHeight
|
protected boolean |
autoWidth
|
protected int |
bgColor
Background color for this
UITab. |
protected UIContainer<?> |
container
The container this
UITab is linked to. |
protected MalisisFont |
font
The
MalisisFont to use for this UITooltip. |
protected FontRenderOptions |
fro
The
FontRenderOptions to use for this UITooltip. |
protected FontRenderOptions |
hoveredFro
The
FontRenderOptions to use for this UITooltip when hovered. |
protected UIImage |
image
Image for this
UITab. |
protected java.lang.String |
label
Label for this
UITab. |
| Constructor and Description |
|---|
UITab(MalisisGui gui,
java.lang.String label)
Instantiates a new
UITab. |
UITab(MalisisGui gui,
UIImage image)
Instantiates a new
UITab. |
| 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. |
FontRenderOptions |
getActiveFontRendererOptions()
Gets the active
FontRenderOptions. |
int |
getBgColor()
Gets the background color for this
UITab. |
MalisisFont |
getFont()
Gets the
MalisisFont. |
FontRenderOptions |
getFontRenderOptions()
Gets the
FontRenderOptions. |
FontRenderOptions |
getHoveredFontRendererOptions()
Gets the hovered
FontRenderOptions. |
java.lang.String |
getPropertyString()
Gets the property string.
|
ComponentPosition |
getTabPosition()
Gets the
ComponentPosition of this UITab. |
boolean |
isActive() |
boolean |
isAutoHeight()
Checks if height is calculated automatically.
|
boolean |
isAutoWidth()
Checks if the width is calculated automatically.
|
protected boolean |
isHorizontal()
Checks whether this
UITab is horizontally positioned. |
boolean |
onClick(int x,
int y)
On click.
|
UITab |
setActive(boolean active)
Sets this tab to be active.
|
UITab |
setActiveFontRendererOptions(FontRenderOptions fro)
Sets the active
FontRenderOptions. |
UITab |
setBgColor(int color)
Sets the baground color for this
UITab. |
UITab |
setContainer(UIContainer<?> container)
Set the
UIContainer linked with this UITab. |
UITab |
setFont(MalisisFont font)
Sets the
MalisisFont. |
UITab |
setFontRenderOptions(FontRenderOptions fro)
Sets the
FontRenderOptions. |
UITab |
setHoveredFontRendererOptions(FontRenderOptions fro)
Sets the hovered
FontRenderOptions. |
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 for this
UITab. |
UITab |
setSize(int width,
int height)
Sets the size of this
UITab. |
addControlComponent, attachData, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getData, getGui, getHeight, getIconProvider, getName, getParent, getRawHeight, getRawWidth, getRenderer, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, onButtonPress, onButtonRelease, onDoubleClick, onDrag, onKeyTyped, onMouseMove, onRightClick, onScrollWheel, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, self, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setPosition, setPosition, setTooltip, setTooltip, setVisible, setZIndex, toString, unregisterprotected MalisisFont font
MalisisFont to use for this UITooltip.protected FontRenderOptions fro
FontRenderOptions to use for this UITooltip.protected FontRenderOptions activeFro
FontRenderOptions to use for this UITooltip when active.protected FontRenderOptions hoveredFro
FontRenderOptions to use for this UITooltip when hovered.protected java.lang.String label
UITab.protected boolean autoWidth
protected boolean autoHeight
protected UIContainer<?> container
UITab is linked to.protected boolean active
UITab is currently active.protected int bgColor
UITab.public UITab(MalisisGui gui, java.lang.String label)
UITab.gui - the guilabel - the labelpublic UITab(MalisisGui gui, UIImage image)
UITab.gui - the guiimage - the imagepublic MalisisFont getFont()
IGuiTextMalisisFont.public UITab setFont(MalisisFont font)
IGuiTextMalisisFont.public FontRenderOptions getFontRenderOptions()
IGuiTextFontRenderOptions.getFontRenderOptions in interface IGuiText<UITab>public UITab setFontRenderOptions(FontRenderOptions fro)
IGuiTextFontRenderOptions.setFontRenderOptions in interface IGuiText<UITab>fro - the fropublic FontRenderOptions getActiveFontRendererOptions()
FontRenderOptions.public UITab setActiveFontRendererOptions(FontRenderOptions fro)
FontRenderOptions.fro - the fropublic FontRenderOptions getHoveredFontRendererOptions()
FontRenderOptions.public UITab setHoveredFontRendererOptions(FontRenderOptions fro)
FontRenderOptions.fro - the fropublic UITab setLabel(java.lang.String label)
UITab.autoWidth is true, the height if autoHeight is true.label - the labelUITabpublic UITab setImage(UIImage image)
UITab.autoWidth is true, the height if autoHeight is true.image - the imageUITabpublic void setParent(UIComponent<?> parent)
UITab.setParent in class UIComponent<UITab>parent - the new parentjava.lang.IllegalArgumentException - if the parent is not a UITabGrouppublic UITab setSize(int width, int height)
UITab.label or image.setSize in interface ITransformable.Size<UITab>setSize in class UIComponent<UITab>width - the widthheight - the heightUITabpublic boolean isAutoWidth()
public boolean isAutoHeight()
public UITab setContainer(UIContainer<?> container)
UIContainer linked with this UITab.container - the containerUITabpublic ComponentPosition getTabPosition()
ComponentPosition of this UITab.public int getBgColor()
UITab.UITab.public boolean isActive()
public UITab setActive(boolean active)
active - true if activeprotected boolean isHorizontal()
UITab is horizontally positioned.public boolean onClick(int x,
int y)
UIComponentonClick in class UIComponent<UITab>x - the xy - the ypublic 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 java.lang.String getPropertyString()
UIComponentgetPropertyString in class UIComponent<UITab>