SwingAbstractWizardWindow.ktprojectforge-application/src/main/kotlin/org/projectforge/setup/wizard/swing/SwingAbstractWizardWindow.kt
que contiene código Kotlin para la capa del Asistente de configuración.
Clases: SwingAbstractWizardWindow
Super-tipo(s): JPanel
Funciones (6): getButtons, getContentPanel, aboutToDisplay, displaying, aboutToHide, redraw
Propiedades (6): mainPanel, context, contentPanel, buttonPanel, titlePanel, panel
Importaciones: 5 paquetes
Paquete: org.projectforge.setup.wizard.swing
package org.projectforge.setup.wizard.swing
import java.awt.GridBagConstraints
import java.awt.GridBagLayout
import javax.swing.JButton
import javax.swing.JLabel
import javax.swing.JPanel
abstract class SwingAbstractWizardWindow(context: SwingGUIContext,
title: String) : JPanel() {
val mainPanel: JPanel
protected val context: SwingGUIContext
private val contentPanel: JPanel
private val buttonPanel: JPanel
init {
this.context = context
mainPanel = JPanel(GridBagLayout())
val titlePanel = JPanel()
//LayoutUtils.addEmptySpace(titlePanel)
titlePanel.add(JLabel(title))
//LayoutUtils.addEmptySpace(titlePanel)
mainPanel.add(titlePanel, SwingUtils.constraints(0, 0))
contentPanel = getContentPanel()
//contentPanel.layoutData = GridLayout.createLayoutData(GridLayout.Alignment.FILL, GridLayout.Alignment.FILL, true, true)
mainPanel.add(contentPanel, SwingUtils.constraints(0, 1))
mainPanel.add(JLabel(""), SwingUtils.constraints(0, 2, fill = GridBagConstraints.BOTH, weighty = 1.0))
buttonPanel = SwingUtils.createButtonBar(context, true, *getButtons())
mainPanel.add(buttonPanel, SwingUtils.constraints(0, 3, fill = GridBagConstraints.HORIZONTAL))
}
open fun getButtons(): Array<JButton> {
return arrayOf()
}
open fun getContentPanel(): JPanel {
val panel = JPanel()
//panel.addComponent(EmptySpace())
return panel
}
fun aboutToDisplay() {
// Coloque aquí el código que se ejecutará antes de que
// se muestre el panel.
}
fun displaying() {
// Coloque aquí el código que se ejecutará cuando se
// muestre el panel.
}
fun aboutToHide() {
// Coloque aquí el código que se ejecutará cuando se
// oculte el panel.
}
/**
* Se llamará si la ventana se muestra nuevamente.
*/
open fun redraw() {}
}
868d6abb7 2025 -> 2026 63081666f Encabezados de archivos fuente: 2024 -> 2025. b6092df09 Derechos de autor 2023 -> 2024 ab45d51fa Derechos de autor 2001-2022 -> 2001-2023. 5f7ef41b8 Derechos de autor 2021 -> 2022