Package com.scratchdisk.script

Examples of com.scratchdisk.script.Callable


  private static void addCallbacks(Scope scope, File file) {
    // Scan through callback names and add to callback scope sublists if
    // found.
    for (String name : callbackNames) {
      Callable callback = scope.getCallable(name);
      if (callback != null) {
        ArrayList<Scope> list = callbackScopes.get(name);
        if (list == null) {
          list = new ArrayList<Scope>();
          callbackScopes.put(name, list);
View Full Code Here


    ArrayList<Scope> list = callbackScopes.get(name);
    // The first callback handler that returns true stops the others
    // (and in the case of keyDown / up also the native one!)
    if (list != null) {
      for (Scope scope : list) {
        Callable callback = scope.getCallable(name);
        Object res = invoke(callback, scope, args);
        if (ConversionUtils.toBoolean(res))
          return true;
      }
    }
View Full Code Here

  }

  protected void onDestroy() {
    // retrieve through getter so it can be overridden by subclasses,
    // e.g. HierarchyListBox
    Callable onDestroy = this.getOnDestroy();
    if (onDestroy != null)
      ScriptographerEngine.invoke(onDestroy, this);
  }
View Full Code Here

  }

  protected boolean onTrack(Tracker tracker) {
    // Retrieve through getter so it can be overridden by subclasses,
    // e.g. HierarchyListBox
    Callable onTrack = this.getOnTrack();
    if (onTrack != null) {
      Object result = ScriptographerEngine.invoke(onTrack, this, tracker);
      if (result != null)
        return ConversionUtils.toBoolean(result);
    }
View Full Code Here

  }

  protected boolean onDraw(Drawer drawer) {
    // Retrieve through getter so it can be overridden by subclasses,
    // e.g. HierarchyListBox
    Callable onDraw = this.getOnDraw();
    if (onDraw != null) {
      Object result = ScriptographerEngine.invoke(onDraw, this, drawer);
      if (result != null)
        return ConversionUtils.toBoolean(result);
    }
View Full Code Here

  }

  protected void onResize(int dx, int dy) {
    // Retrieve through getter so it can be overridden by subclasses,
    // e.g. HierarchyListBox
    Callable onResize = this.getOnResize();
    if (onResize != null)
      ScriptographerEngine.invoke(onResize, this, dx, dy);
  }
View Full Code Here

  public native boolean defaultTrack(Tracker tracker);
  public native void defaultDraw(Drawer drawer);

  protected boolean onDraw(Drawer drawer) {
    Callable onDrawEntry = list.getOnDrawEntry();
    if (onDrawEntry != null) {
      Object result = ScriptographerEngine.invoke(onDrawEntry, list, drawer, this);
      if (result != null)
        return ConversionUtils.toBoolean(result);
    }
View Full Code Here

    }
    return true;
  }

  protected boolean onTrack(Tracker tracker) {
    Callable onTrackEntry = list.getOnTrackEntry();
    if (onTrackEntry != null) {
      Object res = ScriptographerEngine.invoke(onTrackEntry, list, tracker, this);
      if (res != null)
        return ConversionUtils.toBoolean(res);
    }
View Full Code Here

  protected void onDestroy() {
    if (onDestroy != null)
      ScriptographerEngine.invoke(onDestroy, this);
   
    Callable onDestroyEntry = list.getOnDestroyEntry();
    if (onDestroyEntry != null)
      ScriptographerEngine.invoke(onDestroyEntry, list, this);
  }
View Full Code Here

  }

  protected void onSelect() {
    if (onSelect != null)
      ScriptographerEngine.invoke(onSelect, this);
    Callable onSelectEntry = list.getOnSelectEntry();
    if (onSelectEntry != null)
      ScriptographerEngine.invoke(onSelectEntry, list, this);
  }
View Full Code Here

TOP

Related Classes of com.scratchdisk.script.Callable

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.