public class AwtPanelsContext extends java.lang.Object implements JmeContext
JmeContext.Type| Modifier and Type | Field and Description |
|---|---|
protected JmeContext |
actualContext |
protected AwtPanel |
inputSource |
protected AwtKeyInput |
keyInput |
protected boolean |
lastThrottleState |
protected SystemListener |
listener |
protected AwtMouseInput |
mouseInput |
protected java.util.ArrayList<AwtPanel> |
panels |
protected AppSettings |
settings |
| Constructor and Description |
|---|
AwtPanelsContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
create(boolean waitFor)
Creates the context and makes it active.
|
AwtPanel |
createPanel(PaintMode paintMode) |
AwtPanel |
createPanel(PaintMode paintMode,
boolean srgb) |
void |
destroy(boolean waitFor)
Destroys the context completely, making it inactive.
|
JoyInput |
getJoyInput() |
KeyInput |
getKeyInput() |
MouseInput |
getMouseInput() |
Context |
getOpenCLContext() |
Renderer |
getRenderer() |
AppSettings |
getSettings() |
Timer |
getTimer() |
TouchInput |
getTouchInput() |
JmeContext.Type |
getType() |
boolean |
isCreated() |
boolean |
isRenderable() |
void |
restart()
Destroys and then re-creates the context.
|
void |
setAutoFlushFrames(boolean enabled) |
void |
setInputSource(AwtPanel panel) |
void |
setSettings(AppSettings settings) |
void |
setSystemListener(SystemListener listener)
Sets the listener that will receive events relating to context
creation, update, and destroy.
|
void |
setTitle(java.lang.String title)
Sets the title of the display (if available).
|
protected JmeContext actualContext
protected AppSettings settings
protected SystemListener listener
protected java.util.ArrayList<AwtPanel> panels
protected AwtPanel inputSource
protected AwtMouseInput mouseInput
protected AwtKeyInput keyInput
protected boolean lastThrottleState
public void setInputSource(AwtPanel panel)
public JmeContext.Type getType()
getType in interface JmeContextpublic void setSystemListener(SystemListener listener)
JmeContextsetSystemListener in interface JmeContextpublic AppSettings getSettings()
getSettings in interface JmeContextpublic Renderer getRenderer()
getRenderer in interface JmeContextpublic MouseInput getMouseInput()
getMouseInput in interface JmeContextpublic KeyInput getKeyInput()
getKeyInput in interface JmeContextpublic JoyInput getJoyInput()
getJoyInput in interface JmeContextpublic TouchInput getTouchInput()
getTouchInput in interface JmeContextpublic Timer getTimer()
getTimer in interface JmeContextpublic boolean isCreated()
isCreated in interface JmeContextpublic boolean isRenderable()
isRenderable in interface JmeContextRenderer are called
while this is false, then the result is undefined.public Context getOpenCLContext()
getOpenCLContext in interface JmeContextpublic void setSettings(AppSettings settings)
setSettings in interface JmeContextsettings - the display settings to use for the created context. If
the context has already been created, then restart() must be called
for the changes to be applied.public void create(boolean waitFor)
JmeContextcreate in interface JmeContextwaitFor - If true, will wait until context has initialized.public void destroy(boolean waitFor)
JmeContextdestroy in interface JmeContextwaitFor - If true, will wait until the context is destroyed fully.public void setTitle(java.lang.String title)
JmeContextsetTitle in interface JmeContexttitle - The new title of the display.public void setAutoFlushFrames(boolean enabled)
setAutoFlushFrames in interface JmeContextenabled - If enabled, the context will automatically flush
frames to the video card (swap buffers) after an update cycle.public void restart()
JmeContextrestart in interface JmeContext