1. include jar into your project or copy packages
2. create new CommandLine object
CommandLine cmd = new CommandLine(stage, icon, languageBundle, commandBundle);
Parameters:
- stage = Stage - owner for the new CommanLine stage (usually the primaryStage)
- icon = javafx.scene.image.Image - icon for the stage
-
languageBundle = ResourceBundle.getBundle("commandLine/", Locale.YOURCOUNTRY) - language bundle for the CommandLine
_(use included example en.properties) -
commandBundle = CommandBundle (use default or extend with the objects you need)
(just create getter and setter and set the variables before passingcommandBundle
tonew CommandLine();
)
3. open commandLine with try/catch-block
try
{
cmd.showCommandLine(title, width, height, minWidth, minHeight, positionX, positionY, useDarkMode);
}
catch(IOException e)
{
//TODO: errorhandling
e.printStackTrace();
}
Parameters:
- title = String - title of the stage
- width = double - inital width of the stage
- height = double - initital height of the stage
- minwidth = double - minimal width of the stage
- minHeight = double - minimal height of the stage
- positionX = double - x position where stage should spawn
- positionY = double - y position where stage should spawn
- useDarkMode = boolean - enable or disable darkMode
Note: you can close the stage programatically with: cmd.closeCommandLine();
Create your own commands
4.For further help look into package test
and class Main