Package org.netbeans.validation.api.ui

Examples of org.netbeans.validation.api.ui.ValidationPanel


                                String title = NbBundle.getMessage(DesktopImportControllerUI.class, "DesktopImportControllerUI.processor.ui.dialog.title");
                                JPanel panel = pui.getPanel();
                                pui.setup(processor);
                                final DialogDescriptor dd2 = new DialogDescriptor(panel, title);
                                if (panel instanceof ValidationPanel) {
                                    ValidationPanel vp = (ValidationPanel) panel;
                                    vp.addChangeListener(new ChangeListener() {

                                        public void stateChanged(ChangeEvent e) {
                                            dd2.setValid(!((ValidationPanel) e.getSource()).isProblem());
                                        }
                                    });
                                    dd2.setValid(!vp.isProblem());
                                }
                                Object result = DialogDisplayer.getDefault().notify(dd2);
                                if (result.equals(NotifyDescriptor.CANCEL_OPTION) || result.equals(NotifyDescriptor.CLOSED_OPTION)) {
                                    validResult.setResult(false);
                                } else {
View Full Code Here


        if (ui != null) {
            ui.setup(generator);
            JPanel panel = ui.getPanel();
            final DialogDescriptor dd = new DialogDescriptor(panel, title);
            if (panel instanceof ValidationPanel) {
                ValidationPanel vp = (ValidationPanel) panel;
                vp.addChangeListener(new ChangeListener() {

                    public void stateChanged(ChangeEvent e) {
                        dd.setValid(!((ValidationPanel) e.getSource()).isProblem());
                    }
                });
View Full Code Here

    public RandomGraphPanel() {
        initComponents();
    }

    public static ValidationPanel createValidationPanel(RandomGraphPanel innerPanel) {
        ValidationPanel validationPanel = new ValidationPanel();
        if (innerPanel == null) {
            innerPanel = new RandomGraphPanel();
        }
        validationPanel.setInnerComponent(innerPanel);

        ValidationGroup group = validationPanel.getValidationGroup();

        //Node field
        group.add(innerPanel.nodeField, Validators.REQUIRE_NON_EMPTY_STRING,
                new PositiveNumberValidator());
View Full Code Here

            }
        });
    }

    public static ValidationPanel createValidationPanel(UIExporterPDFPanel innerPanel) {
        ValidationPanel validationPanel = new ValidationPanel();
        validationPanel.setInnerComponent(innerPanel);

        ValidationGroup group = validationPanel.getValidationGroup();

        innerPanel.validate(group);

        return validationPanel;
    }
View Full Code Here

    }

    public void configure() {
        ScreenshotSettingsPanel panel = new ScreenshotSettingsPanel();
        panel.setup(this);
        ValidationPanel validationPanel = ScreenshotSettingsPanel.createValidationPanel(panel);
        if (validationPanel.showOkCancelDialog(NbBundle.getMessage(ScreenshotMaker.class, "ScreenshotMaker.configure.title"))) {
            panel.unsetup(this);
            return;
        }
//        DialogDescriptor dd = new DialogDescriptor(validationPanel, NbBundle.getMessage(ScreenshotMaker.class, "ScreenshotMaker.configure.title"));
//        Object result = DialogDisplayer.getDefault().notify(dd);
View Full Code Here

            okButton.setEnabled(title != null && !title.isEmpty() && !table.hasColumn(title));
        }
    }

    public static ValidationPanel createValidationPanel(AddColumnUI innerPanel) {
        ValidationPanel validationPanel = new ValidationPanel();
        if (innerPanel == null) {
            innerPanel = new AddColumnUI();
        }
        validationPanel.setInnerComponent(innerPanel);

        ValidationGroup group = validationPanel.getValidationGroup();

        group.add(innerPanel.titleTextField, new ColumnTitleValidator(innerPanel.table));

        return validationPanel;
    }
View Full Code Here

            e.printStackTrace();
        }
    }

    public static ValidationPanel createValidationPanel(final EqualStringPanel innerPanel) {
        final ValidationPanel validationPanel = new ValidationPanel();
        validationPanel.setInnerComponent(innerPanel);

        ValidationGroup group = validationPanel.getValidationGroup();
        validationPanel.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                innerPanel.okButton.setEnabled(!validationPanel.isProblem());
            }
        });
        //Node field
        group.add(innerPanel.textField, new RegexValidator(innerPanel));
View Full Code Here

        }
        //screenshotMaker.setTransparentBackground(transparentBackgroundCheckBox.isSelected());
    }

    public static ValidationPanel createValidationPanel(ScreenshotSettingsPanel innerPanel) {
        ValidationPanel validationPanel = new ValidationPanel();
        if (innerPanel == null) {
            innerPanel = new ScreenshotSettingsPanel();
        }
        validationPanel.setInnerComponent(innerPanel);

        ValidationGroup group = validationPanel.getValidationGroup();

        //Node field
        group.add(innerPanel.widthTextField, Validators.REQUIRE_NON_EMPTY_STRING,
                new Multiple4NumberValidator());
View Full Code Here

            targetModel.addElement(element);
        }
    }

    public static ValidationPanel createValidationPanel(MergeColumnsUI innerPanel) {
        ValidationPanel validationPanel = new ValidationPanel();
        if (innerPanel == null) {
            innerPanel = new MergeColumnsUI();
        }
        validationPanel.setInnerComponent(innerPanel);

        ValidationGroup group = validationPanel.getValidationGroup();

        group.add(innerPanel.availableStrategiesComboBox, new MergeStrategyValidator(innerPanel));

        return validationPanel;
    }
View Full Code Here

    public String getDisplayName() {
        return displayName;
    }

    public JPanel getSettingsPanel() {
        ValidationPanel validationPanel = new ValidationPanel();
        validationPanel.setInnerComponent(this);

        ValidationGroup group = validationPanel.getValidationGroup();

        group.add(titleTextField, new ColumnTitleValidator(table));

        return validationPanel;
    }
View Full Code Here

TOP

Related Classes of org.netbeans.validation.api.ui.ValidationPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.