processing.core

## Class PSurfaceAWT

- Object
- - PSurfaceNone
  - - PSurfaceAWT

- All Implemented Interfaces:
    PSurface
  Direct Known Subclasses:
    PSurfaceDanger

      public class PSurfaceAWT
      extends PSurfaceNone

- - ### Field Summary

    - ### Fields inherited from interface PSurface

      `MIN_WINDOW_HEIGHT, MIN_WINDOW_WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PSurfaceAWT(PGraphics graphics)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Thread` | `createThread()`
    `void` | `hideCursor()`
    `void` | `initFrame(PApplet sketch)`
    `void` | `initOffscreen(PApplet sketch)`
    `void` | `placePresent(int stopColor)`
    `void` | `placeWindow(int[] location, int[] editorLocation)`
    `void` | `setCursor(int kind)`
    `void` | `setCursor(PImage img, int x, int y)`
    `void` | `setResizable(boolean resizable)` Set true if we want to resize things (default is not resizable)
    `void` | `setSize(int wide, int high)`
    `void` | `setSmooth(int level)` Sometimes smoothing must be set at the drawing surface level not just inside the renderer itself.
    `void` | `setTitle(String title)` Set the window (and dock, or whatever necessary) title.
    `void` | `setupExternalMessages()` Set this sketch to communicate its state back to the PDE.
    `void` | `setupFrameResizeListener()` Set up a listener that will fire proper component resize events in cases where frame.setResizable(true) is called.
    `void` | `setVisible(boolean visible)` Show or hide the window.
    `void` | `showCursor()`

    - ### Methods inherited from class PSurfaceNone

      `isStopped, pauseThread, resumeThread, setFrameRate, startThread, stopThread`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PSurfaceAWT

          public PSurfaceAWT(PGraphics graphics)

  - ### Method Detail

    - #### initOffscreen

          public void initOffscreen(PApplet sketch)

      Specified by:
        `initOffscreen` in interface `PSurface`
      Overrides:
        `initOffscreen` in class `PSurfaceNone`

    - #### initFrame

          public void initFrame(PApplet sketch)

      Specified by:
        `initFrame` in interface `PSurface`
      Overrides:
        `initFrame` in class `PSurfaceNone`

    - #### setTitle

          public void setTitle(String title)

      Set the window (and dock, or whatever necessary) title.
      Specified by:
        `setTitle` in interface `PSurface`
      Overrides:
        `setTitle` in class `PSurfaceNone`

    - #### setResizable

          public void setResizable(boolean resizable)

      Set true if we want to resize things (default is not resizable)
      Specified by:
        `setResizable` in interface `PSurface`
      Overrides:
        `setResizable` in class `PSurfaceNone`

    - #### setVisible

          public void setVisible(boolean visible)

      Description copied from class: `PSurfaceNone`
      Show or hide the window.
      Specified by:
        `setVisible` in interface `PSurface`
      Overrides:
        `setVisible` in class `PSurfaceNone`

    - #### placePresent

          public void placePresent(int stopColor)

      Specified by:
        `placePresent` in interface `PSurface`
      Overrides:
        `placePresent` in class `PSurfaceNone`

    - #### placeWindow

          public void placeWindow(int[] location,
                                  int[] editorLocation)

      Specified by:
        `placeWindow` in interface `PSurface`
      Overrides:
        `placeWindow` in class `PSurfaceNone`

    - #### setSize

          public void setSize(int wide,
                              int high)

      Specified by:
        `setSize` in interface `PSurface`
      Overrides:
        `setSize` in class `PSurfaceNone`

    - #### setSmooth

          public void setSmooth(int level)

      Description copied from interface: `PSurface`
      Sometimes smoothing must be set at the drawing surface level not just inside the renderer itself.
      Specified by:
        `setSmooth` in interface `PSurface`
      Overrides:
        `setSmooth` in class `PSurfaceNone`

    - #### setupExternalMessages

          public void setupExternalMessages()

      Set this sketch to communicate its state back to the PDE.

      This uses the stderr stream to write positions of the window (so that it will be saved by the PDE for the next run) and notify on quit. See more notes in the Worker class.
      Specified by:
        `setupExternalMessages` in interface `PSurface`
      Overrides:
        `setupExternalMessages` in class `PSurfaceNone`

    - #### setupFrameResizeListener

          public void setupFrameResizeListener()

      Set up a listener that will fire proper component resize events in cases where frame.setResizable(true) is called.

    - #### setCursor

          public void setCursor(int kind)

      Specified by:
        `setCursor` in interface `PSurface`
      Overrides:
        `setCursor` in class `PSurfaceNone`

    - #### setCursor

          public void setCursor(PImage img,
                                int x,
                                int y)

      Specified by:
        `setCursor` in interface `PSurface`
      Overrides:
        `setCursor` in class `PSurfaceNone`

    - #### showCursor

          public void showCursor()

      Specified by:
        `showCursor` in interface `PSurface`
      Overrides:
        `showCursor` in class `PSurfaceNone`

    - #### hideCursor

          public void hideCursor()

      Specified by:
        `hideCursor` in interface `PSurface`
      Overrides:
        `hideCursor` in class `PSurfaceNone`

    - #### createThread

          public Thread createThread()

      Overrides:
        `createThread` in class `PSurfaceNone`