Bonjour j'ai un petit souci avec ma fenêtre qui sur mon ecran s'affiche très bien mais sur l'ecran des autres il y a des choses qui dépassent ou qui sont invisible, après quelques petites recherches j'ai vu que j'avais mis des valeurs absolu pour mon canvas sauf que dans scenebuilder je ne peux pas mettre quelque chose comme MAX_VALUE et dans le fxml je ne peux pas non plus donc je vous demande si vous avez des solutions, des infos à ce sujet svp merci.
fxml:
Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140 <?xml version="1.0" encoding="UTF-8"?> <?import javafx.scene.canvas.Canvas?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.CheckBox?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.ListView?> <?import javafx.scene.image.Image?> <?import javafx.scene.image.ImageView?> <?import javafx.scene.layout.BorderPane?> <?import javafx.scene.layout.ColumnConstraints?> <?import javafx.scene.layout.GridPane?> <?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.text.Font?> <BorderPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="control.EspaceController"> <right> <GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="800.0" prefWidth="279.0" BorderPane.alignment="CENTER"> <columnConstraints> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" /> </columnConstraints> <rowConstraints> <RowConstraints maxHeight="234.0" minHeight="0.0" prefHeight="48.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="480.0" minHeight="0.0" prefHeight="47.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="800.0" minHeight="0.0" prefHeight="617.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="600.0" minHeight="10.0" prefHeight="45.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="600.0" minHeight="0.0" prefHeight="45.0" vgrow="SOMETIMES" /> </rowConstraints> <children> <Pane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="870.0" prefWidth="280.0" GridPane.rowIndex="2"> <children> <Button layoutX="90.0" layoutY="30.0" mnemonicParsing="false" onMousePressed="#rotationXpositive" onMouseReleased="#stop" prefHeight="50.0" prefWidth="100.0" text="^"> <font> <Font size="25.0" /> </font> </Button> <Button layoutX="23.0" layoutY="70.0" mnemonicParsing="false" onMousePressed="#rotationYnegative" onMouseReleased="#stop" prefHeight="60.0" prefWidth="60.0" text="<"> <font> <Font size="25.0" /> </font> </Button> <Button layoutX="200.0" layoutY="70.0" mnemonicParsing="false" onMousePressed="#rotationYpositive" onMouseReleased="#stop" prefHeight="60.0" prefWidth="60.0" text=">"> <font> <Font size="25.0" /> </font> </Button> <Button layoutX="90.0" layoutY="130.0" mnemonicParsing="false" onMousePressed="#rotationXnegative" onMouseReleased="#stop" prefHeight="50.0" prefWidth="100.0" text="v"> <font> <Font size="25.0" /> </font> </Button> <Label layoutX="126.0" layoutY="6.0" text="+X" /> <Label layoutX="46.0" layoutY="45.0" text="-Y" /> <Label layoutX="130.0" layoutY="110.0" text="-X" /> <Label layoutX="221.0" layoutY="45.0" text="+Y" /> <Label layoutX="53.0" layoutY="169.0" text="-Z" /> <Label layoutX="207.0" layoutY="169.0" text="+Z" /> <Button contentDisplay="GRAPHIC_ONLY" layoutX="23.0" layoutY="188.0" mnemonicParsing="false" onMousePressed="#rotationZnegative" onMouseReleased="#stop"> <graphic> <ImageView id="logo" fitHeight="60.0" fitWidth="60.0" pickOnBounds="true"> <image> <Image url="@../images/fleche_droite.jpg" /> </image> </ImageView> </graphic> </Button> <Button layoutX="176.0" layoutY="188.0" mnemonicParsing="false" onMousePressed="#rotationZpositive" onMouseReleased="#stop"> <graphic> <ImageView id="logo" fitHeight="60.0" fitWidth="60.0" pickOnBounds="true"> <image> <Image url="@../images/fleche_gauche.jpg" /> </image> </ImageView> </graphic> </Button> <CheckBox fx:id="displayFacesCheckbox" layoutX="10.0" layoutY="270.0" mnemonicParsing="false" onAction="#afficherFaces" selected="true" text="Vue en face" /> <CheckBox fx:id="displayStrokesCheckbox" layoutX="135.0" layoutY="270.0" mnemonicParsing="false" onAction="#afficherSegments" selected="true" text="Vue en segment" /> </children> </Pane> <Button alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#rechercheFichier" text="Choisir un fichier" GridPane.rowIndex="4" /> <Button alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#zoom" text="ZOOM" /> <Button alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#dezoom" text="DEZOOM" GridPane.rowIndex="1" /> </children> </GridPane> </right> <center> <Canvas fx:id="canvas" height="850" width="1000" onMouseDragged="#mouseDrag" onMousePressed="#mousePressed" onMouseReleased="#mouseReleased" onScroll="#scroll" /> </center> <left> <ListView maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" BorderPane.alignment="CENTER" /> </left> </BorderPane>
Le canvas est au milieu je veux qu'il prenne toute la place du milieu.
J'ai un BorderPane avec à gauche TreeList au milieu Canvas à droite un GridPane avec les boutons etc à l'intérieur
Partager