Example #1
0
 /**
  * Replace Html Context with a Html File Content.
  *
  * @param htmlFilePath File Path of Html File to load.
  */
 public void changeHtmlContext(String htmlFilePath) {
   String html = getHTMLContext();
   try {
     html = Utils.getToolkit().readFile(htmlFilePath);
     changeHtmlContent(html);
   } catch (Exception ex) {
     ex.printStackTrace();
   }
 }
Example #2
0
 /**
  * Loads a template for WebBrowser from the given Filepath.
  *
  * @param templatePath The Filepath, to load a Html Template.
  */
 public void loadContentTemplateByPath(String templatePath) {
   try {
     String content = null;
     content = Utils.getToolkit().readFile(templatePath);
     loadContentTemplate(content);
   } catch (Exception ex) {
     ex.printStackTrace();
   }
 }