- java.lang.Object
-
- processing.core.PSurfaceNone
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPSurfaceNone.AnimationThread
-
Field Summary
Fields Modifier and Type Field Description protected longframeRatePeriodprotected floatframeRateTargetprotected PGraphicsgraphicsprotected booleanpausedprotected ObjectpauseObjectprotected PAppletsketchprotected Threadthread-
Fields inherited from interface processing.core.PSurface
MIN_WINDOW_HEIGHT, MIN_WINDOW_WIDTH
-
-
Constructor Summary
Constructors Constructor Description PSurfaceNone(PGraphics graphics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckPause()ThreadcreateThread()ObjectgetNative()Get the native window object associated with this drawing surface.voidhideCursor()voidinitFrame(PApplet sketch)voidinitOffscreen(PApplet sketch)booleanisStopped()voidpauseThread()On the next trip through the animation thread, things should go sleepy-bye.voidplacePresent(int stopColor)voidplaceWindow(int[] location, int[] editorLocation)voidresumeThread()voidsetAlwaysOnTop(boolean always)Dumb name, but inherited from Frame and no better ideas.voidsetCursor(int kind)voidsetCursor(PImage image, int hotspotX, int hotspotY)voidsetFrameRate(float fps)voidsetIcon(PImage image)voidsetLocation(int x, int y)voidsetResizable(boolean resizable)Set true if we want to resize things (default is not resizable)voidsetSize(int wide, int high)voidsetTitle(String title)Set the window (and dock, or whatever necessary) title.voidsetupExternalMessages()voidsetVisible(boolean visible)Show or hide the window.voidshowCursor()voidstartThread()Start the animation threadbooleanstopThread()Stop the animation thread (set it null)
-
-
-
Constructor Detail
-
PSurfaceNone
public PSurfaceNone(PGraphics graphics)
-
-
Method Detail
-
initOffscreen
public void initOffscreen(PApplet sketch)
- Specified by:
initOffscreenin interfacePSurface
-
getNative
public Object getNative()
Description copied from interface:PSurfaceGet the native window object associated with this drawing surface. For Java2D, this will be an AWT Frame object. For OpenGL, the window. The data returned here is subject to the whims of the renderer, and using this method means you're willing to deal with underlying implementation changes and that you won't throw a fit like a toddler if your code breaks sometime in the future.
-
setTitle
public void setTitle(String title)
Set the window (and dock, or whatever necessary) title.
-
setVisible
public void setVisible(boolean visible)
Show or hide the window.- Specified by:
setVisiblein interfacePSurface
-
setResizable
public void setResizable(boolean resizable)
Set true if we want to resize things (default is not resizable)- Specified by:
setResizablein interfacePSurface
-
placeWindow
public void placeWindow(int[] location, int[] editorLocation)- Specified by:
placeWindowin interfacePSurface
-
placePresent
public void placePresent(int stopColor)
- Specified by:
placePresentin interfacePSurface
-
setupExternalMessages
public void setupExternalMessages()
- Specified by:
setupExternalMessagesin interfacePSurface
-
setAlwaysOnTop
public void setAlwaysOnTop(boolean always)
Description copied from interface:PSurfaceDumb name, but inherited from Frame and no better ideas.- Specified by:
setAlwaysOnTopin interfacePSurface
-
setLocation
public void setLocation(int x, int y)- Specified by:
setLocationin interfacePSurface
-
setCursor
public void setCursor(PImage image, int hotspotX, int hotspotY)
-
showCursor
public void showCursor()
- Specified by:
showCursorin interfacePSurface
-
hideCursor
public void hideCursor()
- Specified by:
hideCursorin interfacePSurface
-
createThread
public Thread createThread()
-
startThread
public void startThread()
Description copied from interface:PSurfaceStart the animation thread- Specified by:
startThreadin interfacePSurface
-
stopThread
public boolean stopThread()
Description copied from interface:PSurfaceStop the animation thread (set it null)- Specified by:
stopThreadin interfacePSurface- Returns:
- false if already stopped
-
pauseThread
public void pauseThread()
Description copied from interface:PSurfaceOn the next trip through the animation thread, things should go sleepy-bye. Does not pause the thread immediately because that needs to happen on the animation thread itself, so fires on the next trip through draw().- Specified by:
pauseThreadin interfacePSurface
-
checkPause
protected void checkPause()
-
resumeThread
public void resumeThread()
- Specified by:
resumeThreadin interfacePSurface
-
setFrameRate
public void setFrameRate(float fps)
- Specified by:
setFrameRatein interfacePSurface
-
-