Package processing.core
Interface PSurface
- All Known Implementing Classes:
PSurfaceAWT
,PSurfaceJOGL
,PSurfaceNone
public interface PSurface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
Minimum dimensions for the window holding a sketch. -
Method Summary
Modifier and TypeMethodDescriptionGet the native window object associated with this drawing surface.void
void
void
initOffscreen
(PApplet sketch) boolean
boolean
void
On the next trip through the animation thread, things should go sleepy-bye.void
placePresent
(int stopColor) void
placeWindow
(int[] location, int[] editorLocation) void
void
selectFolder
(String prompt, String callback, File file, Object callbackObject) void
selectInput
(String prompt, String callback, File file, Object callbackObject) void
selectOutput
(String prompt, String callback, File file, Object callbackObject) void
setAlwaysOnTop
(boolean always) Dumb name, but inherited from Frame and no better ideas.void
setCursor
(int kind) void
void
setFrameRate
(float fps) void
void
setLocation
(int x, int y) void
setResizable
(boolean resizable) Set true if we want to resize things (default is not resizable)void
setSize
(int width, int height) void
Set the window (and dock, or whatever necessary) title.void
setVisible
(boolean visible) Show or hide the window.void
void
Start the animation threadboolean
Stop the animation thread (set it null)
-
Field Details
-
MIN_WINDOW_WIDTH
static final int MIN_WINDOW_WIDTHMinimum dimensions for the window holding a sketch. This varies between platforms, Mac OS X 10.3 (confirmed with 10.7 and Java 6) can do any height but requires at least 128 pixels width. Windows XP has another set of limitations. And for all I know, Linux probably allows window sizes to be negative numbers.- See Also:
-
MIN_WINDOW_HEIGHT
static final int MIN_WINDOW_HEIGHT- See Also:
-
-
Method Details
-
initOffscreen
-
initFrame
-
getNative
Object getNative()Get 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
Set the window (and dock, or whatever necessary) title. -
setVisible
void setVisible(boolean visible) Show or hide the window. -
setResizable
void setResizable(boolean resizable) Set true if we want to resize things (default is not resizable) -
setAlwaysOnTop
void setAlwaysOnTop(boolean always) Dumb name, but inherited from Frame and no better ideas. -
setIcon
-
placeWindow
void placeWindow(int[] location, int[] editorLocation) -
placePresent
void placePresent(int stopColor) -
setLocation
void setLocation(int x, int y) -
setSize
void setSize(int width, int height) -
setFrameRate
void setFrameRate(float fps) -
setCursor
void setCursor(int kind) -
setCursor
-
showCursor
void showCursor() -
hideCursor
void hideCursor() -
loadImage
-
openLink
- Parameters:
url
- the link to open- Returns:
- false if unable to find a viable way to open
-
selectInput
-
selectOutput
-
selectFolder
-
startThread
void startThread()Start the animation thread -
pauseThread
void pauseThread()On 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(). -
resumeThread
void resumeThread() -
stopThread
boolean stopThread()Stop the animation thread (set it null)- Returns:
- false if already stopped
-
isStopped
boolean isStopped()
-