Package processing.awt
Class PSurfaceAWT
java.lang.Object
processing.core.PSurfaceNone
processing.awt.PSurfaceAWT
- All Implemented Interfaces:
PSurface
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class processing.core.PSurfaceNone
PSurfaceNone.AnimationThread -
Field Summary
Fields inherited from class processing.core.PSurfaceNone
frameRatePeriod, frameRateTarget, graphics, paused, pauseObject, sketch, threadFields inherited from interface processing.core.PSurface
MIN_WINDOW_HEIGHT, MIN_WINDOW_WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGet the native window object associated with this drawing surface.voidvoidvoidinitOffscreen(PApplet sketch) protected voidnativeKeyEvent(KeyEvent event) protected voidnativeMouseEvent(MouseEvent nativeEvent) Figure out how to process a mouse event.booleanvoidplacePresent(int stopColor) voidplaceWindow(int[] location, int[] editorLocation) protected voidrender()voidselectFolder(String prompt, String callback, File file, Object callbackObject) voidselectInput(String prompt, String callback, File file, Object callbackObject) voidselectOutput(String prompt, String callback, File file, Object callbackObject) voidsetAlwaysOnTop(boolean always) Dumb name, but inherited from Frame and no better ideas.voidsetCursor(int kind) voidvoidvoidsetLocation(int x, int y) protected voidsetProcessingIcon(Frame frame) voidsetResizable(boolean resizable) Set true if we want to resize things (default is not resizable)voidsetSize(int wide, int high) voidSet the window (and dock, or whatever necessary) title.voidsetVisible(boolean visible) Show or hide the window.voidMethods inherited from class processing.core.PSurfaceNone
checkPause, displayDensity, displayDensity, isStopped, loadImage, pauseThread, resumeThread, setFrameRate, startThread, stopThread
-
Constructor Details
-
PSurfaceAWT
-
-
Method Details
-
render
protected void render() -
selectInput
- Specified by:
selectInputin interfacePSurface- Overrides:
selectInputin classPSurfaceNone
-
selectOutput
- Specified by:
selectOutputin interfacePSurface- Overrides:
selectOutputin classPSurfaceNone
-
selectFolder
- Specified by:
selectFolderin interfacePSurface- Overrides:
selectFolderin classPSurfaceNone
-
initOffscreen
- Specified by:
initOffscreenin interfacePSurface- Overrides:
initOffscreenin classPSurfaceNone
-
initFrame
- Specified by:
initFramein interfacePSurface- Overrides:
initFramein classPSurfaceNone
-
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.- Specified by:
getNativein interfacePSurface- Overrides:
getNativein classPSurfaceNone
-
setTitle
Set the window (and dock, or whatever necessary) title.- Specified by:
setTitlein interfacePSurface- Overrides:
setTitlein classPSurfaceNone
-
setResizable
public void setResizable(boolean resizable) Set true if we want to resize things (default is not resizable)- Specified by:
setResizablein interfacePSurface- Overrides:
setResizablein classPSurfaceNone
-
setIcon
- Specified by:
setIconin interfacePSurface- Overrides:
setIconin classPSurfaceNone
-
setAlwaysOnTop
public void setAlwaysOnTop(boolean always) Description copied from interface:PSurfaceDumb name, but inherited from Frame and no better ideas.- Specified by:
setAlwaysOnTopin interfacePSurface- Overrides:
setAlwaysOnTopin classPSurfaceNone
-
setLocation
public void setLocation(int x, int y) - Specified by:
setLocationin interfacePSurface- Overrides:
setLocationin classPSurfaceNone
-
setProcessingIcon
-
setVisible
public void setVisible(boolean visible) Description copied from class:PSurfaceNoneShow or hide the window.- Specified by:
setVisiblein interfacePSurface- Overrides:
setVisiblein classPSurfaceNone
-
placePresent
public void placePresent(int stopColor) - Specified by:
placePresentin interfacePSurface- Overrides:
placePresentin classPSurfaceNone
-
placeWindow
public void placeWindow(int[] location, int[] editorLocation) - Specified by:
placeWindowin interfacePSurface- Overrides:
placeWindowin classPSurfaceNone
-
setSize
public void setSize(int wide, int high) - Specified by:
setSizein interfacePSurface- Overrides:
setSizein classPSurfaceNone
-
nativeMouseEvent
Figure out how to process a mouse event. When loop() has been called, the events will be queued up until drawing is complete. If noLoop() has been called, then events will happen immediately. -
nativeKeyEvent
-
addListeners
protected void addListeners() -
setCursor
public void setCursor(int kind) - Specified by:
setCursorin interfacePSurface- Overrides:
setCursorin classPSurfaceNone
-
setCursor
- Specified by:
setCursorin interfacePSurface- Overrides:
setCursorin classPSurfaceNone
-
showCursor
public void showCursor()- Specified by:
showCursorin interfacePSurface- Overrides:
showCursorin classPSurfaceNone
-
hideCursor
public void hideCursor()- Specified by:
hideCursorin interfacePSurface- Overrides:
hideCursorin classPSurfaceNone
-
openLink
- Specified by:
openLinkin interfacePSurface- Overrides:
openLinkin classPSurfaceNone- Parameters:
url- the link to open- Returns:
- false if unable to find a viable way to open
-
createThread
- Overrides:
createThreadin classPSurfaceNone
-