public class UICheckBox extends UIComponent<UICheckBox> implements IGuiText<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 MalisisFont |
font
The
MalisisFont to use for this UICheckBox. |
protected FontRenderOptions |
fro
The
FontRenderOptions to use for this UICheckBox. |
| Constructor and Description |
|---|
UICheckBox(MalisisGui gui) |
UICheckBox(MalisisGui gui,
java.lang.String text) |
| 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. |
MalisisFont |
getFont()
Gets the
MalisisFont. |
FontRenderOptions |
getFontRenderOptions()
Gets the
FontRenderOptions. |
java.lang.String |
getPropertyString()
Gets the property string.
|
java.lang.String |
getText()
Gets the text for this
UICheckBox. |
boolean |
isChecked()
Checks if this
UICheckBox is checked. |
boolean |
onClick(int x,
int y)
On click.
|
boolean |
onKeyTyped(char keyChar,
int keyCode)
Called when a key is typed inside
MalisisGui. |
UICheckBox |
setChecked(boolean checked)
Sets the state for this
UICheckBox. |
UICheckBox |
setFont(MalisisFont font)
Sets the
MalisisFont. |
UICheckBox |
setFontRenderOptions(FontRenderOptions fro)
Sets the
FontRenderOptions. |
UICheckBox |
setText(java.lang.String text)
Sets the text for this
UICheckBox. |
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, onMouseMove, onRightClick, onScrollWheel, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, self, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, toString, unregisterprotected MalisisFont font
MalisisFont to use for this UICheckBox.protected FontRenderOptions fro
FontRenderOptions to use for this UICheckBox.public UICheckBox(MalisisGui gui, java.lang.String text)
public UICheckBox(MalisisGui gui)
public MalisisFont getFont()
IGuiTextMalisisFont.getFont in interface IGuiText<UICheckBox>public UICheckBox setFont(MalisisFont font)
IGuiTextMalisisFont.setFont in interface IGuiText<UICheckBox>font - the new fontpublic FontRenderOptions getFontRenderOptions()
IGuiTextFontRenderOptions.getFontRenderOptions in interface IGuiText<UICheckBox>public UICheckBox setFontRenderOptions(FontRenderOptions fro)
IGuiTextFontRenderOptions.setFontRenderOptions in interface IGuiText<UICheckBox>fro - the fropublic UICheckBox setText(java.lang.String text)
UICheckBox.text - the new textpublic java.lang.String getText()
UICheckBox.public boolean isChecked()
UICheckBox is checked.UICheckBox is checked or not.public UICheckBox setChecked(boolean checked)
UICheckBox. Does not fire UICheckBox.CheckEvent.checked - true if checkedUIComponentpublic boolean onClick(int x,
int y)
UIComponentonClick in class UIComponent<UICheckBox>x - the xy - the ypublic boolean onKeyTyped(char keyChar,
int keyCode)
IKeyListenerMalisisGui.onKeyTyped in interface IKeyListeneronKeyTyped in class UIComponent<UICheckBox>keyChar - the key charkeyCode - the key codepublic 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 java.lang.String getPropertyString()
UIComponentgetPropertyString in class UIComponent<UICheckBox>