Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
dc32071529
2 changed files with 19 additions and 6 deletions
5
NOTES.md
5
NOTES.md
|
@ -19,3 +19,8 @@ Décentralisée ou centralisée sur serveur, au choix
|
||||||
* Chaque noeud à une bdd locale -> Serveur SQL qu'on veut (SQLite plus simple)
|
* Chaque noeud à une bdd locale -> Serveur SQL qu'on veut (SQLite plus simple)
|
||||||
|
|
||||||
|
|
||||||
|
## Rapport
|
||||||
|
expliquer l'archi et les choix
|
||||||
|
expliquer schéma bdd relationnelle
|
||||||
|
manuel utilisation appli
|
||||||
|
plus import -> procédure déploiement
|
|
@ -13,6 +13,7 @@ import javafx.scene.layout.VBox;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
@ -41,12 +42,7 @@ public class MessageListItemController implements Initializable {
|
||||||
FileMessage fileMessage = ((FileMessage) message);
|
FileMessage fileMessage = ((FileMessage) message);
|
||||||
text += "\n<" + fileMessage.getFileName() + ">";
|
text += "\n<" + fileMessage.getFileName() + ">";
|
||||||
button.setOnMouseClicked(event -> {
|
button.setOnMouseClicked(event -> {
|
||||||
Desktop desktop = Desktop.getDesktop();
|
openFile(fileMessage.getPath());
|
||||||
try {
|
|
||||||
desktop.open(new File(fileMessage.getPath()));
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
button.setText(text);
|
button.setText(text);
|
||||||
|
@ -62,6 +58,18 @@ public class MessageListItemController implements Initializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void openFile(String path) {
|
||||||
|
if (Desktop.isDesktopSupported()) {
|
||||||
|
new Thread(() -> {
|
||||||
|
try {
|
||||||
|
Desktop.getDesktop().open(new File(path));
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes any style applied to the background
|
* Removes any style applied to the background
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue