Class ScriptingEnvironment.Window

    • Field Detail

      • interpreter

        protected Interpreter interpreter
        The associated interpreter.
      • language

        protected java.lang.String language
        The associated language.
      • location

        protected Location location
        The Location object
    • Constructor Detail

      • Window

        public Window​(Interpreter interp,
                      java.lang.String lang)
        Creates a new Window for the given language.
    • Method Detail

      • setInterval

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

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

        public org.w3c.dom.Node parseXML​(java.lang.String text,
                                         org.w3c.dom.Document doc)
        Specified by:
        parseXML in interface Window
        Returns:
        The document fragment or null on error.
      • printNode

        public java.lang.String printNode​(org.w3c.dom.Node n)
        Serializes the given node.
        Specified by:
        printNode in interface Window
      • postURL

        public void postURL​(java.lang.String uri,
                            java.lang.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​(java.lang.String uri,
                            java.lang.String content,
                            Window.URLResponseHandler h,
                            java.lang.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​(java.lang.String uri,
                            java.lang.String content,
                            Window.URLResponseHandler h,
                            java.lang.String mimeType,
                            java.lang.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​(java.lang.String message)
        Displays an alert dialog box.
        Specified by:
        alert in interface Window
      • confirm

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

        public java.lang.String prompt​(java.lang.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 java.lang.String prompt​(java.lang.String message,
                                       java.lang.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.
      • getParent

        public Window getParent()
        Returns a Window object representing the parent of this Window.
        Specified by:
        getParent in interface Window
      • getLocation

        public Location getLocation()
        Returns a Location object representing this Window.
        Specified by:
        getLocation in interface Window