|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.b3dgs.lionengine.core.Screen
public class Screen
Representation of the screen device, supporting fullscreen and windowed mode. Screen class uses a double buffer for any rendering. It also includes a mouse and a keyboard listener.
Keyboard
,
Mouse
Field Summary | |
---|---|
java.awt.GraphicsConfiguration |
conf
Graphic configuration reference. |
Config |
config
Configuration reference. |
java.awt.GraphicsDevice |
dev
Graphics device reference. |
Display |
display
Display reference. |
java.awt.GraphicsEnvironment |
env
Graphic environment reference. |
Initializer |
init
Initializer reference. |
Constructor Summary | |
---|---|
Screen(Initializer init,
Config config)
Create a new screen. |
Method Summary | |
---|---|
void |
addKeyboard(Keyboard keyboard)
Link keyboard to the screen (listening to). |
void |
addMouse(Mouse mouse)
Link keyboard to the screen (listening to). |
void |
dispose()
Close main frame. |
java.awt.image.BufferStrategy |
getBufferStrategy()
Get current graphic buffer. |
javax.swing.JFrame |
getFrame()
Get frame container reference. |
java.awt.Graphics2D |
getGraphics2D()
Get current graphics output (from buffer strategy). |
int |
getLocationX()
Get main frame location x. |
int |
getLocationY()
Get main frame location y. |
boolean |
getWide()
Check wide screen state. |
void |
hideCursor()
Hide window mouse pointer. |
void |
requestFocus()
Give focus to screen. |
void |
setIcon(java.lang.String filename)
Set window icon from file. |
void |
setLauncher(AbstractLauncher launcher)
Set launcher reference. |
void |
showCursor()
Show window mouse pointer. |
void |
update()
Must be called when all rendering are done. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.awt.GraphicsEnvironment env
public final java.awt.GraphicsDevice dev
public final java.awt.GraphicsConfiguration conf
public final Initializer init
public final Display display
public final Config config
Constructor Detail |
---|
public Screen(Initializer init, Config config)
init
- initializer reference.config
- config reference.Method Detail |
---|
public void setLauncher(AbstractLauncher launcher)
launcher
- launcher reference.public void update()
public void dispose()
public void addKeyboard(Keyboard keyboard)
keyboard
- keyboard reference.public void addMouse(Mouse mouse)
mouse
- mouse reference.public java.awt.image.BufferStrategy getBufferStrategy()
public java.awt.Graphics2D getGraphics2D()
public javax.swing.JFrame getFrame()
public boolean getWide()
public int getLocationX()
public int getLocationY()
public void hideCursor()
public void showCursor()
public void setIcon(java.lang.String filename)
filename
- icon file name.public void requestFocus()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |