Interface InputBox
-
- All Superinterfaces:
ContainerChild,Element,be.yildizgames.common.util.Registerable,Widget
public interface InputBox extends Widget, ContainerChild
- Author:
- Grégory Van den Borre
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface be.yildizgames.module.graphic.gui.internal.Element
Element.Alignment
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteText()Delete all the current contained text.StringgetText()voidremoveChar()Remove the last char of the current contained text.voidsetCaptionText(be.yildizgames.common.client.translation.TranslationKey caption)voidsetCaptionText(String caption)Set the caption text.InputBoxsetDefaultMessage(be.yildizgames.common.client.translation.TranslationKey message)InputBoxsetDefaultMessage(String message)voidsetFont(Font font)Set the font to use for the inner text and for the caption.InputBoxsetMaterial(Material material)Set the box background material.InputBoxsetPassword()All characters written in the box will be hidden and replaced by the replacement character(default is '*').voidsetPasswordReplacement(char replacement)Change the password replacement char by another, default is '*'.InputBoxsetText(be.yildizgames.common.client.translation.TranslationKey text)InputBoxsetText(String text)Set the text to print in the box.InputBoxsetTextAlignment(PositionRelativeLeft left, PositionRelativeTop top)Set the text position relative to the input box.InputBoxsetTextCenter()Align the text.-
Methods inherited from interface be.yildizgames.module.graphic.gui.ContainerChild
detachFromParent, getParent, setLeftFromParent, setLeftFromParent, setTopFromParent, setTopFromParent, updateAddPositionValue, updateSizeAfterZoom
-
Methods inherited from interface be.yildizgames.module.graphic.gui.internal.Element
addToLeft, addToPosition, addToTop, getBottom, getCoordinates, getHeight, getLeft, getRight, getTop, getWidth, hide, isVisible, resetVirtualHeight, setCoordinates, setHeight, setLeft, setLeft, setLeft, setLeft, setPosition, setPosition, setSize, setSize, setTop, setTop, setTop, setTop, setVirtualHeight, setVisible, setWidth, show
-
Methods inherited from interface be.yildizgames.module.graphic.gui.Widget
addEmptyZone, addKeyboardListener, addMouseDoubleLeftClickListener, addMouseDragListener, addMouseLeftClickListener, addMouseMoveListener, addMouseReleaseListener, addMouseRightClickListener, addMouseWheelListener, addOnMouseOverListener, align, contains, contains, focus, getAbsoluteLeft, getAbsoluteTop, highlight, isFocusable, playAnimation, registerAnimation, removeAllClickListeners, stopAnimation
-
-
-
-
Method Detail
-
setDefaultMessage
InputBox setDefaultMessage(be.yildizgames.common.client.translation.TranslationKey message)
-
setPassword
InputBox setPassword()
All characters written in the box will be hidden and replaced by the replacement character(default is '*').- Returns:
- This object for chaining.
-
setMaterial
InputBox setMaterial(Material material)
Set the box background material.- Parameters:
material- Material to use as background.- Returns:
- This object for chaining.
-
setTextAlignment
InputBox setTextAlignment(PositionRelativeLeft left, PositionRelativeTop top)
Set the text position relative to the input box.- Parameters:
left- Left relative position.top- Top relative position.- Returns:
- This object for chaining.
-
setFont
void setFont(Font font)
Set the font to use for the inner text and for the caption.- Parameters:
font- Font to use.
-
setPasswordReplacement
void setPasswordReplacement(char replacement)
Change the password replacement char by another, default is '*'.- Parameters:
replacement- New char to use in password boxes.
-
getText
String getText()
- Returns:
- The current contained text.
-
setText
InputBox setText(String text)
Set the text to print in the box.- Parameters:
text- Text to set.- Returns:
- This object for chaining.
-
setText
InputBox setText(be.yildizgames.common.client.translation.TranslationKey text)
-
setCaptionText
void setCaptionText(String caption)
Set the caption text.- Parameters:
caption- Text to set for the caption.
-
setCaptionText
void setCaptionText(be.yildizgames.common.client.translation.TranslationKey caption)
-
deleteText
void deleteText()
Delete all the current contained text.
-
setTextCenter
InputBox setTextCenter()
Align the text.- Returns:
- This object for chaining.
-
removeChar
void removeChar()
Remove the last char of the current contained text.
-
-