Package com.scriptographer

Examples of com.scriptographer.ScriptographerException


   */
  protected Item(int handle, Document doc, boolean created,
      boolean unversioned) {
    super(handle, doc);
    if (document == null)
      throw new ScriptographerException(
          "Unable to create item. There is no open document.");
    if (unversioned) {
      creationVersion = 0;
    } else if (created) {
      // Set the creation level to the current level for this newly
View Full Code Here


    return valid;
  }

  protected void checkValid() {
    if (!isValid())
      throw new ScriptographerException("The item is no longer valid, either due to deletion or undoing. Use isValid() checks to avoid this error.");
  }
View Full Code Here

  }

  private Path getCurrentPath() {
    Path current = (Path) getFirstChild();
    if (current == null)
      throw new ScriptographerException("Use a moveTo() command first");
    return current;
  }
View Full Code Here

    if (handle == 0) {
      if (!file.exists())
        throw new FileNotFoundException(
            "Unable to create document from non existing file: "
            + file);
      throw new ScriptographerException(
          "Unable to create document from file: " + file);
    }
  }
View Full Code Here

   * Helper method that returns the current segment and checks if we need to
   * execute a moveTo() command first.
   */
  protected Segment getCurrentSegment() {
    if (size == 0)
      throw new ScriptographerException("Use a moveTo() command first");
    return getLast();
  }
View Full Code Here

    moveTo(pt.x, pt.y);
  }

  public void moveTo(double x, double y) {
    if (size > 0)
      throw new ScriptographerException(
          "moveTo() can only be called at the beginning of a list of segments");
    add(new Segment(x, y));
  }
View Full Code Here

    Point handle = through.subtract(
        current.multiply(t1 * t1)).subtract(
            to.multiply(parameter * parameter)).divide(
                2.0 * parameter * t1);
    if (handle.isNaN())
      throw new ScriptographerException(
          "Cannot put a curve through points with parameter="
          + parameter);
    quadraticCurveTo(handle, to);
  }
View Full Code Here

    } else {
      handle = nativeCreate("Scriptographer Annotator " + (counter++));
    }   

    if (handle == 0)
      throw new ScriptographerException("Unable to create Annotator.");
   
    active = false;
   
    annotators.put(handle, this);
  }
View Full Code Here

      handle = nativeCreate(name, title, this.position.value,
          this.preferredInput, flags, majorVersion, minorVersion);
    }

    if (handle == 0)
      throw new ScriptographerException("Unable to create LifeEffect.");

    if (category != null)
      menuItem = nativeAddMenuItem(name, category, title + "...");

    effects.put(handle, this);
View Full Code Here

  public TextStory getStory() {
    if (story == null) {
      TextStoryList stories = document.getStories(this, true);
      int index = getStoryIndex();
      if (index >= stories.size())
        throw new ScriptographerException("Cannot get text stories from document");
      story = stories.get(index);
    }
    return story;
  }
View Full Code Here

TOP

Related Classes of com.scriptographer.ScriptographerException

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.