-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWelcomeScreenController.java
More file actions
38 lines (32 loc) · 1.07 KB
/
Copy pathWelcomeScreenController.java
File metadata and controls
38 lines (32 loc) · 1.07 KB
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
package openconsignment.controller;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Hyperlink;
import javafx.scene.text.Text;
import openconsignment.common.Constants;
import openconsignment.common.Utils;
public class WelcomeScreenController implements Initializable {
@FXML
private Text organization_name;
@FXML
private void handleOpenGithub(ActionEvent event) {
Hyperlink link = (Hyperlink) event.getSource();
String url = link.getText();
try {
Utils.launchBrowser(url);
} catch (IOException ex) {
Utils.showAlert(ex.toString());
Logger.getLogger(WelcomeScreenController.class.getName()).log(Level.SEVERE, ex.toString(), ex);
}
}
@Override
public void initialize(URL url, ResourceBundle rb) {
organization_name.setText(Constants.ORGANIZATION_NAME);
}
}