NiftyControlButtonControlpublic interface Button extends NiftyControl
| Modifier and Type | Method | Description |
|---|---|---|
void |
activate() |
Activate/Click this button.
|
RenderFont |
getFont() |
Get the current Font of the button text.
|
java.lang.String |
getText() |
Get the current text the button shows.
|
Color |
getTextColor() |
Get the text color of the Button Text.
|
HorizontalAlign |
getTextHAlign() |
Get the Horizontal Align of the Button text.
|
int |
getTextHeight() |
Get the height of the text.
|
VerticalAlign |
getTextVAlign() |
Get the Vertical Align of the Button text.
|
int |
getTextWidth() |
Get the width of the text.
|
void |
setFont(RenderFont fontParam) |
Set the Font of the button text.
|
void |
setText(java.lang.String text) |
Set the current text the button shows.
|
void |
setTextColor(Color newColor) |
Set the text color of the Button Text.
|
void |
setTextHAlign(HorizontalAlign newTextHAlign) |
Set the Horizontal Align of the Button text.
|
void |
setTextVAlign(VerticalAlign newTextVAlign) |
Set the Vertical Align of the Button text.
|
disable, enable, getElement, getHeight, getId, getStyle, getWidth, hasFocus, isBound, isEnabled, layoutCallback, setEnabled, setFocus, setFocusable, setHeight, setId, setStyle, setWidthvoid activate()
@Nonnull java.lang.String getText()
void setText(@Nonnull
java.lang.String text)
text - new text to showint getTextWidth()
int getTextHeight()
@Nullable RenderFont getFont()
void setFont(@Nullable
RenderFont fontParam)
fontParam - new font or null to use the default font@Nonnull VerticalAlign getTextVAlign()
void setTextVAlign(@Nonnull
VerticalAlign newTextVAlign)
newTextVAlign - VerticalAlign@Nonnull HorizontalAlign getTextHAlign()
void setTextHAlign(@Nonnull
HorizontalAlign newTextHAlign)
newTextHAlign - HorizontalAlign@Nonnull Color getTextColor()
void setTextColor(@Nonnull
Color newColor)
newColor - new Color for the button textCopyright © 2018. All rights reserved.