Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from ochotzas/master
Refactored code to address code smells and improve readability
- Loading branch information
Showing
6 changed files
with
108 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 0 additions & 38 deletions
38
src/main/kotlin/org/idaesbasic/buffer/run/ExecutationSetupView.kt
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
src/main/kotlin/org/idaesbasic/buffer/run/ExecutionSetupView.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.idaesbasic.buffer.run | ||
|
||
import javafx.beans.property.SimpleStringProperty | ||
import tornadofx.* | ||
|
||
class ExecutionSetupView : View() { | ||
private val controller: RunConfigController by inject() | ||
|
||
private val configName = SimpleStringProperty() | ||
private val configCommand = SimpleStringProperty() | ||
|
||
override val root = squeezebox { | ||
fold("Existing configs") { | ||
listview(controller.configs) { | ||
isEditable = true | ||
cellFragment(RunConfigFragment::class) | ||
} | ||
} | ||
fold("New config") { | ||
form { | ||
fieldset("Information") { | ||
field("Name of config") { | ||
textfield(configName) | ||
} | ||
field("Command") { | ||
textfield(configCommand) | ||
} | ||
} | ||
button("Create config") { | ||
action { | ||
controller.addConfig(RunConfigModel(configName.value, configCommand.value)) | ||
configName.set("") | ||
configCommand.set("") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.