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

How to use
registerMethod
method
in
processing.core.PApplet

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

origin: openimaj/openimaj

/**
 * @param parent
 */
public OpenIMAJ(PApplet parent) {
  this();
  this.parent = parent;
  parent.registerMethod("dispose", this);
  parent.registerMethod("pre", this);
}
origin: poqudrof/PapARt

public void automaticMode() {
  registered = true;
  // Before drawing. 
  parent.registerMethod("pre", this);
  // At the end of drawing.
  parent.registerMethod("draw", this);
}
origin: poqudrof/PapARt

/**
 * Register the "post" method, this is used to change the window location.
 */
private void registerPost() {
  applet.registerMethod("post", this);
}
origin: poqudrof/PapARt

public void setParent(PApplet applet) {
  this.parent = applet;
  applet.registerMethod("dispose", this);
}
origin: poqudrof/PapARt

private void registerKey() {
  applet.registerMethod("keyEvent", this);
}
origin: poqudrof/PapARt

private void register() {
  this.isRegistered = true;
  parent.registerMethod("pre", this);
  parent.registerMethod("draw", this);
  // IDEA: register to save/load automatically. 
  parent.registerMethod("keyEvent", this);
  // Do this so that the display is the last rendered.
  mainDisplay.registerAgain();
}
origin: ruby-processing/JRubyArt

private void setActive(boolean active) {
  if (active) {
    applet.registerMethod("dispose", this);
    applet.registerMethod("draw", this);
  } else {
    applet.unregisterMethod("draw", this);            
  }
}
origin: ruby-processing/JRubyArt

private void setActive(boolean active) {
  if (active) {
    applet.registerMethod("dispose", this);
    applet.registerMethod("draw", this);
  } else {
    applet.unregisterMethod("draw", this);
  }
}
origin: ruby-processing/JRubyArt

private void setActive(boolean active) {
  if (active) {
    applet.registerMethod("dispose", this);
    applet.registerMethod("draw", this);
  } else {
    applet.unregisterMethod("draw", this);            
  }
}
origin: ruby-processing/JRubyArt

private void setActive(boolean active) {
  if (active) {
    applet.registerMethod("dispose", this);
    applet.registerMethod("draw", this);
    applet.registerMethod("mouseEvent", this);
  } else {
    applet.unregisterMethod("draw", this);
    applet.unregisterMethod("mouseEvent", this);
  }
}
origin: ruby-processing/JRubyArt

private void setActive(boolean active) {
  if (active) {
    applet.registerMethod("dispose", this);
    applet.registerMethod("draw", this);
    applet.registerMethod("mouseEvent", this);
  } else {
    applet.unregisterMethod("draw", this);
    applet.unregisterMethod("mouseEvent", this);
  }
}
origin: ruby-processing/JRubyArt

private void setActive(boolean active) {
  if (active) {
    applet.registerMethod("dispose", this);
    applet.registerMethod("draw", this);
    applet.registerMethod("mouseEvent", this);
  } else {
    applet.unregisterMethod("draw", this);
    applet.unregisterMethod("mouseEvent", this);
  }
}
origin: ruby-processing/JRubyArt

/**
 * May or may not be required for use in Web Applet it works so why worry as
 * used by Jonathan Feinberg peasycam, and that works OK
 *
 * @param active boolean
 */
final void setActive(boolean active) {
  if (active != isActive) {
    isActive = active;
    if (active) {
      this.parent.registerMethod("dispose", this);
      this.parent.registerMethod("pre", this);
      this.parent.registerMethod("mouseEvent", this);
      this.parent.registerMethod("keyEvent", this);
    } else {
      this.parent.unregisterMethod("pre", this);
      this.parent.unregisterMethod("mouseEvent", this);
      this.parent.unregisterMethod("keyEvent", this);
    }
  }
}
origin: ruby-processing/JRubyArt

/**
* Register or unregister reflection methods
* @param active
*/
final void setActive(boolean active) {
 if (active) {
  this.app.registerMethod("pre", this);
  this.app.registerMethod("draw", this);
  this.app.registerMethod("post", this);
  this.app.registerMethod("mouseEvent", this);
  this.app.registerMethod("keyEvent", this);
  this.app.registerMethod("dispose", this);
 } else {
  this.app.unregisterMethod("pre", this);
  this.app.unregisterMethod("draw", this);
  this.app.unregisterMethod("post", this);
  this.app.unregisterMethod("mouseEvent", this);
  this.app.unregisterMethod("keyEvent", this);
 }
}
processing.corePAppletregisterMethod

Javadoc

Register a built-in event so that it can be fired for libraries, etc. Supported events include:
  • pre – at the very top of the draw() method (safe to draw)
  • draw – at the end of the draw() method (safe to draw)
  • post – after draw() has exited (not safe to draw)
  • pause – called when the sketch is paused
  • resume – called when the sketch is resumed
  • dispose – when the sketch is shutting down (definitely not safe to draw)
      In addition, the new (for 2.0) processing.event classes are passed to the following event types:
      • mouseEvent
      • keyEvent
      • touchEvent
      The older java.awt events are no longer supported. See the Library Wiki page for more details.

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

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • Menu (java.awt)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Top plugins for WebStorm
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