Class ShimAWT

java.lang.Object
processing.awt.ShimAWT
All Implemented Interfaces:
PConstants

public class ShimAWT extends Object implements PConstants
This class exists as an abstraction layer to remove AWT from PApplet. It is a staging area for AWT-specific code that's shared by the Java2D, JavaFX, and JOGL renderers. Once PSurfaceFX and PSurfaceJOGL have their own implementations, these methods will move to PSurfaceAWT.
  • Method Details

    • getDisplayWidth

      public static int getDisplayWidth()
    • getDisplayHeight

      public static int getDisplayHeight()
    • getDisplayCount

      public static int getDisplayCount()
    • getDisplayDensity

      public static int getDisplayDensity(int num)
    • fromNativeImage

      public static void fromNativeImage(Image img, PImage out)
    • getNativeImage

      public static Object getNativeImage(PImage img)
    • resizeImage

      public static void resizeImage(PImage img, int w, int h)
    • loadImage

      public static PImage loadImage(PApplet sketch, String filename, Object... args)
    • saveImage

      public static boolean saveImage(PImage image, String path, String... args)
    • initRun

      public static void initRun()
    • selectInput

      public static void selectInput(String prompt, String callbackMethod, File file, Object callbackObject)
      display - the display number to check (1-indexed to match the Preferences dialog box)
    • selectOutput

      public static void selectOutput(String prompt, String callbackMethod, File file, Object callbackObject)
    • selectImpl

      public static void selectImpl(String prompt, String callbackMethod, File defaultSelection, Object callbackObject, Frame parentFrame, int mode)
    • selectFolder

      public static void selectFolder(String prompt, String callbackMethod, File defaultSelection, Object callbackObject)
    • selectFolderImpl

      public static void selectFolderImpl(String prompt, String callbackMethod, File defaultSelection, Object callbackObject, Frame parentFrame)
    • getWindowsDesktop

      public static File getWindowsDesktop()
    • openLink

      public static boolean openLink(String url)