Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CS346
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Wang
CS346
Commits
a6134e91
Commit
a6134e91
authored
2 years ago
by
Simon Wang
Browse files
Options
Downloads
Patches
Plain Diff
Added File Structure for Left Pane
parent
e4188660
No related branches found
No related tags found
No related merge requests found
Pipeline
#84079
passed
2 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/src/main/kotlin/net/codebot/application/FolderView.kt
+24
-0
24 additions, 0 deletions
...ion/src/main/kotlin/net/codebot/application/FolderView.kt
with
24 additions
and
0 deletions
application/src/main/kotlin/net/codebot/application/FolderView.kt
0 → 100644
+
24
−
0
View file @
a6134e91
package
net.codebot.application
import
javafx.scene.Node
import
javafx.scene.control.TreeItem
import
javafx.scene.control.TreeView
import
javafx.scene.image.Image
import
javafx.scene.image.ImageView
import
javafx.scene.layout.StackPane
import
java.io.File
class
FolderView
{
fun
build
()
:
StackPane
{
val
folder_img
=
ImageView
(
Image
(
"https://png.pngtree.com/png-vector/20190916/ourmid/pngtree-folder-icon-for-your-project-png-image_1731079.jpg"
))
folder_img
.
fitWidth
=
20.0
folder_img
.
fitHeight
=
20.0
val
folderIcon
:
Node
=
folder_img
val
rootItem
=
TreeItem
<
Any
?>(
"Inbox"
,
folderIcon
)
rootItem
.
isExpanded
=
true
File
(
"src/main/kotlin"
).
walk
(
FileWalkDirection
.
BOTTOM_UP
).
forEach
{
val
item
=
TreeItem
<
Any
?>(
it
)
rootItem
.
children
.
add
(
item
)
}
return
StackPane
(
TreeView
<
Any
?>(
rootItem
))
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment