public abstract class AbstractController extends Object implements Controller, NiftyControl
| Constructor and Description |
|---|
AbstractController() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bind(Element element) |
void |
disable()
Disable the control.
|
void |
enable()
Enable the control.
|
Element |
getElement()
Get the attached internal Nifty element for this Nifty control.
|
int |
getHeight()
Get height as SizeValue.
|
String |
getId()
Get the id.
|
String |
getStyle()
Get current style.
|
int |
getWidth()
Get width as SizeValue.
|
boolean |
hasFocus()
Returns true if this control has the focus.
|
void |
init(Properties parameter,
Attributes controlDefinitionAttributes)
Init the Controller.
|
boolean |
isBound()
Returns true when this NiftyControl is already bound (e.g. its Controllers bind() method has
been called).
|
boolean |
isEnabled()
Get the current enabled state of the control.
|
void |
layoutCallback()
This method is called after the element this control is attached too has been layouted.
|
void |
onFocus(boolean getFocus)
This controller gets the focus.
|
void |
setEnabled(boolean enabled)
Set the enabled state from the given boolean.
|
void |
setFocus()
Set the focus to this control.
|
void |
setFocusable(boolean focusable)
Change if this control is focusable (if it can get the focus or not).
|
void |
setHeight(SizeValue height)
Set Height as SizeValue.
|
void |
setId(String id)
Set the id.
|
void |
setStyle(String style)
Set style.
|
void |
setWidth(SizeValue width)
Set width as SizeValue.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbind, inputEvent, onStartScreenprotected void bind(Element element)
public void init(Properties parameter, Attributes controlDefinitionAttributes)
Controllerinit in interface Controllerpublic Element getElement()
NiftyControlgetElement in interface NiftyControlpublic void enable()
NiftyControlenable in interface NiftyControlpublic void disable()
NiftyControldisable in interface NiftyControlpublic void setEnabled(boolean enabled)
NiftyControlsetEnabled in interface NiftyControlenabled - the new enabled statepublic boolean isEnabled()
NiftyControlisEnabled in interface NiftyControlpublic String getId()
NiftyControlgetId in interface NiftyControlpublic void setId(String id)
NiftyControlsetId in interface NiftyControlid - new idpublic int getWidth()
NiftyControlgetWidth in interface NiftyControlpublic void setWidth(SizeValue width)
NiftyControlsetWidth in interface NiftyControlwidth - widthpublic int getHeight()
NiftyControlgetHeight in interface NiftyControlpublic void setHeight(SizeValue height)
NiftyControlsetHeight in interface NiftyControlheight - new heightpublic String getStyle()
NiftyControlgetStyle in interface NiftyControlpublic void setStyle(String style)
NiftyControlsetStyle in interface NiftyControlstyle - new style to applypublic void setFocus()
NiftyControlsetFocus in interface NiftyControlpublic void setFocusable(boolean focusable)
NiftyControlsetFocusable in interface NiftyControlfocusable - true when this element can get the focus and false when notpublic void onFocus(boolean getFocus)
ControlleronFocus in interface ControllergetFocus - get focus (true) or loose focus (false)public boolean hasFocus()
NiftyControlhasFocus in interface NiftyControlpublic void layoutCallback()
NiftyControllayoutCallback in interface NiftyControlpublic boolean isBound()
NiftyControlisBound in interface NiftyControlCopyright © 2013. All Rights Reserved.