jit.window


    Jan 20 2010 | 4:29 am
    Hello
    I'm new to Java.
    I have this code
    // create our window
    window = new JitterObject("jit.window","foo");
    window.setAttr("size",new int[]{800, 600});
    window.setAttr("pos",new int[]{1440, 0});
    window.setAttr("depthbuffer",1);
    window.setAttr("fsaa",1);
    window.setAttr("idlemouse",1);
    window.setAttr("border",0);
    I'd like to be able to control the size and position outside the mxj in my max patch like this
    How do I proceed ?
    MH

    • Jan 20 2010 | 9:33 pm
      Hello Helene:
      import com.cycling74.max.*;
      import com.cycling74.jitter.*;
      public class MyWindow extends MaxObject{
      JitterObject window;
      public MyWindow(Atom[] args){
      declareInlets(new int[]{DataTypes.ALL});
      declareOutlets(new int[]{DataTypes.ALL});
      //create the window
      window = new JitterObject("jit.window",new Atom[]{Atom.newAtom("helene")});
      window.setAttr("size",new int[]{320, 240});
      window.setAttr("pos",new int[]{100, 100});
      window.setAttr("depthbuffer",1);
      window.setAttr("fsaa",1);
      window.setAttr("idlemouse",1);
      window.setAttr("border",0);
      }
      //position method
      public void setPos(int[] posarray){
      window.setAttr("pos",new int[]{posarray[0],posarray[1]});
      }
      public void setSize(int[] sizearray){
      window.setAttr("size",new int[]{sizearray[0],sizearray[1]});
      }
      public void notifyDeleted(){
      window.freePeer();
      }
      }
      Emmanuel
    • Jan 21 2010 | 2:28 am
      Hello Efe
      Is it possible to get in contact with you directly ?
      I think I need more help.
      Honestly very tired of trying to do this myself. I have a complex gl patch
      and its very difficult for me to integrate this java part.
      Looking for someone to do this.
      My email is ciel_indigo@hotmail.com
      Marie-Helene