|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.newdawn.slick.GameContainer
org.newdawn.slick.AppletGameContainer.Container
public class AppletGameContainer.Container
A game container to provide the applet context
| Field Summary |
|---|
| Fields inherited from class org.newdawn.slick.GameContainer |
|---|
alwaysRender, clearEachFrame, forceExit, fps, game, GL, height, input, lastFPS, lastFrame, lastGame, maximumLogicInterval, minimumLogicInterval, paused, recordedFPS, running, samples, SHARED_DRAWABLE, smoothDeltas, stencil, storedDelta, supportsMultiSample, targetFPS, vsync, width |
| Constructor Summary | |
|---|---|
AppletGameContainer.Container(Game game)
Create a new container wrapped round the game |
|
| Method Summary | |
|---|---|
java.applet.Applet |
getApplet()
Returns the Applet Object |
int |
getScreenHeight()
Get the height of the standard screen resolution |
int |
getScreenWidth()
Get the width of the standard screen resolution |
boolean |
hasFocus()
Check if the game currently has focus |
void |
initApplet()
Initiliase based on Applet init |
boolean |
isFullscreen()
Check if the display is in fullscreen mode |
boolean |
isMouseGrabbed()
Check if the mouse cursor is current grabbed. |
boolean |
isRunning()
Check if the applet is currently running |
void |
runloop()
The running game loop |
void |
setDefaultMouseCursor()
Set the default mouse cursor - i.e. |
void |
setFullscreen(boolean fullscreen)
Indicate whether we want to be in fullscreen mode. |
void |
setIcon(java.lang.String ref)
Set the icon to be displayed if possible in this type of container |
void |
setIcons(java.lang.String[] refs)
Set the icons to be used for this application. |
void |
setMouseCursor(org.lwjgl.input.Cursor cursor,
int hotSpotX,
int hotSpotY)
Set the mouse cursor to be displayed - this is a hardware cursor and hence shouldn't have any impact on FPS. |
void |
setMouseCursor(ImageData data,
int hotSpotX,
int hotSpotY)
Set the mouse cursor to be displayed - this is a hardware cursor and hence shouldn't have any impact on FPS. |
void |
setMouseCursor(Image image,
int hotSpotX,
int hotSpotY)
Set the mouse cursor based on the contents of the image. |
void |
setMouseCursor(java.lang.String ref,
int hotSpotX,
int hotSpotY)
Set the mouse cursor to be displayed - this is a hardware cursor and hence shouldn't have any impact on FPS. |
void |
setMouseGrabbed(boolean grabbed)
Indicate whether mouse cursor should be grabbed or not |
void |
stopApplet()
Stop the applet play back |
boolean |
supportsAlphaInBackBuffer()
Check if the display created supported alpha in the back buffer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AppletGameContainer.Container(Game game)
game - The game to be held in this container| Method Detail |
|---|
public void initApplet()
throws SlickException
SlickException - Indicates a failure to inialise the basic frameworkpublic boolean isRunning()
public void stopApplet()
public int getScreenHeight()
GameContainer
getScreenHeight in interface GUIContextgetScreenHeight in class GameContainerGameContainer.getScreenHeight()public int getScreenWidth()
GameContainer
getScreenWidth in interface GUIContextgetScreenWidth in class GameContainerGameContainer.getScreenWidth()public boolean supportsAlphaInBackBuffer()
public boolean hasFocus()
GameContainer
hasFocus in class GameContainerGameContainer.hasFocus()public java.applet.Applet getApplet()
public void setIcon(java.lang.String ref)
throws SlickException
GameContainer
setIcon in class GameContainerref - The reference to the icon to be displayed
SlickException - Indicates a failure to load the iconGameContainer.setIcon(java.lang.String)public void setMouseGrabbed(boolean grabbed)
GameContainer
setMouseGrabbed in class GameContainergrabbed - True if mouse cursor should be grabbedGameContainer.setMouseGrabbed(boolean)public boolean isMouseGrabbed()
GameContainer
isMouseGrabbed in class GameContainerGameContainer.isMouseGrabbed()
public void setMouseCursor(java.lang.String ref,
int hotSpotX,
int hotSpotY)
throws SlickException
GameContainer
setMouseCursor in interface GUIContextsetMouseCursor in class GameContainerref - The location of the image to be loaded for the cursorhotSpotX - The x coordinate of the hotspot within the cursor imagehotSpotY - The y coordinate of the hotspot within the cursor image
SlickException - Indicates a failure to load the cursor image or create the hardware cursorGameContainer.setMouseCursor(java.lang.String,
int, int)
public void setMouseCursor(Image image,
int hotSpotX,
int hotSpotY)
throws SlickException
setMouseCursor in class GameContainerimage - The image to use as the cursorhotSpotX - The x coordinate of the hotspot within the cursor imagehotSpotY - The y coordinate of the hotspot within the cursor image
SlickException - Indicates a failure to load the cursor image or create the hardware cursor
public void setIcons(java.lang.String[] refs)
throws SlickException
GameContainer
setIcons in class GameContainerrefs - The reference to the icon to be displayed
SlickException - Indicates a failure to load the iconGameContainer.setIcons(java.lang.String[])
public void setMouseCursor(ImageData data,
int hotSpotX,
int hotSpotY)
throws SlickException
GameContainer
setMouseCursor in interface GUIContextsetMouseCursor in class GameContainerdata - The image data from which the cursor can be construtedhotSpotX - The x coordinate of the hotspot within the cursor imagehotSpotY - The y coordinate of the hotspot within the cursor image
SlickException - Indicates a failure to load the cursor image or create the hardware cursorGameContainer.setMouseCursor(org.newdawn.slick.opengl.ImageData, int, int)
public void setMouseCursor(org.lwjgl.input.Cursor cursor,
int hotSpotX,
int hotSpotY)
throws SlickException
GameContainer
setMouseCursor in interface GUIContextsetMouseCursor in class GameContainercursor - The cursor to usehotSpotX - The x coordinate of the hotspot within the cursor imagehotSpotY - The y coordinate of the hotspot within the cursor image
SlickException - Indicates a failure to load the cursor image or create the hardware cursorGameContainer.setMouseCursor(org.lwjgl.input.Cursor, int, int)public void setDefaultMouseCursor()
GameContainer
setDefaultMouseCursor in interface GUIContextsetDefaultMouseCursor in class GameContainerGameContainer.setDefaultMouseCursor()public boolean isFullscreen()
GameContainer
isFullscreen in class GameContainer
public void setFullscreen(boolean fullscreen)
throws SlickException
GameContainer
setFullscreen in class GameContainerfullscreen - True if we want to be in fullscreen mode
SlickException - Indicates we failed to change the display mode
public void runloop()
throws java.lang.Exception
java.lang.Exception - Indicates a failure within the game's loop rather than the framework
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||