java - Javafx webview integration spagobi -
i try integrate spagobi in javafx application load url directly spagobi can see legend not displayed. can run code below see problem. configuration : javafx 2.2.x , java 7. have idea ? workaround ? need work on java 7 can't use java 8.
thanks in advance !
best regards, florian
package javafxapplication3; import java.io.ioexception; import java.util.logging.level; import java.util.logging.logger; import javafx.application.application; import static javafx.application.application.launch; import javafx.geometry.hpos; import javafx.geometry.vpos; import javafx.scene.node; import javafx.scene.scene; import javafx.scene.layout.hbox; import javafx.scene.layout.priority; import javafx.scene.layout.region; import javafx.scene.paint.color; import javafx.scene.web.webengine; import javafx.scene.web.webview; import javafx.stage.stage; import javax.script.scriptexception; import org.apache.axis.axisfault.*; public class javafxapplication3 extends application { private scene scene; @override public void start(stage stage) { // create scene stage.settitle("web view"); try { scene = new scene(new browser(), 750, 500, color.web("#666970")); } catch (ioexception ex) { logger.getlogger(javafxapplication3.class.getname()).log(level.severe, null, ex); } catch (scriptexception ex) { logger.getlogger(javafxapplication3.class.getname()).log(level.severe, null, ex); } stage.setscene(scene); //scene.getstylesheets().add("webviewsample/browsertoolbar.css"); stage.show(); } public static void main(string[] args) { launch(args); } } class browser extends region { final webview browser = new webview(); final webengine webengine = browser.getengine(); public browser() throws ioexception, scriptexception { //apply styles getstyleclass().add("browser"); // load web page webengine.load("http://spagobi.eng.it/spagobi//servlet/adapterhttp?" + "new_session=true&action_name=execute_document_action" + "&user_id=biuser&object_label=doc_crt_009" + "&toolbar_visible=true&sliders_visible=true"); //webengine.loadcontent(null); //webengine.load(ur); //add web view scene getchildren().add(browser); } private node createspacer() { region spacer = new region(); hbox.sethgrow(spacer, priority.always); return spacer; } @override protected void layoutchildren() { double w = getwidth(); double h = getheight(); layoutinarea(browser, 0, 0, w, h, 0, hpos.center, vpos.center); } @override protected double computeprefwidth(double height) { return 750; } @override protected double computeprefheight(double width) { return 500; } }
Comments
Post a Comment