Author: echatellier Date: 2013-03-31 19:29:30 +0200 (Sun, 31 Mar 2013) New Revision: 566 Url: http://nuiton.org/projects/sandbox/repository/revisions/566 Log: Initial commit. Added: jfxwvpoc/.settings/ jfxwvpoc/src/ jfxwvpoc/src/html/ jfxwvpoc/src/html/index.html jfxwvpoc/src/html/logo.png jfxwvpoc/src/org/ jfxwvpoc/src/org/codelutin/ jfxwvpoc/src/org/codelutin/test/ jfxwvpoc/src/org/codelutin/test/Main.java Added: jfxwvpoc/src/html/index.html =================================================================== --- jfxwvpoc/src/html/index.html (rev 0) +++ jfxwvpoc/src/html/index.html 2013-03-31 17:29:30 UTC (rev 566) @@ -0,0 +1,117 @@ +<!-- + Copyright (C) 2013 Ceric35 + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. --> +<html> + <head> + + <style> + .scene { + -webkit-perspective:2800px; + } + + .main { + border:1px solid black; + background-color:yellow; + width:400px; + height:400px; + } + .mainanim { + -webkit-transform-style: preserve-3d; + -webkit-animation:tourne ease-in-out 3s forwards; + } + @-webkit-keyframes tourne{ + from {} + to{ -webkit-transform: rotateY(90deg); } + } + + .cube { + position: absolute; + left: 200px; + top: 200px; + z-index: -10; + -webkit-transform-style: preserve-3d; + -webkit-animation:AnimCube 3s linear infinite; + + } + @-webkit-keyframes AnimCube{ + from {} + to{ -webkit-transform: rotateZ(360deg) rotateY(360deg) rotateX(360deg); } + } + .face { + background-image:url('logo.png'); + background-repeat:no-repeat; + width:100px; + height:100px; + position: absolute; + } + .face1 { + -webkit-transform: translateZ(50px); + } + .face2 { + -webkit-transform: translateZ(-50px); + } + .face3 { + -webkit-transform: translateX(50px) rotateY(90deg); + } + .face4 { + -webkit-transform:translateX(-50px) rotateY(-90deg); + } + .face5 { + -webkit-transform:translateY(50px) rotateX(90deg); + } + .face6 { + -webkit-transform:translateY(-50px) rotateX(-90deg); + } + .cube:hover .face1 { + -webkit-transform: translateZ(90px); + } + .cube:hover .face2 { + -webkit-transform: translateZ(-90px); + } + .cube:hover .face3 { + -webkit-transform: translateX(90px) rotateY(90deg); + } + .cube:hover .face4 { + -webkit-transform:translateX(-90px) rotateY(-90deg); + } + .cube:hover .face5 { + -webkit-transform:translateY(90px) rotateX(90deg); + } + .cube:hover .face6 { + -webkit-transform:translateY(-90px) rotateX(-90deg); + } + </style> + </head> + + <body> + + <div class="scene"> + <div class="main" onClick="this.setAttribute('class', 'main mainanim');"> + Jtimer + + <div class="cube"> + <div class="face face1">1</div> + <div class="face face2">2</div> + <div class="face face3">3</div> + <div class="face face4">4</div> + <div class="face face5">5</div> + <div class="face face6">6</div> + </div> + </div> + </div> + </body> +</html> + Added: jfxwvpoc/src/html/logo.png =================================================================== (Binary files differ) Property changes on: jfxwvpoc/src/html/logo.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: jfxwvpoc/src/org/codelutin/test/Main.java =================================================================== --- jfxwvpoc/src/org/codelutin/test/Main.java (rev 0) +++ jfxwvpoc/src/org/codelutin/test/Main.java 2013-03-31 17:29:30 UTC (rev 566) @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2013 Ceric35 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. */ + +package org.codelutin.test; + +import java.net.URL; + +import javafx.application.Application; +import javafx.geometry.HPos; +import javafx.geometry.VPos; +import javafx.scene.Scene; +import javafx.scene.layout.Region; +import javafx.scene.paint.Color; +import javafx.scene.web.WebEngine; +import javafx.scene.web.WebView; +import javafx.stage.Stage; + +public class Main extends Application { + + public static void main(String[] args) { + launch(args); + } + + @Override + public void start(Stage primaryStage) throws Exception { + primaryStage.setTitle("Web View"); + Browser browser = new Browser(); + Scene scene = new Scene(browser, 1180, 800, Color.web("#666970")); + primaryStage.setScene(scene); + primaryStage.show(); + + } +} + +class Browser extends Region { + static { // use system proxy settings when standalone application + // System.setProperty("java.net.useSystemProxies", "true"); + } + + final WebView browser = new WebView(); + final WebEngine webEngine = browser.getEngine(); + + public Browser() { + getStyleClass().add("browser"); + //webEngine.load("http://www.google.com/"); + URL url = getClass().getResource("/html/index.html"); + webEngine.load(url.toExternalForm()); + getChildren().add(browser); + } + + @Override + protected void layoutChildren() { + final double w = getWidth(); + final double h = getHeight(); + layoutInArea(browser, 0, 0, w, h, 0, HPos.CENTER, VPos.CENTER); + } + + @Override + protected double computePrefWidth(final double height) { + return 800; + } + + @Override + protected double computePrefHeight(final double width) { + return 600; + } +}
participants (1)
-
echatellier@users.nuiton.org