public class UITabGroup extends UIContainer<UITabGroup>
Modifier and Type | Class and Description |
---|---|
static class |
UITabGroup.TabChangeEvent
Event fired when an inactive
UITab is clicked. |
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 UITab |
activeTab
The currently active
UITab . |
protected UIContainer |
attachedContainer
The
UIContainer this UITabGroup is attached to. |
protected java.util.Map<UITab,UIContainer> |
listTabs
The list of
UITab added to this UITabGroup . |
protected int |
offset
Number of pixels this
UITabGroup is offset to the border of the attachedContainer . |
protected GuiIcon[] |
panelIcons
Icons to use if this
UITabGroup is attached to a UIPanel . |
protected int |
spacing
Number of pixels between each tab.
|
protected ComponentPosition |
tabPosition
The position of this
UITabGroup relative to its attachedContainer . |
protected GuiIcon[] |
windowIcons
Icons to use if this
UITabGroup is attached to a UIWindow . |
clipContent, components, contentHeight, contentWidth, horizontalPadding, titleLabel, verticalPadding, xOffset, yOffset
Constructor and Description |
---|
UITabGroup(MalisisGui gui)
Instantiates a new
UITabGroup . |
UITabGroup(MalisisGui gui,
ComponentPosition tabPosition)
Instantiates a new
UITabGroup . |
Modifier and Type | Method and Description |
---|---|
UITab |
addTab(UITab tab,
UIContainer container)
|
UITabGroup |
attachTo(UIContainer container,
boolean displace)
Attach this
UITabGroup to a UIContainer . |
protected void |
calculateTabPosition()
Calculates the
UITab position. |
UIContainer |
getAttachedContainer()
Gets the attached container for this
UITabGroup . |
GuiIcon |
getIcons()
Gets the icons for this
UITabGroup |
int |
getOffset()
Gets the offset for this
UITabGroup . |
int |
getSpacing()
Gets the spacing for this
UITabGroup . |
ComponentPosition |
getTabPosition()
Gets the relative position of the tabs around their containers.
|
int |
screenX()
Gets the X coordinate of this
UIComponent relative to the screen. |
int |
screenY()
Gets the Y coordinate of this
UIComponent relative to the screen. |
void |
setActiveTab(UITab tab)
Activates the
UITab and deactivates currently active one. |
UITabGroup |
setOffset(int offset)
Sets the offset for this
UITabGroup . |
UITabGroup |
setSpacing(int spacing)
Sets the spacing for this
UITabGroup . |
add, calculateContentSize, componentX, componentY, drawBackground, drawForeground, getClipArea, getComponentAt, getContentHeight, getContentWidth, getHorizontalPadding, getOffsetX, getOffsetY, getScrollStep, getTitle, getVerticalPadding, onAddedToScreen, onClose, onComponentSpaceChange, onComponentStateChange, onContentUpdate, remove, removeAll, setClipContent, setDisabled, setOffsetX, setOffsetY, setPadding, setTitle, setVisible, shouldClipContent
addControlComponent, draw, fireEvent, getAlpha, getAnchor, getGui, getHeight, getName, getParent, getPropertyString, getRawHeight, getRawWidth, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onButtonPress, onButtonRelease, onClick, onDoubleClick, onDrag, onKeyTyped, onMouseMove, onRightClick, onScrollWheel, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, setAlpha, setAnchor, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setZIndex, toString, unregister
protected java.util.Map<UITab,UIContainer> listTabs
UITab
added to this UITabGroup
.protected ComponentPosition tabPosition
UITabGroup
relative to its attachedContainer
.protected UIContainer attachedContainer
UIContainer
this UITabGroup
is attached to.protected int offset
UITabGroup
is offset to the border of the attachedContainer
.protected int spacing
protected GuiIcon[] windowIcons
UITabGroup
is attached to a UIWindow
.protected GuiIcon[] panelIcons
UITabGroup
is attached to a UIPanel
.public UITabGroup(MalisisGui gui, ComponentPosition tabPosition)
UITabGroup
.gui
- the guitabPosition
- the tab positionpublic UITabGroup(MalisisGui gui)
UITabGroup
.gui
- the guipublic ComponentPosition getTabPosition()
public GuiIcon getIcons()
UITabGroup
public UIContainer getAttachedContainer()
UITabGroup
.public int getOffset()
UITabGroup
.public UITabGroup setOffset(int offset)
UITabGroup
.offset
- the offsetUITabGroup
public int getSpacing()
UITabGroup
.public UITabGroup setSpacing(int spacing)
UITabGroup
.spacing
- the spacingUITabGroup
public UITab addTab(UITab tab, UIContainer container)
UITab
and its corresponding UIContainer
to this UITabGroup
.UITabGroup
.tab
- tab to add to the UITabGroupcontainer
- UIContainer
linked to the UITab
UITab
protected void calculateTabPosition()
public void setActiveTab(UITab tab)
UITab
and deactivates currently active one.tab
- the new active tabpublic UITabGroup attachTo(UIContainer container, boolean displace)
UITabGroup
to a UIContainer
.container
- the container to attach to.displace
- if true, moves and resize the UIContainer to make place for the UITabGroupUITab
public int screenX()
UIComponent
UIComponent
relative to the screen.screenX
in interface IClipable
screenX
in class UIComponent<UITabGroup>
public int screenY()
UIComponent
UIComponent
relative to the screen.screenY
in interface IClipable
screenY
in class UIComponent<UITabGroup>