mirror of
https://github.com/klmp200/sierpinski-fractales.git
synced 2024-11-21 23:33:20 +00:00
Nice UI
This commit is contained in:
parent
18052c1da3
commit
8e370e3a29
@ -4,7 +4,7 @@
|
|||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
|
|
||||||
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="608.0" prefWidth="813.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.sarl.demos.sierpinski.gui.FXMLViewerController">
|
<Pane fx:id="mainPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="608.0" prefWidth="813.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.sarl.demos.sierpinski.gui.FXMLViewerController">
|
||||||
<children>
|
<children>
|
||||||
<Canvas fx:id="drawZone" height="600.0" layoutX="199.0" layoutY="4.0" rotate="180.0" scaleX="-1.0" width="600.0" />
|
<Canvas fx:id="drawZone" height="600.0" layoutX="199.0" layoutY="4.0" rotate="180.0" scaleX="-1.0" width="600.0" />
|
||||||
<Button layoutX="26.0" layoutY="45.0" mnemonicParsing="false" onAction="#actionSetup" text="Setup" />
|
<Button layoutX="26.0" layoutY="45.0" mnemonicParsing="false" onAction="#actionSetup" text="Setup" />
|
||||||
|
@ -20,6 +20,7 @@ class FractalesFXApplications extends Application {
|
|||||||
loader.setBuilderFactory(new JavaFXBuilderFactory)
|
loader.setBuilderFactory(new JavaFXBuilderFactory)
|
||||||
var root: Parent = loader.load(location.openStream) as Parent
|
var root: Parent = loader.load(location.openStream) as Parent
|
||||||
var scene: Scene = new Scene(root)
|
var scene: Scene = new Scene(root)
|
||||||
|
scene.stylesheets.add(class.getResource("ViewerController.css").toExternalForm)
|
||||||
stage.setTitle("SARL Demo: Sierpinski Fractal Animation")
|
stage.setTitle("SARL Demo: Sierpinski Fractal Animation")
|
||||||
stage.setScene(scene)
|
stage.setScene(scene)
|
||||||
stage.show
|
stage.show
|
||||||
|
46
src/main/sarl/io/sarl/demos/sierpinski/ViewerController.css
Normal file
46
src/main/sarl/io/sarl/demos/sierpinski/ViewerController.css
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Bartuccio Antoine
|
||||||
|
* @Date: 2017-05-26 17:51:42
|
||||||
|
* @Last Modified by: klmp200
|
||||||
|
* @Last Modified time: 2017-05-26 17:55:16
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Nice white #F9FAFB
|
||||||
|
// Nice black #2B2B2B
|
||||||
|
|
||||||
|
#mainPane {
|
||||||
|
-fx-background-color: #2B2B2B;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-bar {
|
||||||
|
-fx-background-color: rgb(57, 57, 57);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-bar .thumb {
|
||||||
|
-fx-background-color: rgb(169, 169, 169);
|
||||||
|
-fx-background-radius: 0em;
|
||||||
|
-fx-background-inserts: 0, 0, 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-bar .increment-arrow,
|
||||||
|
.scroll-bar .decrement-arrow {
|
||||||
|
-fx-color: rgb(169, 169, 169);
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-bar:hover .increment-arrow,
|
||||||
|
.scroll-bar:hover .decrement-arrow {
|
||||||
|
-fx-color: #2B2B2B;
|
||||||
|
-fx-background-color: rgb(169, 169, 169);
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
-fx-text-fill: #F9FAFB;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
-fx-background-radius: 0em;
|
||||||
|
-fx-background-inserts: 0, 0, 0;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-text-fill: #2B2B2B;
|
||||||
|
-fx-background-color: rgb(169, 169, 169);
|
||||||
|
}
|
@ -42,11 +42,12 @@ class FXMLViewerController implements EventListener {
|
|||||||
@FXML private var multiplyButton: Button
|
@FXML private var multiplyButton: Button
|
||||||
|
|
||||||
@FXML public def exitApplication(){
|
@FXML public def exitApplication(){
|
||||||
|
if (setuped){
|
||||||
var e = new Exit()
|
var e = new Exit()
|
||||||
this.multiplyButton.setDisable(true)
|
this.multiplyButton.setDisable(true)
|
||||||
e.source = new Address(ispace.spaceID, id)
|
e.source = new Address(ispace.spaceID, id)
|
||||||
this.ispace.emit(e)
|
this.ispace.emit(e)
|
||||||
// Platform.ext()
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML protected def actionSetup() {
|
@FXML protected def actionSetup() {
|
||||||
|
Loading…
Reference in New Issue
Block a user