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

How to use
die
method
in
processing.core.PApplet

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

origin: org.processing/core

/**
 * Same as above but with an exception. Also needs work.
 */
public void die(String what, Exception e) {
 if (e != null) e.printStackTrace();
 die(what);
}
origin: ajavamind/Processing-Cardboard

/**
 * Same as above but with an exception. Also needs work.
 */
public void die(String what, Exception e) {
  if (e != null) e.printStackTrace();
  die(what);
}
origin: ajavamind/Processing-Cardboard

  public void unregisterMethod(String name, Object target) {
    RegisteredMethods meth = registerMap.get(name);
    if (meth == null) {
      die("No registered methods with the name " + name + "() were found.");
    }
    try {
//      Method method = o.getClass().getMethod(name, new Class[] {});
//      meth.remove(o, method);
      meth.remove(target);
    } catch (Exception e) {
      die("Could not unregister " + name + "() for " + target, e);
    }
  }

origin: org.processing/core

 public void unregisterMethod(String name, Object target) {
  synchronized (registerLock) {
   RegisteredMethods meth = registerMap.get(name);
   if (meth == null) {
    die("No registered methods with the name " + name + "() were found.");
   }
   try {
//      Method method = o.getClass().getMethod(name, new Class[] {});
//      meth.remove(o, method);
    meth.remove(target);
   } catch (Exception e) {
    die("Could not unregister " + name + "() for " + target, e);
   }
  }
 }

origin: org.processing/core

private void registerWithArgs(String name, Object o, Class<?> cargs[]) {
 Class<?> c = o.getClass();
 try {
  Method method = c.getMethod(name, cargs);
  synchronized (registerLock) {
   RegisteredMethods meth = registerMap.get(name);
   if (meth == null) {
    meth = new RegisteredMethods();
    registerMap.put(name, meth);
   }
   meth.add(o, method);
  }
 } catch (NoSuchMethodException nsme) {
  die("There is no public " + name + "() method in the class " +
    o.getClass().getName());
 } catch (Exception e) {
  die("Could not register " + name + " + () for " + o, e);
 }
}
origin: ajavamind/Processing-Cardboard

private void registerNoArgs(String name, Object o) {
  RegisteredMethods meth = registerMap.get(name);
  if (meth == null) {
    meth = new RegisteredMethods();
    registerMap.put(name, meth);
  }
  Class<?> c = o.getClass();
  try {
    Method method = c.getMethod(name, new Class[]{});
    meth.add(o, method);
  } catch (NoSuchMethodException nsme) {
    die("There is no public " + name + "() method in the class " +
        o.getClass().getName());
  } catch (Exception e) {
    die("Could not register " + name + " + () for " + o, e);
  }
}
origin: ajavamind/Processing-Cardboard

private void registerWithArgs(String name, Object o, Class<?> cargs[]) {
  RegisteredMethods meth = registerMap.get(name);
  if (meth == null) {
    meth = new RegisteredMethods();
    registerMap.put(name, meth);
  }
  Class<?> c = o.getClass();
  try {
    Method method = c.getMethod(name, cargs);
    meth.add(o, method);
  } catch (NoSuchMethodException nsme) {
    die("There is no public " + name + "() method in the class " +
        o.getClass().getName());
  } catch (Exception e) {
    die("Could not register " + name + " + () for " + o, e);
  }
}
origin: org.processing/core

private void registerNoArgs(String name, Object o) {
 Class<?> c = o.getClass();
 try {
  Method method = c.getMethod(name);
  synchronized (registerLock) {
   RegisteredMethods meth = registerMap.get(name);
   if (meth == null) {
    meth = new RegisteredMethods();
    registerMap.put(name, meth);
   }
   meth.add(o, method);
  }
 } catch (NoSuchMethodException nsme) {
  die("There is no public " + name + "() method in the class " +
    o.getClass().getName());
 } catch (Exception e) {
  die("Could not register " + name + " + () for " + o, e);
 }
}
origin: ajavamind/Processing-Cardboard

public PFont loadFont(String filename) {
  try {
    InputStream input = createInput(filename);
    return new PFont(input);
  } catch (Exception e) {
    die("Could not load font " + filename + ". " +
        "Make sure that the font has been copied " +
        "to the data folder of your sketch.", e);
  }
  return null;
}
origin: ajavamind/Processing-Cardboard

void add(Object object, Method method) {
  if (findIndex(object) == -1) {
    if (objects == null) {
      objects = new Object[5];
      methods = new Method[5];
    } else if (count == objects.length) {
      objects = (Object[]) PApplet.expand(objects);
      methods = (Method[]) PApplet.expand(methods);
    }
    objects[count] = object;
    methods[count] = method;
    count++;
  } else {
    die(method.getName() + "() already added for this instance of " +
        object.getClass().getName());
  }
}
origin: org.processing/core

void add(Object object, Method method) {
 if (findIndex(object) == -1) {
  if (objects == null) {
   objects = new Object[5];
   methods = new Method[5];
  } else if (count == objects.length) {
   objects = (Object[]) PApplet.expand(objects);
   methods = (Method[]) PApplet.expand(methods);
  }
  objects[count] = object;
  methods[count] = method;
  count++;
 } else {
  die(method.getName() + "() already added for this instance of " +
    object.getClass().getName());
 }
}
origin: org.processing/core

die("Could not load font " + filename + ". " +
  "Make sure that the font has been copied " +
  "to the data folder of your sketch.", e);
processing.corePAppletdie

Javadoc

Function for an applet/application to kill itself and display an error. Mostly this is here to be improved later.

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
  • setContentView (Activity)
  • setScale (BigDecimal)
  • findViewById (Activity)
  • Menu (java.awt)
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top Vim plugins
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