be.yildizgames.common.util.Registerable, ContainerChild, Element, TextLine, Widgetpublic final class SimpleTextLine extends BaseContainerChild implements TextLine
Element.AlignmentTextLine.TextPositionMAX_OPACITY, virtualHeightemptyZones| Constructor | Description |
|---|---|
SimpleTextLine(String name,
AbstractTextElement textElement,
SimpleContainer container) |
Build a new GuiTextLine, this widget allow to build a single line text
element(multi line is possible through the use of \n character but no
automatic end of line mechanism is provided, see TextAreaGui widget for
this).
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
delete() |
Delete the widget.
|
String |
getContent() |
|
protected void |
hideImpl() |
Implementation to set the widget invisible.
|
protected void |
highlightImpl(boolean over) |
Does nothing, not highlightable.
|
SimpleTextLine |
setColor(Color color) |
Set a new color to this text.
|
void |
setFont(Font font) |
Set the text font.
|
protected Element |
setPositionImpl(int left,
int top) |
Implementation to update the widget position.
|
protected void |
setSizeImpl(int width,
int height) |
Implementation to set the widget size.
|
SimpleTextLine |
setText(int message) |
Set the text to print.
|
SimpleTextLine |
setText(be.yildizgames.common.client.translation.Key key) |
|
SimpleTextLine |
setText(be.yildizgames.common.client.translation.Key.MultiKey key) |
|
SimpleTextLine |
setText(String message) |
Set the text to print.
|
SimpleTextLine |
setTextPosition(TextLine.TextPosition textPosition) |
Set the text alignment.
|
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 SimpleTextLine(String name, AbstractTextElement textElement, SimpleContainer container)
name - Text line name, must be unique.textElement - TextElement to use to print the text.container - Container holding the text line.public SimpleTextLine setText(String message)
TextLinepublic SimpleTextLine setText(be.yildizgames.common.client.translation.Key key)
public SimpleTextLine setText(be.yildizgames.common.client.translation.Key.MultiKey key)
public SimpleTextLine setText(int message)
TextLinepublic void setFont(Font font)
TextLinepublic void delete()
BaseElementdelete in class BaseElementprotected void highlightImpl(boolean over)
highlightImpl in class BaseWidgetover - Unused.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 left, int top)
BaseElementsetPositionImpl in class BaseElementleft - New widget x position.top - New widget y position.public SimpleTextLine setColor(Color color)
TextLinepublic SimpleTextLine setTextPosition(TextLine.TextPosition textPosition)
TextLinesetTextPosition in interface TextLinetextPosition - Text alignment.public String getContent()
getContent in interface TextLineCopyright © 2014–2018. All rights reserved.