Package processing.core

Examples of processing.core.PApplet


   * Register a GWindow object.
   *
   * @param window
   */
  static void addWindow(GWindow window){
    PApplet app = window.papplet;
    GWindowInfo winfo = windows.get(app);
    if(winfo == null){
      winfo = new GWindowInfo(app);
      windows.put(app, winfo);
    }
View Full Code Here


  /**
   * Used internally to register a control with its applet.
   * @param control
   */
  static void addControl(GAbstractControl control){
    PApplet app = control.getPApplet();
    // The first applet must be the sketchApplet
    if(G4P.sketchApplet == null)
      G4P.sketchApplet = app;
    GWindowInfo winfo = windows.get(app);
    if(winfo == null){
View Full Code Here

   * for disposing of a control.
   * @param control
   * @return true if control was remove else false
   */
  static boolean removeControl(GAbstractControl control){
    PApplet app = control.getPApplet();
    GWindowInfo winfo = windows.get(app);
    if(winfo != null){
      winfo.removeControl(control);
      return true;
    }
View Full Code Here

    for(GWindowInfo winfo : windows.values())
      winfo.app.cursor(cursorOff);
  }

  public static void setCursor(int cursorOff, GWindow window){
    PApplet app = window.papplet;
    setCursor(cursorOff, app);
  }
View Full Code Here

   
    public void post(){
      // System.out.println("Window to dispose " + toDisposeOf.size());
      if(!toDisposeOf.isEmpty()){
        for(GWindow gwindow : toDisposeOf){
          PApplet wapp = gwindow.papplet;
          GWindowInfo winfo = G4P.windows.get(wapp);
          if(winfo != null){
            winfo.dispose();
            G4P.windows.remove(wapp);
            gwindow.dispose();
View Full Code Here

            aPanel2.setLayout(new GridLayout(0,1));
               
           
       
        //Create a FireCube object
          processing.core.PApplet aFireCube = new PApplet(); //no need to be specific, but doesnt hurt
         // processing.core.PApplet anAnimationWindow = new AnimationWindow();
          processing.core.PApplet aProcessing_Button = new Processing_Button();
       
          //Add FireCube object to Panel
          aPanel.add(aFireCube);
         // aPanel.add(anAnimationWindow);
          aPanel2.add(aProcessing_Button);
          this.add(aPanel);// add the panel to this frame
          this.add(aPanel2);
       
        //Start FireCube
          aFireCube.init();
          //anAnimationWindow.init();
          aProcessing_Button.init(); // The most essential part
       
        //Button aButton = new Button();
       
View Full Code Here

  public void setTool(String s)
  {
    toolString = s;
    if (menu != null)
    {
      PApplet p = menu.canvas;
      try
      {
        String packageName = Tool.class.getPackage().getName();
        Class toolClass = Class.forName(packageName+"."+s);
        Constructor c = toolClass
View Full Code Here

  /**
   * This will sort the GUI controls in a secondary window.
   * @param window the GWindow object
   */
  public static void setDrawOrder(GWindow window){
    PApplet app = window.papplet;
    setDrawOrder(app);
  }
View Full Code Here

   * INTERNAL USE ONLY <br>
   * Used to bring a panel to the front of the display. <br>
   * Do not use this method directly.
   */
  public static void moveToFrontForDraw(GComponent comp){
    PApplet app = comp.getPApplet();
    AppletInfo info = applets.get(app);
    if(info != null && info.paControls.remove(comp)){
      info.paControls.add(comp);
      if(comp.parent == null && app != null && info.autoDrawOn){
        app.unregisterDraw(comp);
        app.registerDraw(comp);
      }
    }
  }
View Full Code Here

   * INTERNAL USE ONLY <br>
   * Used to ensure the panel is the last component to be tested for mouse events. <br>
   * Do not use this method.
   */
  public static void moveToFrontForMouse(GComponent comp){
    PApplet app = comp.getPApplet();
    AppletInfo info = applets.get(app);
    if(info != null && info.paControls.remove(comp)){
      info.paControls.add(comp);
      app.unregisterMouseEvent(comp);
      app.registerMouseEvent(comp);
    }
  }
View Full Code Here

TOP

Related Classes of processing.core.PApplet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.