-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from Paulanerus/dev
Dev
- Loading branch information
Showing
14 changed files
with
222 additions
and
34 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
package dev.paulee | ||
|
||
import dev.paulee.core.plugin.PluginServiceImpl | ||
import dev.paulee.ui.TextExplorerUI | ||
|
||
|
||
fun main() { | ||
val explorerUI = TextExplorerUI() | ||
val explorerUI = TextExplorerUI(PluginServiceImpl()) | ||
explorerUI.start() | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package dev.paulee.ui.components | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.window.AwtWindow | ||
import java.awt.FileDialog | ||
import java.awt.Frame | ||
import java.nio.file.Path | ||
|
||
@Composable | ||
fun FileDialog( | ||
parent: Frame? = null, | ||
onCloseRequest: (result: List<Path>) -> Unit | ||
) = AwtWindow( | ||
create = { | ||
object : FileDialog(parent, "Choose a file", LOAD) { | ||
|
||
init { | ||
isMultipleMode = true | ||
} | ||
|
||
override fun setVisible(value: Boolean) { | ||
super.setVisible(value) | ||
|
||
if (value) { | ||
val paths = files.map { it.toPath() }.toList() | ||
|
||
onCloseRequest(paths) | ||
} | ||
} | ||
} | ||
}, | ||
dispose = FileDialog::dispose | ||
) |
Oops, something went wrong.