本文整理汇总了Java中org.netbeans.validation.api.ui.swing.ValidationPanel.setInnerComponent方法的典型用法代码示例。如果您正苦于以下问题:Java ValidationPanel.setInnerComponent方法的具体用法?Java ValidationPanel.setInnerComponent怎么用?Java ValidationPanel.setInnerComponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.validation.api.ui.swing.ValidationPanel
的用法示例。
在下文中一共展示了ValidationPanel.setInnerComponent方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initPaginationControlPanel
import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入方法依赖的package包/类
private void initPaginationControlPanel() {
pageCtrlPanel = new PaginationCtrlPanel();
pageCtrlPanel.setPageSize(pageSize+"");
panelValdPagCtrl = new ValidationPanel();
panelValdPagCtrl.setBorder(new TitledBorder(new LineBorder(Color.BLACK), "Pagination Control",
TitledBorder.CENTER,TitledBorder.TOP));
panelValdPagCtrl.setInnerComponent(pageCtrlPanel);
vgPagControl = panelValdPagCtrl.getValidationGroup();
vgPagControl.add(pageCtrlPanel.getPageSizeTextField(),
StringValidators.REQUIRE_VALID_INTEGER,
StringValidators.REQUIRE_NON_NEGATIVE_NUMBER,
StringValidators.REQUIRE_NON_EMPTY_STRING);
vgPagControl.add(pageCtrlPanel.getVisibleRowTextField(),
StringValidators.REQUIRE_VALID_INTEGER,
StringValidators.REQUIRE_NON_NEGATIVE_NUMBER,
StringValidators.REQUIRE_NON_EMPTY_STRING);
vgPagControl.add(pageCtrlPanel.getSelectedPageTextField(),
StringValidators.REQUIRE_VALID_INTEGER,
StringValidators.REQUIRE_NON_NEGATIVE_NUMBER,
StringValidators.REQUIRE_NON_EMPTY_STRING);
}
示例2: initValidator
import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入方法依赖的package包/类
private void initValidator() {
panelValAcc = new ValidationPanel();
panelValAcc.setBorder(new TitledBorder(new LineBorder(Color.BLUE), "Main Memory Configuration", TitledBorder.CENTER,TitledBorder.TOP));
panelMainMem = new MainMemoryPanel();
panelValAcc.setInnerComponent(panelMainMem);
vg = panelValAcc.getValidationGroup();
vg.add(panelMainMem.getXmlSchemaTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE
//StringValidators.FILE_MUST_EXIST
);
vg.add(panelMainMem.getXmlInstanceTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE
//StringValidators.FILE_MUST_EXIST
);
panelMainMem.getXmlInstanceTextField()
.getDocument()
.addDocumentListener(new ValidDocumentListener());
panelMainMem.getXmlSchemaTextField()
.getDocument()
.addDocumentListener(new ValidDocumentListener());
}
示例3: createValidationPanel
import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入方法依赖的package包/类
private ValidationPanel createValidationPanel(Object msg, DialogDescriptor des) {
ValidationPanel result;
result = validationGroup == null ? new ValidationPanel() : new ValidationPanel(validationGroup);
result.setDelegateValidationUI(new DialogDescriptorAdapter(des));
if (msg instanceof Component) {
result.setInnerComponent((Component) msg);
} else {
result.setInnerComponent(new JLabel(msg.toString()));
}
return result;
}
示例4: initValidation
import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入方法依赖的package包/类
private void initValidation() {
panelValidation = new ValidationPanel();
panelValidation.setInnerComponent(this);
panelValidation.setBorder(new TitledBorder(new LineBorder(Color.BLUE), "Strategies",
TitledBorder.CENTER,TitledBorder.TOP));
vg = panelValidation.getValidationGroup();
vg.add(charsTextField, StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE);
vg.add(charTOAddTextField, StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE,
StringValidators.REQUIRE_VALID_INTEGER);
vg.add(charsToRemoveTextField, StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE,
StringValidators.REQUIRE_VALID_INTEGER);
vg.add(charToSwitchTextField, StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE,
StringValidators.REQUIRE_VALID_INTEGER);
charsTextField.getDocument()
.addDocumentListener(new ValidatorDocListener());
charTOAddTextField.getDocument()
.addDocumentListener(new ValidatorDocListener());
charsToRemoveTextField.getDocument()
.addDocumentListener(new ValidatorDocListener());
charToSwitchTextField.getDocument()
.addDocumentListener(new ValidatorDocListener());
}
示例5: initValidation
import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void initValidation() {
panelValidation = new ValidationPanel();
panelValidation.setInnerComponent(this);
panelValidation.setBorder(new TitledBorder(new LineBorder(Color.BLUE), "Strategies",
TitledBorder.CENTER,TitledBorder.TOP));
vg = panelValidation.getValidationGroup();
vg.add(charsTextField, StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE);
vg.add(charTOAddTextField, StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE,
StringValidators.REQUIRE_VALID_INTEGER);
vg.add(charsToRemoveTextField, StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE,
StringValidators.REQUIRE_VALID_INTEGER);
vg.add(charToSwitchTextField, StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE,
StringValidators.REQUIRE_VALID_INTEGER);
charsTextField.getDocument()
.addDocumentListener(new ValidatorDocListener());
charTOAddTextField.getDocument()
.addDocumentListener(new ValidatorDocListener());
charsToRemoveTextField.getDocument()
.addDocumentListener(new ValidatorDocListener());
charToSwitchTextField.getDocument()
.addDocumentListener(new ValidatorDocListener());
}
示例6: initValidator
import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入方法依赖的package包/类
private void initValidator() {
panelValAcc = new ValidationPanel();
panelValAcc.setBorder(new TitledBorder(new LineBorder(Color.BLUE), "Plain Instance", TitledBorder.CENTER,TitledBorder.TOP));
memoryGeneratePanel = new MainMemoryGeneratePanel();
panelValAcc.setInnerComponent(getMemoryGeneratePanel());
vg = panelValAcc.getValidationGroup();
vg.add(getMemoryGeneratePanel().getPlainInstanceArea(), StringValidators.REQUIRE_NON_EMPTY_STRING);
getMemoryGeneratePanel().getPlainInstanceArea()
.getDocument()
.addDocumentListener(new ValidatorDocList());
}
示例7: initAccPanel
import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入方法依赖的package包/类
private void initAccPanel() {
panelValAcc = new ValidationPanel();
panelValAcc.setBorder(new TitledBorder(new LineBorder(Color.BLACK), "Access Configuration", TitledBorder.CENTER,TitledBorder.TOP));
panelAcc = new AccesConfPanel();
panelValAcc.setInnerComponent(getPanelAcc());
vg = panelValAcc.getValidationGroup();
vg.add(getPanelAcc().getDriverTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE);
vg.add(getPanelAcc().getUriTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE);
vg.add(getPanelAcc().getSchemaTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING,
StringValidators.NO_WHITESPACE);
vg.add(getPanelAcc().getLoginTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING);
vg.add(getPanelAcc().getPasswordTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING);
vg.add(panelInitDb.getScriptArea(), StringValidators.REQUIRE_NON_EMPTY_STRING);
getPanelAcc().getDriverTextField()
.getDocument()
.addDocumentListener(new ValidatorDocumentListener());
getPanelAcc().getUriTextField()
.getDocument()
.addDocumentListener(new ValidatorDocumentListener());
getPanelAcc().getSchemaTextField()
.getDocument()
.addDocumentListener(new ValidatorDocumentListener());
getPanelAcc().getLoginTextField()
.getDocument()
.addDocumentListener(new ValidatorDocumentListener());
getPanelAcc().getPasswordTextField()
.getDocument()
.addDocumentListener(new ValidatorDocumentListener());
//panelInitDb.getScriptArea()
// .getDocument()
// .addDocumentListener(new ValidatorDocumentListener());
}