Class BaseScriptingEnvironment.Window

java.lang.Object
org.apache.batik.bridge.BaseScriptingEnvironment.Window
All Implemented Interfaces:
Window, Window
Enclosing class:
BaseScriptingEnvironment

protected class BaseScriptingEnvironment.Window extends Object implements Window
Represents the window object of this environment.
  • Field Details

    • interpreter

      protected Interpreter interpreter
      The associated interpreter.
    • language

      protected String language
      The associated language.
  • Constructor Details

  • Method Details

    • setInterval

      public Object setInterval(String script, long interval)
      Specified by:
      setInterval in interface Window
      Returns:
      an object representing the interval created.
    • setInterval

      public Object setInterval(Runnable r, long interval)
      Specified by:
      setInterval in interface Window
      Returns:
      an object representing the interval created.
    • clearInterval

      public void clearInterval(Object interval)
      Specified by:
      clearInterval in interface Window
    • setTimeout

      public Object setTimeout(String script, long timeout)
      Specified by:
      setTimeout in interface Window
      Returns:
      an object representing the timeout created.
    • setTimeout

      public Object setTimeout(Runnable r, long timeout)
      Specified by:
      setTimeout in interface Window
      Returns:
      an object representing the timeout created.
    • clearTimeout

      public void clearTimeout(Object timeout)
      Specified by:
      clearTimeout in interface Window
    • parseXML

      public Node parseXML(String text, Document doc)
      Parses the given XML string into a DocumentFragment of the given document or a new document if 'doc' is null. The implementation in this class always returns 'null'
      Specified by:
      parseXML in interface Window
      Returns:
      The document/document fragment or null on error.
    • printNode

      public String printNode(Node n)
      Serializes the given node.
      Specified by:
      printNode in interface Window
    • getURL

      public void getURL(String uri, Window.URLResponseHandler h)
      Gets data from the given URI.
      Specified by:
      getURL in interface Window
      Parameters:
      uri - The URI where the data is located.
      h - A handler called when the data is available.
    • getURL

      public void getURL(String uri, Window.URLResponseHandler h, String enc)
      Gets data from the given URI.
      Specified by:
      getURL in interface Window
      Parameters:
      uri - The URI where the data is located.
      h - A handler called when the data is available.
      enc - The character encoding of the data.
    • postURL

      public void postURL(String uri, String content, Window.URLResponseHandler h)
      Description copied from interface: Window
      Posts data to the given URI.
      Specified by:
      postURL in interface Window
      Parameters:
      uri - The URI where the data is located.
      content - The data to post to the server.
      h - A handler called when the data is available.
    • postURL

      public void postURL(String uri, String content, Window.URLResponseHandler h, String mimeType)
      Description copied from interface: Window
      Posts data to the given URI.
      Specified by:
      postURL in interface Window
      Parameters:
      uri - The URI where the data is located.
      content - The data to post to the server.
      h - A handler called when the data is available.
      mimeType - The mimeType to asscoiate with post.
    • postURL

      public void postURL(String uri, String content, Window.URLResponseHandler h, String mimeType, String fEnc)
      Description copied from interface: Window
      Posts data to the given URI.
      Specified by:
      postURL in interface Window
      Parameters:
      uri - The URI where the data is located.
      content - The data to post to the server.
      h - A handler called when the data is available.
      mimeType - The mimeType to asscoiate with post.
      fEnc - The encoding to apply to content may be "gzip", "deflate", or null.
    • alert

      public void alert(String message)
      Displays an alert dialog box.
      Specified by:
      alert in interface Window
    • confirm

      public boolean confirm(String message)
      Displays a confirm dialog box.
      Specified by:
      confirm in interface Window
    • prompt

      public String prompt(String message)
      Displays an input dialog box.
      Specified by:
      prompt in interface Window
      Returns:
      The input of the user, or null if the dialog was cancelled.
    • prompt

      public String prompt(String message, String defVal)
      Displays an input dialog box, given the default value.
      Specified by:
      prompt in interface Window
      Returns:
      The input of the user, or null if the dialog was cancelled.
    • getBridgeContext

      public BridgeContext getBridgeContext()
      Returns the current BridgeContext.
      Specified by:
      getBridgeContext in interface Window
    • getInterpreter

      public Interpreter getInterpreter()
      Returns the associated interpreter.
      Specified by:
      getInterpreter in interface Window
    • getLocation

      public Location getLocation()
      Returns the Location.
      Specified by:
      getLocation in interface Window
    • getParent

      public Window getParent()
      Returns the parent Window object.
      Specified by:
      getParent in interface Window