public void notifyObservers(Variant value) {
   System.out.println("MyObservableJavaComObject.notifyObservers,  value= " + value.getValue());
   for (Iterator i = _observers.iterator(); i.hasNext(); ) {
     IUnknown observer = (IUnknown) i.next();
     try {
       Automation automation = new Automation(observer, true);
       automation.invoke("update", new Variant[] {value});
     } catch (Exception e) {
       e.printStackTrace();
     }
   }
 }
Пример #2
0
  public VariantBool init() {

    Parameter[] parameters = new Parameter[0];

    Object result = Automation.invokeDispatch(this, "Init", parameters, VariantBool.class);
    return (VariantBool) result;
  }
Пример #3
0
  public BStr loadUsers() {

    Parameter[] parameters = new Parameter[0];

    Object result = Automation.invokeDispatch(this, "LoadUsers", parameters, BStr.class);
    return (BStr) result;
  }
Пример #4
0
  public VariantBool startTracking(Int32 /*[in]*/ skeletonID) {

    Parameter[] parameters = new Parameter[] {skeletonID};

    Object result = Automation.invokeDispatch(this, "StartTracking", parameters, VariantBool.class);
    return (VariantBool) result;
  }
Пример #5
0
  public VariantBool updateUser(BStr /*[in]*/ name, Int32 /*[in]*/ skeletonID) {

    Parameter[] parameters =
        new Parameter[] {name == null ? (Parameter) PTR_NULL : name, skeletonID};

    Object result = Automation.invokeDispatch(this, "UpdateUser", parameters, VariantBool.class);
    return (VariantBool) result;
  }
Пример #6
0
  public void recordGesture(BStr /*[in]*/ gestureName, BStr /*[in]*/ ctxt) {

    Parameter[] parameters =
        new Parameter[] {
          gestureName == null ? (Parameter) PTR_NULL : gestureName,
          ctxt == null ? (Parameter) PTR_NULL : ctxt
        };

    Automation.invokeDispatch(this, "RecordGesture", parameters, void.class);
  }
Пример #7
0
  public void decAngle() {

    Parameter[] parameters = new Parameter[0];

    Automation.invokeDispatch(this, "DecAngle", parameters, void.class);
  }
Пример #8
0
  public void speechRecognition(VariantBool /*[in]*/ on) {

    Parameter[] parameters = new Parameter[] {on};

    Automation.invokeDispatch(this, "SpeechRecognition", parameters, void.class);
  }
Пример #9
0
  public void setContext(BStr /*[in]*/ contextID) {

    Parameter[] parameters = new Parameter[] {contextID == null ? (Parameter) PTR_NULL : contextID};

    Automation.invokeDispatch(this, "SetContext", parameters, void.class);
  }
Пример #10
0
  public void uninit() {

    Parameter[] parameters = new Parameter[0];

    Automation.invokeDispatch(this, "Uninit", parameters, void.class);
  }
Пример #11
0
  public void delUser(BStr /*[in]*/ User) {

    Parameter[] parameters = new Parameter[] {User == null ? (Parameter) PTR_NULL : User};

    Automation.invokeDispatch(this, "DelUser", parameters, void.class);
  }
Пример #12
0
  public void setDefaultHand(VariantBool /*[in]*/ def) {

    Parameter[] parameters = new Parameter[] {def};

    Automation.invokeDispatch(this, "SetDefaultHand", parameters, void.class);
  }
Пример #13
0
  public void storeGestures() {

    Parameter[] parameters = new Parameter[0];

    Automation.invokeDispatch(this, "StoreGestures", parameters, void.class);
  }
Пример #14
0
  public void stopGestureRecognition() {

    Parameter[] parameters = new Parameter[0];

    Automation.invokeDispatch(this, "StopGestureRecognition", parameters, void.class);
  }