当前位置: 首页>>代码示例>>Java>>正文


Java ValidationPanel类代码示例

本文整理汇总了Java中org.netbeans.validation.api.ui.swing.ValidationPanel的典型用法代码示例。如果您正苦于以下问题:Java ValidationPanel类的具体用法?Java ValidationPanel怎么用?Java ValidationPanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ValidationPanel类属于org.netbeans.validation.api.ui.swing包,在下文中一共展示了ValidationPanel类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:23,代码来源:TableDataView.java

示例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());
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:22,代码来源:MainMemoryEditPanel.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:DialogBuilder.java

示例4: initPanel

import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入依赖的package包/类
private void initPanel()   {
    panelValAcc = new ValidationPanel();
    getPanelValAcc().setBorder(new TitledBorder(new LineBorder(Color.BLACK), "EGTask Configuration", 
                                                    TitledBorder.CENTER,TitledBorder.TOP));
    panel = new ConfEGTaskPanel();
    getPanelValAcc().setInnerComponent(panel);
    vg = getPanelValAcc().getValidationGroup();
    vg.add(panel.getExportCellChangesPathTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING);
    vg.add(panel.getExportDirtyDbTypeTextField(),StringValidators.REQUIRE_NON_EMPTY_STRING);
    
    vg.add(panel.getExportDirtyDBPathTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING);
    
    vg.add(panel.getCloneSuffixTextField(), StringValidators.REQUIRE_NON_EMPTY_STRING);
    
    //vg.add(panel.getQueryWxecutionTimeOutTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getSizeFactorReductionTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    
    
    panel.getExportCellChangesPathTextField()
            .getDocument()
            .addDocumentListener(new ValidatorDocListener());
    panel.getExportDirtyDbTypeTextField()
            .getDocument()
            .addDocumentListener(new ValidatorDocListener());
    panel.getExportDirtyDBPathTextField()
            .getDocument()
            .addDocumentListener(new ValidatorDocListener());
    panel.getCloneSuffixTextField()
            .getDocument()
            .addDocumentListener(new ValidatorDocListener());
    panel.getSizeFactorReductionTextField()
            .getDocument()
            .addDocumentListener(new ValidatorDocListener());
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:35,代码来源:ConfEGTaskEditPanel.java

示例5: 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());
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:29,代码来源:DirtyStrategyPanel.java

示例6: 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());
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:30,代码来源:DefaultDirtyStrategyPanel.java

示例7: initPanel

import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入依赖的package包/类
private void initPanel()   {
    panelValAcc = new ValidationPanel();
    getPanelValAcc().setBorder(new TitledBorder(new LineBorder(Color.BLACK), "VioGenQuery Configuration", 
                                                    TitledBorder.CENTER,TitledBorder.TOP));
    panel = new ConfVioGenQPanel();
    getPanelValAcc().setInnerComponent(panel);
    vg = getPanelValAcc().getValidationGroup();
    vg.add(panel.getPercentagjTextField1(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getQueryExecutorjTextField1(), StringValidators.NO_WHITESPACE);
    vg.add(panel.getMaxNumberOfRowsForSingleTupleQueriesjTextField1(),StringValidators.REQUIRE_VALID_INTEGER);
    
    vg.add(panel.getSizeFactorForStandardQueriesTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getSizeFactorForSymmetricQueriesTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getSizeFactorForInequalityQueriesTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getSizeFactorForSingleTupleQueriesTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    
    vg.add(panel.getProbabilityFactorForStandardQueriesTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getProbabilityFactorForSymmetricQueriesTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getProbabilityFactorForInequalityQueriesTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getProbabilityFactorForSingleTupleQueriesTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    
    vg.add(panel.getWindowSizeFactorForStandardQueriesTextField(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getWindowSizeFactorForSymmetricQueriesjTextField1(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getWindowSizeFactorForInequalityQueriesjTextField1(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getWindowSizeFactorForSingleTupleQueriesjTextField1(), StringValidators.REQUIRE_VALID_NUMBER);
    
    vg.add(panel.getOffsetFactorForStandardQueriesjTextField1(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getOffsetFactorForSymmetricQueriesjTextField1(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getOffsetFactorForInequalityQueriesjTextField1(), StringValidators.REQUIRE_VALID_NUMBER);
    vg.add(panel.getOffsetFactorForSingleTupleQueriesjTextField1(), StringValidators.REQUIRE_VALID_NUMBER);
    
    for(Document d : panel.getAllDocument())   {
        d.addDocumentListener(WeakListeners.create(DocumentListener.class, new ValidDocListener(), panel));
    }
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:36,代码来源:ConfVioGenQEditPanel.java

示例8: 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());
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:12,代码来源:MainMeemoryGENEditPanel.java

示例9: 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());
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:35,代码来源:DbmsEditPanel.java

示例10: createDialogDescriptor

import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入依赖的package包/类
private DialogDescriptor createDialogDescriptor() {
    if (message == null) {
        throw new IllegalStateException("Message not set"); //NOI18N
    }
    Object msg = message;
    final DialogDescriptor dlg = new DialogDescriptor(msg, title);
    if (validationGroup != null) {
        msg = createValidationPanel(msg, dlg);
        dlg.setMessage(msg);
    }

    if (msg instanceof ValidationPanel) {
        DialogDescriptorAdapter adap = new DialogDescriptorAdapter(dlg);
        ((ValidationPanel) msg).setDelegateValidationUI(adap);
    }

    dlg.setModal(modal);
    dlg.setHelpCtx(this.ctx == null ? HelpCtx.DEFAULT_HELP : this.ctx);
    if (additionalOptions != null) {
        dlg.setAdditionalOptions(options);
    }
    if (optionType != null) {
        if (optionType != ButtonSet.CLOSE) {
            dlg.setOptionType(optionType.getDialogDisplayerConstant());
        } else {
            dlg.setOptions(new Object[]{NbBundle.getMessage(DialogBuilder.class,
                        "BTN_CLOSE")}); //NOI18N
        }
    } else if (options == null) {
        dlg.setOptionType(ButtonSet.OK_CANCEL.getDialogDisplayerConstant());
    } else if (options != null) {
        dlg.setOptions(options);
    }
    if (al != null) {
        dlg.setButtonListener(al);
    }
    if (closingOptions != null) {
        dlg.setClosingOptions(options);
    }
    dlg.setMessageType(dialogType.getDialogDisplayerConstant());
    return dlg;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:43,代码来源:DialogBuilder.java

示例11: getPanelValAcc

import org.netbeans.validation.api.ui.swing.ValidationPanel; //导入依赖的package包/类
/**
 * @return the panelValAcc
 */
public ValidationPanel getPanelValAcc() {
    return panelValAcc;
}
 
开发者ID:dbunibas,项目名称:BART,代码行数:7,代码来源:ConfEGTaskEditPanel.java


注:本文中的org.netbeans.validation.api.ui.swing.ValidationPanel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。