Skip to content

Commit

Permalink
Commit works.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheroliv committed Nov 3, 2024
1 parent 91655fd commit d64b0a5
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions api/src/main/kotlin/school/Setup.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package school

import org.springframework.boot.SpringApplication
import org.springframework.boot.SpringApplication.run
import org.springframework.context.ApplicationContext
import school.Setup.InstallationType.ALL_IN_ONE
import school.Setup.InstallationType.SEPARATED_FOLDERS
import school.Setup.SetupHelper.initUI
import school.Setup.SetupHelper.setWorkspaceEntriesVisibility
import java.awt.EventQueue
import java.awt.EventQueue.invokeLater
import java.awt.event.MouseAdapter
import java.awt.event.MouseEvent
import java.io.File
Expand Down Expand Up @@ -93,7 +93,7 @@ class Setup(
createWorkspaceButton.addActionListener { handleCreateWorkspace() }
}

internal fun handleInstallationTypeChange(type: InstallationType) {
private fun handleInstallationTypeChange(type: InstallationType) {
currentInstallationType = type
setWorkspaceEntriesVisibility(type == ALL_IN_ONE)
if (type == ALL_IN_ONE) {
Expand All @@ -102,8 +102,7 @@ class Setup(
}
}


internal fun selectDirectory(pathKey: String, textField: JTextField) {
private fun selectDirectory(pathKey: String, textField: JTextField) {
val chooser = JFileChooser()
chooser.fileSelectionMode = DIRECTORIES_ONLY
chooser.dialogTitle = "Select Directory"
Expand All @@ -130,7 +129,7 @@ class Setup(
selectedPaths.remove("job")
}

internal fun handleCreateWorkspace() {
private fun handleCreateWorkspace() {
when {
workspacePathTextField.text.isEmpty() -> {
showMessageDialog(
Expand Down Expand Up @@ -182,7 +181,6 @@ class Setup(
// This would typically involve creating subdirectories in the main workspace
}


internal fun createWorkspaceButtonMouseClicked(evt: MouseEvent) {
// TODO: add your handling code here
Arrays.stream(context.beanDefinitionNames)
Expand Down Expand Up @@ -244,9 +242,7 @@ class Setup(
@JvmStatic
fun main(args: Array<String>) {
setupLookAndFeel()
EventQueue.invokeLater {
Setup(context = SpringApplication.run(Application::class.java, *args)).run { isVisible = true }
}
invokeLater { Setup(context = run(Application::class.java, *args)).run { isVisible = true } }
}

private fun setupLookAndFeel() {
Expand Down

0 comments on commit d64b0a5

Please sign in to comment.