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.
|
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, wait
bind, inputEvent, onStartScreen
protected void bind(Element element)
public void init(Properties parameter, Attributes controlDefinitionAttributes)
Controller
init
in interface Controller
public Element getElement()
NiftyControl
getElement
in interface NiftyControl
public void enable()
NiftyControl
enable
in interface NiftyControl
public void disable()
NiftyControl
disable
in interface NiftyControl
public void setEnabled(boolean enabled)
NiftyControl
setEnabled
in interface NiftyControl
enabled
- the new enabled statepublic boolean isEnabled()
NiftyControl
isEnabled
in interface NiftyControl
public String getId()
NiftyControl
getId
in interface NiftyControl
public void setId(String id)
NiftyControl
setId
in interface NiftyControl
id
- new idpublic int getWidth()
NiftyControl
getWidth
in interface NiftyControl
public void setWidth(SizeValue width)
NiftyControl
setWidth
in interface NiftyControl
width
- widthpublic int getHeight()
NiftyControl
getHeight
in interface NiftyControl
public void setHeight(SizeValue height)
NiftyControl
setHeight
in interface NiftyControl
height
- new heightpublic String getStyle()
NiftyControl
getStyle
in interface NiftyControl
public void setStyle(String style)
NiftyControl
setStyle
in interface NiftyControl
style
- new style to applypublic void setFocus()
NiftyControl
setFocus
in interface NiftyControl
public void setFocusable(boolean focusable)
NiftyControl
setFocusable
in interface NiftyControl
focusable
- true when this element can get the focus and false when notpublic void onFocus(boolean getFocus)
Controller
onFocus
in interface Controller
getFocus
- get focus (true) or loose focus (false)public boolean hasFocus()
NiftyControl
hasFocus
in interface NiftyControl
public void layoutCallback()
NiftyControl
layoutCallback
in interface NiftyControl
public boolean isBound()
NiftyControl
isBound
in interface NiftyControl
Copyright © 2013. All Rights Reserved.