public interface Screen extends Context
Modifier and Type | Method and Description |
---|---|
void |
addKeyListener(InputDeviceKeyListener listener)
Add a key listener.
|
void |
addListener(ScreenListener listener)
Add a screen listener.
|
void |
awaitReady()
Wait until screen get ready.
|
void |
dispose()
Close main frame.
|
Graphic |
getGraphic()
Get current graphic.
|
long |
getReadyTimeOut()
Get the maximum time in milliseconds for screen to be ready.
|
void |
hideCursor()
Hide window mouse pointer.
|
boolean |
isReady()
Check if screen is ready.
|
void |
onSourceChanged(Resolution source)
Call when resolution source has been changed.
|
void |
preUpdate()
Pre update, specially called before the main
update() in order to prepare it if necessary. |
void |
removeListener(ScreenListener listener)
Remove a screen listener.
|
void |
requestFocus()
Give focus to screen.
|
void |
setIcon(String filename)
Set icon from file.
|
void |
showCursor()
Show window mouse pointer.
|
void |
start()
Start the main frame if has.
|
void |
update()
Must be called when all rendering are done.
|
getConfig, getInputDevice, getX, getY
void start()
void awaitReady()
LionEngineException
- If screen not ready before time out.void preUpdate()
update()
in order to prepare it if necessary.void update()
void dispose()
void requestFocus()
void hideCursor()
void showCursor()
void addListener(ScreenListener listener)
listener
- The screen listener to add.void removeListener(ScreenListener listener)
listener
- The screen listener to remove.void addKeyListener(InputDeviceKeyListener listener)
listener
- The listener to add.void setIcon(String filename)
filename
- The icon file name.Graphic getGraphic()
long getReadyTimeOut()
boolean isReady()
true
if ready, false
else.void onSourceChanged(Resolution source)
source
- The new resolution source.Copyright © 2017 Byron 3D Games Studio. All rights reserved.