All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.ru.casperix.demo_platform.application.DemoApplicationView.kt Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package ru.casperix.demo_platform.application

import ru.casperix.light_ui.component.panel.Panel
import ru.casperix.light_ui.element.Container
import ru.casperix.light_ui.element.Element
import ru.casperix.light_ui.layout.Layout

class DemoApplicationView {
    val controlPanel = Panel(Layout.VERTICAL)
    val demoContainer = Container(Layout.VERTICAL)
    val uiRoot = Container(Layout.VERTICAL, controlPanel, demoContainer)

    fun setRoot(root: Element) {
        demoContainer.children.toList().forEach { demoContainer.remove(it.element) }
        demoContainer.add(root)
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy