Package ece.ing3.java.projet.utils
Class Utils
java.lang.Object
ece.ing3.java.projet.utils.Utils
Utility functions
- Author:
- Virgile, Nicolas, Louis-Félix
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Demande à l'utilisateur un choixstatic boolean
Demande à l'utilisateur un choixstatic void
Affiche un message d'erreur à l'utilisateurstatic void
Affiche un message d'erreur à l'utilisateurstatic Image
getImageResource
(String path) Get a resource's stream from a path relative to either the execution directory, JAR, or other paths supported by the JVM.static InputStream
getResource
(String path) Get a resource's stream from a path relative to either the execution directory, JAR, or other paths supported by the JVM.static String
getTextResource
(String path) Get a resource's stream from a path relative to either the execution directory, JAR, or other paths supported by the JVM.static void
Affiche un message général à l'utilisateurstatic void
Affiche un message général à l'utilisateur
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
getResource
Get a resource's stream from a path relative to either the execution directory, JAR, or other paths supported by the JVM.- Parameters:
path
- Relative resource path- Returns:
- Resource's stream
- Throws:
IOException
- Resource not found at the provided path
-
getImageResource
Get a resource's stream from a path relative to either the execution directory, JAR, or other paths supported by the JVM.- Parameters:
path
- Relative resource path- Returns:
- Resource's stream
- Throws:
IOException
- Loading error
-
getTextResource
Get a resource's stream from a path relative to either the execution directory, JAR, or other paths supported by the JVM.- Parameters:
path
- Relative resource path- Returns:
- Resource's stream
- Throws:
IOException
- Loading error
-
message
Affiche un message général à l'utilisateur- Parameters:
message
- Message à afficher
-
message
Affiche un message général à l'utilisateur- Parameters:
parent
- Fenêtre parentemessage
- Message à afficher
-
error
Affiche un message d'erreur à l'utilisateur- Parameters:
message
- Message d'erreur à afficher
-
error
Affiche un message d'erreur à l'utilisateur- Parameters:
parent
- Fenêtre parentemessage
- Message d'erreur à afficher
-
confirm
Demande à l'utilisateur un choix- Parameters:
title
- Titre de la boîte de dialoguemessage
- Message à afficher
-
confirm
Demande à l'utilisateur un choix- Parameters:
parent
- Fenêtre parentetitle
- Titre de la boîte de dialoguemessage
- Message à afficher
-