ContainerChild, Element, be.yildizgames.common.util.Registerable, WidgetSimpleButtonpublic interface Button extends Widget, ContainerChild
Element.Alignment| Modifier and Type | Method | Description |
|---|---|---|
void |
addMouseLeftClickListener(MouseLeftClickListener l) |
Add a new MouseClickListener on this widget.
|
void |
addMouseMoveListener(MouseMoveListener l) |
Add a new MouseMoveListener on this widget.
|
void |
addOnMouseOverListener(OnMouseOverListener l) |
Add a new OnMouseOverListener on this widget.
|
boolean |
contains(MousePosition position) |
Check if a point in contained in this container.
|
void |
desactivate() |
The button will no longer be clickable nor highlitable.
|
Font |
getCaptionFont() |
|
PositionRelativeLeft |
getCaptionHorizontalAlignment() |
|
int |
getCaptionHorizontalPadding() |
|
PositionRelativeTop |
getCaptionVerticalAlignment() |
|
int |
getCaptionVerticalPadding() |
|
Material |
getHighlightMaterial() |
|
Font |
getInactiveFont() |
|
Material |
getInactiveMaterial() |
|
Material |
getMaterial() |
|
void |
highlight(boolean contains) |
|
void |
mouseLeftClick(MousePosition position) |
|
void |
reactivate() |
Reactive the button if it has been disabled.
|
void |
setCaptionFont(Font font) |
Change the font for the button text.
|
Button |
setCaptionText(be.yildizgames.common.client.translation.Key text) |
|
Button |
setCaptionText(String text) |
|
void |
setCaptionTextLeftAlignment(PositionRelativeLeft alignment) |
Set the caption horizontal alignment.
|
void |
setCaptionTextLeftAlignment(PositionRelativeLeft alignment,
int diff) |
Set the caption horizontal alignment.
|
void |
setCaptionTextTopAlignment(PositionRelativeTop alignment) |
Set the caption vertical alignment.
|
void |
setCaptionTextTopAlignment(PositionRelativeTop alignment,
int diff) |
Set the caption vertical alignment.
|
void |
setData(ButtonData data) |
Replace all existing data for this button by new one.
|
void |
setFocusable(boolean b) |
|
void |
setInactiveMaterial(Material material) |
Set a material for the button when in inactive state.
|
void |
setMaterial(ButtonMaterial material) |
Change the button materials.
|
void |
setMaterial(Material m) |
|
void |
setPushedMaterial(Material pushed) |
detachFromParent, 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, showaddEmptyZone, addKeyboardListener, addMouseDoubleLeftClickListener, addMouseDragListener, addMouseReleaseListener, addMouseWheelListener, addSpecialKeyListener, align, contains, focus, getAbsoluteLeft, getAbsoluteTop, isFocusable, playAnimation, registerAnimation, removeAllClickListeners, stopAnimationButton setCaptionText(be.yildizgames.common.client.translation.Key text)
Font getCaptionFont()
void setCaptionFont(Font font)
font - New font to use.void setMaterial(ButtonMaterial material)
material - Background, highlight and inactive material data.Material getMaterial()
void setMaterial(Material m)
Material getHighlightMaterial()
void addOnMouseOverListener(OnMouseOverListener l)
WidgetaddOnMouseOverListener in interface Widgetl - Listener to add.void addMouseMoveListener(MouseMoveListener l)
WidgetaddMouseMoveListener in interface Widgetl - Listener to add.void addMouseLeftClickListener(MouseLeftClickListener l)
WidgetaddMouseLeftClickListener in interface Widgetl - Listener to add.void mouseLeftClick(MousePosition position)
boolean contains(MousePosition position)
Widgetvoid setData(ButtonData data)
data - New data for this button.void desactivate()
void reactivate()
void setFocusable(boolean b)
void setCaptionTextLeftAlignment(PositionRelativeLeft alignment, int diff)
alignment - Caption alignment.diff - Offset in pixels.void setCaptionTextLeftAlignment(PositionRelativeLeft alignment)
alignment - Caption alignment.void setCaptionTextTopAlignment(PositionRelativeTop alignment)
alignment - Caption alignment.void setCaptionTextTopAlignment(PositionRelativeTop alignment, int diff)
alignment - Caption alignment.diff - Offset in pixels.Material getInactiveMaterial()
Font getInactiveFont()
void setInactiveMaterial(Material material)
material - Material to use in inactive state.PositionRelativeLeft getCaptionHorizontalAlignment()
int getCaptionHorizontalPadding()
PositionRelativeTop getCaptionVerticalAlignment()
int getCaptionVerticalPadding()
void setPushedMaterial(Material pushed)
Copyright © 2014–2018. All rights reserved.