panel(name:"Reference Name") {
label("Select XML field for reference name:", constraints:gbc(gridx:0,gridy:0, anchor:WEST))
comboBox(id:"refNameSelectBox",items:displayNameOptions, constraints:gbc(gridx:0,gridy:1,ipadx:20, anchor:WEST))
label("Before:", constraints:gbc(gridx:0, gridy:2, anchor:WEST))
textField(id:"refBeforeText", text:"taco", constraints:gbc(gridx:1,gridy:2,ipadx:30, gridwidth:REMAINDER, anchor:WEST))
label("After:", constraints:gbc(gridx:0, gridy:3, anchor:WEST))
textField(id:"refAfterText", text:bind(source:dispBeforeText, sourceProperty:'text'), constraints:gbc(gridx:1,gridy:3,ipadx:30,gridwidth:REMAINDER,anchor:WEST))
checkBox(id:"refSpaceUnder",text:"Replace spaces with _", constraints:gbc(gridx:0,gridy:1,gridwidth:REMAINDER,anchor:WEST))
checkBox(id:"refNoSpecials",text:"Remove Special Characters", constraints:gbc(gridx:0,gridy:2,gridwidth:REMAINDER,anchor:WEST))
}
我试图让用户预览一些文字操作。现在,我将refAfterText绑定到refBeforeText,它只复制文本。我想使用最后两个复选框来改变文本。检查这两个框会改变refBeforeText从"我有一个Taco!"到" I_have_a_Taco"在refAfterText。