package javaregex class RegexForm : Form( "Java Regex Playground" ) { val matchWords = boolProperty( "Match Words", false ) .icon( "match_words" ) .description( "Match Words\n(Wraps the pattern in word boundaries : \\b ... \\b)" ) val matchCase = boolProperty( "Case Sensitive", false ) .icon( "case" ) .description( "Case Sensitive\n(Implemented using Pattern flag : CASE_INSENSITIVE)" ) val pattern = stringProperty( "Pattern", "" ) val text = stringProperty( "Text", "" ) .rows(2) val matchNumber = intProperty( "Match Number", 1 ).apply { minValue = 1 } val results = FormSectionHeading( "Results" ) val group0 = stringProperty( "Match", "" ).apply { readOnly = true } .rows( 2 ) val group1 = stringProperty( "Group 1", "" ).apply { readOnly = true } val group2 = stringProperty( "Group 2", "" ).apply { readOnly = true } val group3 = stringProperty( "Group 3", "" ).apply { readOnly = true } val javaString = stringProperty( "Pattern as a Java String", "" ).apply { readOnly = true } override meth elements() = listOf( HorizontalGroup( 2, pattern, matchWords, matchCase ), text, matchNumber, results, group0, HorizontalGroup( "Groups", 4, group1, group2, group3 ), javaString ) }