13
13
import javafx .event .ActionEvent ;
14
14
import javafx .fxml .Initializable ;
15
15
import javafx .geometry .NodeOrientation ;
16
+ import javafx .scene .Node ;
16
17
import javafx .scene .control .Button ;
17
18
import javafx .scene .control .Label ;
18
19
import javafx .scene .control .TextArea ;
27
28
import javafx .scene .shape .Circle ;
28
29
import javafx .scene .shape .Rectangle ;
29
30
import javafx .stage .FileChooser ;
31
+ import javafx .stage .Stage ;
30
32
31
33
import javax .imageio .ImageIO ;
32
34
import java .awt .image .BufferedImage ;
@@ -182,6 +184,12 @@ public void send() {
182
184
}
183
185
184
186
public void chooseImageButton (ActionEvent event ) {
187
+ Stage stage = (Stage ) ((Node ) event .getSource ()).getScene ().getWindow ();
188
+ fileChooser = new FileChooser ();
189
+ fileChooser .setTitle ("Open Image" );
190
+ this .filePath = fileChooser .showOpenDialog (stage );
191
+ fileChoosePath .setText (filePath .getPath ());
192
+ saveControl = true ;
185
193
}
186
194
187
195
public void saveImage (ActionEvent event ) {
@@ -198,13 +206,15 @@ public void saveImage(ActionEvent event) {
198
206
}
199
207
}
200
208
}
209
+ public void sendMessageByKey (KeyEvent event ) {
201
210
202
- public void mouseClickedAnotherArea (MouseEvent mouseEvent ) {
203
211
}
204
212
205
- public void sendMessageByKey ( KeyEvent event ) {
213
+ public void mouseClickedAnotherArea ( MouseEvent mouseEvent ) {
206
214
}
207
215
216
+
217
+
208
218
public void cameraIconMouseClicked (MouseEvent mouseEvent ) {
209
219
}
210
220
0 commit comments