Package it.univr.wordautomata.utils
Class Methods
java.lang.Object
it.univr.wordautomata.utils.Methods
Methods used in the application
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javafx.scene.control.ContextMenubuildContextMenu(javafx.scene.Node node) Builds a context menu for the given node.static booleanexistsState(String label, State state) Checks if a given state exists.static booleanexistsTransitionFromVertex(String state, String transition) Checks if a transition exists from a given state.static booleanexistsTransitionToVertex(String state, String transition) Checks if a transition exists to a given state.static javafx.fxml.FXMLLoaderReturns the FXMLLoader of the given FXML file.static FilegetResource(Class<?> className, String folder, String name) static voidloadAndSetController(String path, javafx.scene.Node n) Loads the FXML file from the given path and sets the controller of the given node.static voidLoads the fonts from the given file names.static voidOpens the given link.static voidopenModalLink(String url) Shows the given link in a modal dialog.static voidsave()Shows the save dialog.static voidsaveAs()Shows the save as dialog.static voidsetIcon(javafx.stage.Stage stage) Sets the icon of the given stage.
-
Constructor Details
-
Methods
public Methods()
-
-
Method Details
-
loadFonts
Loads the fonts from the given file names.- Parameters:
fileNames- the file names of the fonts to load
-
loadAndSetController
Loads the FXML file from the given path and sets the controller of the given node.- Parameters:
path- the path of the FXML filen- the node to set the controller of
-
getLoader
Returns the FXMLLoader of the given FXML file.- Parameters:
fxml- the name of the FXML file- Returns:
- the FXMLLoader of the given FXML file
-
setIcon
public static void setIcon(javafx.stage.Stage stage) Sets the icon of the given stage.- Parameters:
stage- the stage to set the icon of
-
buildContextMenu
public static javafx.scene.control.ContextMenu buildContextMenu(javafx.scene.Node node) Builds a context menu for the given node.- Parameters:
node- the node to build the context menu for- Returns:
- the context menu for the given node
-
save
public static void save()Shows the save dialog. -
saveAs
public static void saveAs()Shows the save as dialog. -
existsState
Checks if a given state exists.- Parameters:
label- the label of the state to checkstate- the state to check- Returns:
- true if the state exists, false otherwise
-
existsTransitionFromVertex
Checks if a transition exists from a given state.- Parameters:
state- the state to checktransition- the transition to check- Returns:
- true if a transition exists from the given state, false otherwise
-
existsTransitionToVertex
Checks if a transition exists to a given state.- Parameters:
state- the state to checktransition- the transition to check- Returns:
- true if a transition exists to the given state, false otherwise
-
openLink
Opens the given link.- Parameters:
url- the link to open
-
openModalLink
Shows the given link in a modal dialog.- Parameters:
url- the link to show
-
getResource
-