public class Screen extends Object
Modifier and Type | Class and Description |
---|---|
class |
Screen.ElementWithEndNotify |
class |
Screen.InputHandlerWithMapping
InputMappingWithMapping helper.
|
Modifier and Type | Field and Description |
---|---|
int |
layoutLayersCallCount |
Constructor and Description |
---|
Screen(Nifty newNifty,
String newId,
ScreenController newScreenController,
TimeProvider newTimeProvider) |
Modifier and Type | Method and Description |
---|---|
void |
addKeyboardInputHandler(NiftyInputMapping mapping,
KeyInputHandler handler)
add a keyboard input handler.
|
void |
addLayerElement(Element layerElement) |
void |
addPopup(Element popup,
Element defaultFocusElement) |
void |
addPreKeyboardInputHandler(NiftyInputMapping mapping,
KeyInputHandler handler)
add a keyboard input handler.
|
void |
closePopup(Element popup,
EndNotify closeNotify) |
String |
debugOutput() |
String |
debugOutput(String regexpElement,
String regexpAttribute) |
void |
endScreen(EndNotify callback) |
<T extends Controller> |
findControl(String elementName,
Class<T> requestedControlClass) |
Element |
findElementByName(String name)
find an element by name.
|
<T extends NiftyControl> |
findNiftyControl(String elementName,
Class<T> requestedControlClass) |
String |
getDefaultFocusElementId() |
FocusHandler |
getFocusHandler()
get the screens focus handler.
|
List<Element> |
getLayerElements() |
String |
getMouseOverInfoString()
This returns an informational String containing all elements that Nifty is aware of that
could handle mouse events with the ones currently hovering the mouse sorted from top to
bottom.
|
Element |
getRootElement()
Get RootElement.
|
ScreenController |
getScreenController()
get current attached screen controller.
|
String |
getScreenId() |
Element |
getTopMostPopup() |
boolean |
hasDynamicElements() |
boolean |
isActivePopup(Element element) |
boolean |
isActivePopup(String id) |
boolean |
isBound() |
boolean |
isEffectActive(EffectEventId effectEventId) |
boolean |
isMouseOverElement()
Checks if the mouse currently hovers any element that is able to handle mouse events.
|
boolean |
isNull() |
boolean |
isRunning() |
boolean |
keyEvent(KeyboardInputEvent inputEvent)
keyboard event.
|
void |
layoutLayers() |
boolean |
mouseEvent(NiftyMouseInputEvent inputEvent)
Handle Mouse Events for this screen.
|
String |
outputElement(Element w,
String offset,
String regexpElement,
String regexpAttribute) |
void |
processAddAndRemoveLayerElements()
Do things when the current frame has ended.
|
void |
registerElementId(String id) |
void |
removeKeyboardInputHandler(KeyInputHandler handler) |
void |
removeLayerElement(Element layerElement) |
void |
removeLayerElement(String layerId) |
void |
removePreKeyboardInputHandler(KeyInputHandler handler) |
void |
renderLayers(NiftyRenderEngine renderDevice)
render all layers.
|
void |
resetLayout() |
void |
resetMouseDown() |
void |
setAlternateKey(String alternateKey)
set alternate key.
|
void |
setDefaultFocus() |
void |
setDefaultFocusElement(String defaultFocusElementIdParam) |
void |
setRootElement(Element rootElementParam)
Set RootElement.
|
void |
startScreen() |
void |
startScreen(EndNotify startScreenEndNotify) |
void |
unregisterElementId(String id) |
public Screen(Nifty newNifty, String newId, ScreenController newScreenController, TimeProvider newTimeProvider)
public void registerElementId(String id)
public void unregisterElementId(String id)
public String getScreenId()
public void addLayerElement(Element layerElement)
public void removeLayerElement(Element layerElement)
public void removeLayerElement(String layerId)
public void startScreen()
public void startScreen(EndNotify startScreenEndNotify)
public void endScreen(EndNotify callback)
public void layoutLayers()
public void setDefaultFocus()
public final void renderLayers(NiftyRenderEngine renderDevice)
renderDevice
- the renderDevice to usepublic void resetLayout()
public boolean mouseEvent(NiftyMouseInputEvent inputEvent)
inputEvent
- MouseInputEventpublic Element findElementByName(String name)
name
- the id to findpublic <T extends Controller> T findControl(String elementName, Class<T> requestedControlClass)
public <T extends NiftyControl> T findNiftyControl(String elementName, Class<T> requestedControlClass)
public void setAlternateKey(String alternateKey)
alternateKey
- alternate key to setpublic boolean keyEvent(KeyboardInputEvent inputEvent)
inputEvent
- keyboard eventpublic void addKeyboardInputHandler(NiftyInputMapping mapping, KeyInputHandler handler)
mapping
- mappinghandler
- new handler to addpublic void removeKeyboardInputHandler(KeyInputHandler handler)
public void addPreKeyboardInputHandler(NiftyInputMapping mapping, KeyInputHandler handler)
mapping
- mappinghandler
- new handler to addpublic void removePreKeyboardInputHandler(KeyInputHandler handler)
public String debugOutput()
public String outputElement(Element w, String offset, String regexpElement, String regexpAttribute)
public ScreenController getScreenController()
public FocusHandler getFocusHandler()
public Element getRootElement()
public void setRootElement(Element rootElementParam)
rootElementParam
- new root elementpublic void processAddAndRemoveLayerElements()
public boolean hasDynamicElements()
public void setDefaultFocusElement(String defaultFocusElementIdParam)
public String getDefaultFocusElementId()
public boolean isRunning()
public boolean isNull()
public boolean isEffectActive(EffectEventId effectEventId)
public Element getTopMostPopup()
public boolean isActivePopup(String id)
public boolean isActivePopup(Element element)
public boolean isMouseOverElement()
public String getMouseOverInfoString()
public boolean isBound()
public void resetMouseDown()
Copyright © 2013. All Rights Reserved.