interface CellBuilder<out T : JComponent> {
val component: T
- fun comment(text: String, maxLineLength: Int = 70, forComponent: Boolean = false): CellBuilder<T>
+ fun comment(@Nls text: String, maxLineLength: Int = 70, forComponent: Boolean = false): CellBuilder<T>
fun commentComponent(component: JComponent, forComponent: Boolean = false): CellBuilder<T>
fun focused(): CellBuilder<T>
fun withValidationOnApply(callback: ValidationInfoBuilder.(T) -> ValidationInfo?): CellBuilder<T>
import net.miginfocom.layout.BoundSize
import net.miginfocom.layout.CC
import net.miginfocom.layout.LayoutUtil
+import org.jetbrains.annotations.Nls
import javax.swing.*
import javax.swing.border.LineBorder
import kotlin.math.max
private val JComponent.constraints: CC
get() = builder.componentConstraints.getOrPut(this) { CC() }
- fun addCommentRow(comment: String, maxLineLength: Int, forComponent: Boolean) {
+ fun addCommentRow(@Nls comment: String, maxLineLength: Int, forComponent: Boolean) {
val commentComponent = ComponentPanelBuilder.createCommentComponent(comment, true, maxLineLength, true)
addCommentRow(commentComponent, forComponent)
}