Tabnine Logo
PApplet.handleMethods
Code IndexAdd Tabnine to your IDE (free)

How to use
handleMethods
method
in
processing.core.PApplet

Best Java code snippets using processing.core.PApplet.handleMethods (Showing top 15 results out of 315)

origin: ajavamind/Processing-Cardboard

  /**
   * Called to dispose of resources and shut down the sketch.
   * Destroys the thread, dispose the renderer, and notify listeners.
   * <p/>
   * Not to be called or overriden by users. If called multiple times,
   * will only notify listeners once. Register a dispose listener instead.
   */
  final public void dispose() {
    // moved here from stop()
    finished = true;  // let the sketch know it is shut down time
    activity = null;
    // don't run stop and disposers twice

    // call to shut down renderer, in case it needs it (pdf does)
    if (g != null) g.dispose();
    //surfaceView.destroyDrawingCache();
    //surfaceView.surfaceDestroyed(surfaceView.getHolder());
    //surfaceView = null;
//        window = null;
    handleMethods("dispose");
    if (thread == null) return;
    thread = null;
  }

origin: ajavamind/Processing-Cardboard

  @Override
  public void onPause() {
    super.onPause();

    // TODO need to save all application state here!
//    System.out.println("PApplet.onPause() called");
    paused = true;
    handleMethods("pause");
    pause();  // handler for others to write
  }

origin: ajavamind/Processing-Cardboard

@Override
public void onResume() {
  super.onResume();
  // TODO need to bring back app state here!
  if (DEBUG) System.out.println("PApplet.onResume() called");
  paused = false;
  handleMethods("resume");
  //start();  // kick the thread back on
  resume();
}
origin: org.processing/core

/**
 * Called to dispose of resources and shut down the sketch.
 * Destroys the thread, dispose the renderer,and notify listeners.
 * <p>
 * Not to be called or overriden by users. If called multiple times,
 * will only notify listeners once. Register a dispose listener instead.
 */
public void dispose() {
 // moved here from stop()
 finished = true;  // let the sketch know it is shut down time
 // don't run the disposers twice
 if (surface.stopThread()) {
  // shut down renderer
  if (g != null) {
   g.dispose();
  }
  // run dispose() methods registered by libraries
  handleMethods("dispose");
 }
 if (platform == MACOSX) {
  try {
   final String td = "processing.core.ThinkDifferent";
   final Class<?> thinkDifferent = getClass().getClassLoader().loadClass(td);
   thinkDifferent.getMethod("cleanup").invoke(null);
  } catch (Exception e) {
   e.printStackTrace();
  }
 }
}
origin: org.processing/core

 /**
  * Called by the browser or applet viewer to inform this applet that it
  * should start its execution. It is called after the init method and
  * each time the applet is revisited in a Web page.
  * <p/>
  * Called explicitly via the first call to PApplet.paint(), because
  * PAppletGL needs to have a usable screen before getting things rolling.
  */
 public void start() {
//    paused = false; // unpause the thread  // removing for 3.0a5, don't think we want this here

  resume();
  handleMethods("resume");
  surface.resumeThread();
 }

origin: org.processing/core

handleMethods("pause");
origin: ajavamind/Processing-Cardboard

handleMethods("draw");
handleMethods("post");
origin: org.processing/core

 handleMethods("pre");
handleMethods("draw");
handleMethods("post");
origin: ajavamind/Processing-Cardboard

handleMethods("draw");
handleMethods("post");
origin: ajavamind/Processing-Cardboard

  protected void handleKeyEvent(KeyEvent event) {
//    keyEvent = event;
    key = event.getKey();
    keyCode = event.getKeyCode();


    switch (event.getAction()) {
      case KeyEvent.PRESS:
        keyPressed = true;
        keyPressed(event);
        break;
      case KeyEvent.RELEASE:
        keyPressed = false;
        keyReleased(event);
        break;
    }

    handleMethods("keyEvent", new Object[]{event});
  }

origin: ajavamind/Processing-Cardboard

handleMethods("pre");
origin: ajavamind/Processing-Cardboard

handleMethods("pre");
origin: org.processing/core

handleMethods("keyEvent", new Object[] { event });
origin: org.processing/core

handleMethods("mouseEvent", new Object[] { event });
origin: ajavamind/Processing-Cardboard

handleMethods("mouseEvent", new Object[]{event});
processing.corePApplethandleMethods

Popular methods of PApplet

  • constrain
  • createGraphics
    Create an offscreen graphics surface for drawing, in this case for a renderer that writes to a file
  • loadStrings
    ( begin auto-generated from loadStrings.xml ) Reads the contents of a file or url and creates a Stri
  • saveStrings
    ( begin auto-generated from saveStrings.xml ) Writes an array of strings to a file, one line per str
  • abs
  • createImage
    ( begin auto-generated from createImage.xml ) Creates a new PImage (the datatype for storing images)
  • createShape
  • createWriter
    ( begin auto-generated from createWriter.xml ) Creates a new file in the sketch folder, and a PrintW
  • loadImage
  • main
    main() method for running this class from the command line. Usage: PApplet [options] [s
  • max
  • parseInt
  • max,
  • parseInt,
  • random,
  • round,
  • split,
  • sqrt,
  • unhex,
  • arrayCopy,
  • ceil,
  • checkExtension

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • BoxLayout (javax.swing)
  • Join (org.hibernate.mapping)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now