class MainWindow() {
companion object {
+ const val ITEM_SELETED = 900
const val ITEM_HAS_AUTHOR = 1000
const val ITEM_HAS_CATEGORY = 1001
const val ITEM_INTERNAL_BROWSER = 1002
}
rightPanel {
- tabview(fill = true, varname = "tabview", type = TabViewType.INVISIBLE) {
- tab {
- // Completely empty tab, we don't want any visible UI elements
- // when no feed item is selected.
- // As an alternative to using a tabview, we could use a
- // visibility state for the grid container
+ val g = grid(fill = true, columnspacing = 8, rowspacing = 8, margin = 8, defvfill = true) {
+ row {
+ rlabel("Feed:", hfill = true)
+ llabel(varname = "feedname", hexpand = true)
+ }
+ row {
+ val w1 = rlabel("Author:", hfill = true)
+ val w2 = llabel(varname = "author")
+ w1.setVisibilityStates(ITEM_HAS_AUTHOR)
+ w2.setVisibilityStates(ITEM_HAS_AUTHOR)
+ }
+ row {
+ val w1 = rlabel("Category: ", hfill = true)
+ val w2 = llabel(varname = "category")
+ w1.setVisibilityStates(ITEM_HAS_CATEGORY)
+ w2.setVisibilityStates(ITEM_HAS_CATEGORY)
+ }
+ row {
+ rlabel("Link:", hfill = true)
+ linkbutton(varname = "link", styleClass = "ui-nopadding");
}
- tab {
- grid(fill = true, columnspacing = 8, rowspacing = 8, margin = 8, defvfill = true) {
- row {
- rlabel("Feed:", hfill = true)
- llabel(varname = "feedname", hexpand = true)
- }
- row {
- val w1 = rlabel("Author:", hfill = true)
- val w2 = llabel(varname = "author")
- w1.setVisibilityStates(ITEM_HAS_AUTHOR)
- w2.setVisibilityStates(ITEM_HAS_AUTHOR)
- }
- row {
- val w1 = rlabel("Category: ", hfill = true)
- val w2 = llabel(varname = "category")
- w1.setVisibilityStates(ITEM_HAS_CATEGORY)
- w2.setVisibilityStates(ITEM_HAS_CATEGORY)
- }
- row {
- rlabel("Link:", hfill = true)
- linkbutton(varname = "link", styleClass = "ui-nopadding");
- }
- row {
- vbox(hfill = true, vfill = true, hexpand = true, vexpand = true, colspan = 2) {
- hbox(spacing = 4, visibilityStates = intArrayOf(ITEM_INTERNAL_BROWSER)) {
- button(icon = "go-previous")
- button(icon = "go-next")
- textfield(varname = "web-uri", fill = true)
- }
- webview(varname = "webview", fill = true, colspan = 2)
- }
+ row {
+ vbox(hfill = true, vfill = true, hexpand = true, vexpand = true, colspan = 2) {
+ hbox(spacing = 4, visibilityStates = intArrayOf(ITEM_INTERNAL_BROWSER)) {
+ button(icon = "go-previous")
+ button(icon = "go-next")
+ textfield(varname = "web-uri", fill = true)
}
+ webview(varname = "webview", fill = true, colspan = 2)
}
}
}
+ g.setVisibilityStates(ITEM_SELETED)
}
}