be.yildizgames.common.util.Registerable, CheckBox, ContainerChild, Element, Widgetpublic final class SimpleCheckBox extends BaseContainerChild implements CheckBox
Element.AlignmentMAX_OPACITY, virtualHeightemptyZones| Constructor | Description |
|---|---|
SimpleCheckBox(String name,
BaseCoordinate coordinates,
AbstractIconElement backgroundImage,
Material hoverMaterial,
AbstractIconElement checkedImage,
AbstractTextElement text,
SimpleContainer container) |
Full constructor, initialize parameters and add a mouse click listener to switch checked state.
|
| Modifier and Type | Method | Description |
|---|---|---|
CheckBox |
check(boolean checkedState) |
Set the check box state.
|
void |
delete() |
Delete the widget.
|
protected void |
hideImpl() |
Implementation to set the widget invisible.
|
protected void |
highlightImpl(boolean over) |
Implementation to set the widget highlight.
|
boolean |
isChecked() |
|
CheckBox |
setCaptionColor(Color color) |
Change the caption text color.
|
SimpleCheckBox |
setCaptionText(be.yildizgames.common.client.translation.Key text) |
|
SimpleCheckBox |
setCaptionText(String text) |
Update the text associated with the check box.
|
CheckBox |
setCheckedMaterial(Material material) |
Update the check box checked material.
|
CheckBox |
setFont(Font font) |
Update the caption font.
|
SimpleCheckBox |
setMaterial(Material material) |
Update the check box background material.
|
protected Element |
setPositionImpl(int positionX,
int positionY) |
Implementation to update the widget position.
|
protected void |
setSizeImpl(int width,
int height) |
Implementation to set the widget size.
|
protected void |
showImpl() |
Implementation to set the widget visible.
|
addEmptyZoneImpl, detachFromParent, getParent, isContainer, setLeftFromParent, setLeftFromParent, setTopFromParent, setTopFromParent, setUnaffectedByZoom, updateSizeAfterZoomaddToLeft, addToPosition, addToTop, getBottom, getCoordinates, getHeight, getLeft, getOpacity, getRight, getTop, getWidth, hide, isVisible, multiplySize, resetVirtualHeight, setCoordinates, setHeight, setLeft, setLeft, setLeft, setLeft, setPosition, setPosition, setPosition, setSize, setSize, setTop, setTop, setTop, setTop, setVirtualHeight, setVisible, setWidth, show, updateAddPositionValueaddEmptyZone, addKeyboardListener, addMouseDoubleLeftClickListener, addMouseDragListener, addMouseLeftClickListener, addMouseMoveListener, addMouseReleaseListener, addMouseWheelListener, addOnMouseOverListener, addSpecialKeyListener, align, contains, contains, deleteKeyPressed, disableEmptyZone, enableEmptyZone, enterKeyPressed, findParent, focus, forceContainsFalse, getAbsoluteLeft, getAbsolutePosition, getAbsoluteTop, highlight, isFocusable, isMouseOver, keyPressed, mouseLeftClick, playAnimation, registerAnimation, removeAllClickListeners, setFocusable, setHighlightable, setMouseClickActive, setMouseOver, setStatic, stopAnimation, toStringdetachFromParent, getParent, setLeftFromParent, setLeftFromParent, setTopFromParent, setTopFromParent, updateAddPositionValue, updateSizeAfterZoomaddToLeft, addToPosition, addToTop, getBottom, getCoordinates, getHeight, getLeft, getRight, getTop, getWidth, hide, isVisible, resetVirtualHeight, setCoordinates, setHeight, setLeft, setLeft, setLeft, setLeft, setPosition, setPosition, setPosition, setSize, setSize, setTop, setTop, setTop, setTop, setVirtualHeight, setVisible, setWidth, showclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddEmptyZone, addKeyboardListener, addMouseDoubleLeftClickListener, addMouseDragListener, addMouseLeftClickListener, addMouseMoveListener, addMouseReleaseListener, addMouseWheelListener, addOnMouseOverListener, addSpecialKeyListener, align, contains, contains, focus, getAbsoluteLeft, getAbsoluteTop, highlight, isFocusable, playAnimation, registerAnimation, removeAllClickListeners, stopAnimationpublic SimpleCheckBox(String name, BaseCoordinate coordinates, AbstractIconElement backgroundImage, Material hoverMaterial, AbstractIconElement checkedImage, AbstractTextElement text, SimpleContainer container)
name - Check box name, must be unique.coordinates - Check box size and position.backgroundImage - Background for the check box.checkedImage - Background for a checked check box.text - Check box caption text.container - Container holding the check box.public SimpleCheckBox setCaptionText(String text)
CheckBoxsetCaptionText in interface CheckBoxtext - New text to set.public SimpleCheckBox setCaptionText(be.yildizgames.common.client.translation.Key text)
setCaptionText in interface CheckBoxpublic CheckBox check(boolean checkedState)
CheckBoxpublic void delete()
BaseElementdelete in class BaseElementpublic SimpleCheckBox setMaterial(Material material)
material - New material to use.public CheckBox setCheckedMaterial(Material material)
material - New material to use.public CheckBox setFont(Font font)
font - New font to use.protected void highlightImpl(boolean over)
BaseWidgethighlightImpl in class BaseWidgetover - Highlight state.protected void setSizeImpl(int width,
int height)
BaseElementsetSizeImpl in class BaseElementwidth - New width.height - New height.protected void showImpl()
BaseElementshowImpl in class BaseElementprotected void hideImpl()
BaseElementhideImpl in class BaseElementprotected Element setPositionImpl(int positionX, int positionY)
BaseElementsetPositionImpl in class BaseElementpositionX - New widget x position.positionY - New widget y position.public CheckBox setCaptionColor(Color color)
setCaptionColor in interface CheckBoxcolor - Color of the caption.Copyright © 2014–2018. All rights reserved.