All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dlsc.gmapsfx.javascript.IWebEngine Maven / Gradle / Ivy

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dlsc.gmapsfx.javascript;

import javafx.concurrent.Worker;

/**
 * Provides an abstraction to the web engine, so that a mock engine can be utilized in unit tests, or a different web engine
 * could be utilized in future versions of this framework.
 * 
 * @author Rob Terpilowski
 */
public interface IWebEngine {

    /**
     * Executes the specified JavaScript Command
     *
     * @param command The command to execute
     * @return The object returned by the script (if any).
     */
    public Object executeScript(String command);

    /**
     * Gets a worked which will be notified when a web page has finished
     * loading.
     *
     * @return The worker
     */
    public Worker getLoadWorker();

    /**
     * Loads the specified URL
     *
     * @param url The URL to load in the engine.
     */
    public void load(String url);

    /**
     * Loads the given HTML content directly.
     *
     * @param content The HTML text to load in the engine.
     */
    public void loadContent(String content);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy