|
|
|
### 1. include jar into your project or copy packages
|
|
|
|
|
|
|
|
### 2. create new CommandLine object
|
|
|
|
|
|
|
|
```java
|
|
|
|
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 passing `commandBundle` to `new CommandLine();`)_
|
|
|
|
|
|
|
|
### 3. open commandLine with try/catch-block
|
|
|
|
|
|
|
|
```java
|
|
|
|
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 programaticalle with:_ ` cmd.closeCommandLine();`
|
|
|
|
|
|
|
|
### 4. [Create your own commands](Create your own commands)
|
|
|
|
|
|
|
|
|