public class UICheckBox extends UIComponent<UICheckBox>
| Modifier and Type | Class and Description |
|---|---|
static class |
UICheckBox.CheckEvent
Event fired when a
UICheckBox is checked or unchecked. |
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 GuiIcon |
bgIcon |
protected GuiIcon |
bgIconDisabled |
protected GuiIcon |
cbChecked |
protected GuiIcon |
cbDisabled |
protected GuiIcon |
cbHovered |
| Constructor and Description |
|---|
UICheckBox(MalisisGui gui) |
UICheckBox(MalisisGui gui,
java.lang.String label) |
| 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. |
boolean |
isChecked() |
void |
onButtonRelease(MouseEvent.Release event) |
void |
onKeyTyped(KeyboardEvent event) |
UICheckBox |
setChecked(boolean checked)
Sets the state for this
UICheckBox. |
java.lang.String |
toString() |
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, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, unregisterprotected GuiIcon bgIcon
protected GuiIcon bgIconDisabled
protected GuiIcon cbDisabled
protected GuiIcon cbChecked
protected GuiIcon cbHovered
public UICheckBox(MalisisGui gui, java.lang.String label)
public UICheckBox(MalisisGui gui)
public boolean isChecked()
UICheckBox is checked or not.public UICheckBox setChecked(boolean checked)
UICheckBox. Does not fire CheckEvent.checked - true if checkedUIComponentpublic void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponentUIComponent.drawBackground in class UIComponent<UICheckBox>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<UICheckBox>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void onButtonRelease(MouseEvent.Release event)
public void onKeyTyped(KeyboardEvent event)
public java.lang.String toString()
toString in class UIComponent<UICheckBox>