org.jrabbit.base.managers.window.controllers
Class DesktopWindowController

java.lang.Object
  extended by org.jrabbit.base.managers.window.controllers.WindowController
      extended by org.jrabbit.base.managers.window.controllers.BaseWindowController
          extended by org.jrabbit.base.managers.window.controllers.DesktopWindowController
All Implemented Interfaces:
Createable, DataController, Destroyable, Dimensioned, Viewer, VectorTransform

public class DesktopWindowController
extends BaseWindowController

A DesktopWindowController is the default WindowController for, obviously, games running on the desktop of computers. This is the optimal situation in terms of Display management, for the Display is in its own window and has total control over itself. This being the case, DesktopWindowController is basically identical to BaseWindowController. The default starting mode for the Display is in high-res fullscreen, but this can be changed via the constructor.

Author:
Chris Molini

Field Summary
protected  boolean startFullscreen
          Whether or not to start in fullscreen mode.
protected  int startHeight
          The initial height of the Display.
protected  int startSceneHeight
          The initial height of the Display.
protected  int startSceneWidth
          The initial width of the Display.
protected  int startWidth
          The initial width of the Display.
 
Fields inherited from class org.jrabbit.base.managers.window.controllers.BaseWindowController
displayHeight, displayWidth, embedded, embedOffsetX, embedOffsetY, fullSceneHeight, fullSceneWidth, sceneMultX, sceneMultY, sceneOffsetX, sceneOffsetY
 
Fields inherited from class org.jrabbit.base.managers.window.controllers.WindowController
sceneHeight, sceneWidth
 
Constructor Summary
DesktopWindowController()
          Creates a new DesktopWindowController that initializes the Display in high-res fullscreen.
DesktopWindowController(int width, int height)
          Creates a new DesktopWindowController that initializes the Display in windowed mode.
DesktopWindowController(int width, int height, boolean fullscreen)
          Creates a new DesktopWindowController that initializes the Display in either fullscreen or windowed mode.
DesktopWindowController(int width, int height, int sceneWidth, int sceneHeight, boolean fullscreen)
          Creates a new DesktopWindowController that initializes the Display in either fullscreen or windowed mode and renders the specified area.
 
Method Summary
 void create()
          Initializes the Display in the DisplayMode indicated in the constructor of this DesktopWindowController.
 
Methods inherited from class org.jrabbit.base.managers.window.controllers.BaseWindowController
destroy, embedded, resolveEmbedRequest, resolveFullscreenRequest, resolveWindowRequest, setView, transform, unembed
 
Methods inherited from class org.jrabbit.base.managers.window.controllers.WindowController
adjustHeight, adjustWidth, beginRender, embed, embed, endRender, height, isDisplaySetTo, setFullscreen, setFullscreen, setFullscreen, setWindowed, valid, views, width
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startWidth

protected int startWidth
The initial width of the Display.


startHeight

protected int startHeight
The initial height of the Display.


startSceneWidth

protected int startSceneWidth
The initial width of the Display.


startSceneHeight

protected int startSceneHeight
The initial height of the Display.


startFullscreen

protected boolean startFullscreen
Whether or not to start in fullscreen mode.

Constructor Detail

DesktopWindowController

public DesktopWindowController()
Creates a new DesktopWindowController that initializes the Display in high-res fullscreen.


DesktopWindowController

public DesktopWindowController(int width,
                               int height)
Creates a new DesktopWindowController that initializes the Display in windowed mode.

Parameters:
width - The width of the window to use.
height - The height of the window to use.

DesktopWindowController

public DesktopWindowController(int width,
                               int height,
                               boolean fullscreen)
Creates a new DesktopWindowController that initializes the Display in either fullscreen or windowed mode.

Parameters:
width - The width of the window to use.
height - The height of the window to use.
fullscreen - Whether or not the Display should start in fullscreen mode.

DesktopWindowController

public DesktopWindowController(int width,
                               int height,
                               int sceneWidth,
                               int sceneHeight,
                               boolean fullscreen)
Creates a new DesktopWindowController that initializes the Display in either fullscreen or windowed mode and renders the specified area.

Parameters:
width - The width of the window to use.
height - The height of the window to use.
sceneWidth - The width of the scene to render.
sceneHeight - The height of the scene to render.
fullscreen - Whether or not the Display should start in fullscreen mode.
Method Detail

create

public void create()
Initializes the Display in the DisplayMode indicated in the constructor of this DesktopWindowController.