|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
org.eclipse.swt.opengl.GLCanvas
com.jmex.swt.lwjgl.LWJGLSWTCanvas
public class LWJGLSWTCanvas
LWJGLCanvas
Field Summary |
---|
Fields inherited from class org.eclipse.swt.widgets.Control |
---|
view |
Constructor Summary | |
---|---|
LWJGLSWTCanvas(org.eclipse.swt.widgets.Composite parent,
int style,
org.eclipse.swt.opengl.GLData data)
|
Method Summary | |
---|---|
void |
dispose()
|
int |
getTargetSyncRate()
|
void |
init()
|
boolean |
isDirty()
|
boolean |
isDoUpdateOnly()
|
boolean |
isDrawWhenDirty()
|
boolean |
isUpdateInput()
|
void |
killGfxContext()
Destroy GFX context |
void |
makeDirty()
Force this canvas to be flagged as dirty. |
void |
render()
|
void |
setAutoKillGfxContext(boolean shouldAutoKillGfxContext)
|
void |
setDoUpdateOnly(boolean doUpdateOnly)
Use this to bypass the game task queue and other workings of canvas |
void |
setDrawWhenDirty(boolean whenDirty)
|
void |
setImplementor(JMECanvasImplementor impl)
Sets the logic/gameplay implementation for this JMECanvas |
void |
setTargetRate(int fps)
Set the desired update/redraw frequency of this canvas. |
void |
setUpdateInput(boolean doUpdate)
|
boolean |
shouldAutoKillGfxContext()
|
Methods inherited from class org.eclipse.swt.opengl.GLCanvas |
---|
getGLData, isCurrent, setCurrent, swapBuffers |
Methods inherited from class org.eclipse.swt.widgets.Canvas |
---|
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME |
Methods inherited from class org.eclipse.swt.widgets.Composite |
---|
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Control |
---|
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
Methods inherited from class org.eclipse.swt.widgets.Widget |
---|
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LWJGLSWTCanvas(org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.swt.opengl.GLData data) throws LWJGLException
LWJGLException
Method Detail |
---|
public void setImplementor(JMECanvasImplementor impl)
JMECanvas
setImplementor
in interface JMECanvas
impl
- the implementor object that will provide rendering/update
logic.public void init()
public void render()
public boolean isDoUpdateOnly()
public void setDoUpdateOnly(boolean doUpdateOnly)
doUpdateOnly
- public boolean isUpdateInput()
isUpdateInput
in interface JMECanvas
public void setUpdateInput(boolean doUpdate)
setUpdateInput
in interface JMECanvas
doUpdate
- true if the logic loop of this canvas should ask jME's input
system to "poll".public void setTargetRate(int fps)
JMECanvas
setTargetRate
in interface JMECanvas
fps
- the desired target rate in frames per secondpublic int getTargetSyncRate()
getTargetSyncRate
in interface JMECanvas
JMECanvas.setTargetRate(int)
public void setDrawWhenDirty(boolean whenDirty)
setDrawWhenDirty
in interface JMECanvas
whenDirty
- true if we should only draw if the canvas is flagged as dirty.
false if we should draw on every loop regardless of dirty
state.public boolean isDrawWhenDirty()
isDrawWhenDirty
in interface JMECanvas
public void makeDirty()
JMECanvas
JMECanvas.setDrawWhenDirty(boolean)
.
makeDirty
in interface JMECanvas
public boolean isDirty()
public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
public void setAutoKillGfxContext(boolean shouldAutoKillGfxContext)
setAutoKillGfxContext
in interface JMECanvas
shouldAutoKillGfxContext
- true(default) if the GFX Context should be destroyed
as soon as the canvas is removed from it's parent containerpublic boolean shouldAutoKillGfxContext()
shouldAutoKillGfxContext
in interface JMECanvas
public void killGfxContext()
JMECanvas
killGfxContext
in interface JMECanvas
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |