Java Code Examples for org.netbeans.spi.options.OptionsPanelController#isValid()
The following examples show how to use
org.netbeans.spi.options.OptionsPanelController#isValid() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Model.java From netbeans with Apache License 2.0 | 5 votes |
boolean isValid () { for (OptionsPanelController controller : categoryToController.values()) { // if changed (#145569) and not valid if (!controller.isValid() && controller.isChanged()) { return false; } } return true; }
Example 2
Source File: TabbedController.java From netbeans with Apache License 2.0 | 5 votes |
@Override public boolean isValid() { for (OptionsPanelController c : getControllers()) { // if changed (#145569) and not valid if (!c.isValid() && c.isChanged()) { return false; } } return true; }
Example 3
Source File: FrameworksPanel.java From netbeans with Apache License 2.0 | 5 votes |
boolean isControllerValid() { for (OptionsPanelController controller : option2controller.values()) { if (!controller.isValid()) { return false; } } return true; }
Example 4
Source File: VcsAdvancedOptions.java From netbeans with Apache License 2.0 | 5 votes |
@Override public boolean isValid() { for (OptionsPanelController c : getControllers()) { if (!c.isValid()) { return false; } } return true; }
Example 5
Source File: FolderBasedController.java From netbeans with Apache License 2.0 | 5 votes |
public final synchronized boolean isValid() { Collection<? extends OptionsPanelController> controllers = getMimeType2delegates ().values(); for(OptionsPanelController c : controllers) { if (!c.isValid()) { return false; } } return true; }
Example 6
Source File: TabbedController.java From netbeans with Apache License 2.0 | 4 votes |
/** Replace placeholder with real panel and change help context. */ private void handleTabSwitched(String searchText, List<String> matchedKeywords) { final int selectedIndex = pane.getSelectedIndex(); if (selectedIndex != -1) { String tabTitle = pane.getTitleAt(selectedIndex); OptionsPanelController controller = tabTitle2controller.get(tabTitle); if (pane.getSelectedComponent() instanceof JLabel) { JComponent comp; if (controller == null) { AdvancedOption advancedOption = tabTitle2Option.get(tabTitle); if (advancedOption == null) { LOGGER.log(Level.INFO, "AdvancedOption for {0} is not present.", tabTitle); return; } else { controller = advancedOption.create(); tabTitle2controller.put(tabTitle, controller); // must be here because many controllers rely on fact that getComponent() is called first than other methods comp = controller.getComponent(masterLookup); // add existing listeners for (PropertyChangeListener pcl : pcs.getPropertyChangeListeners()) { controller.addPropertyChangeListener(pcl); } } } else { comp = controller.getComponent(masterLookup); } if( null == comp.getBorder() ) { comp.setBorder(BorderFactory.createEmptyBorder(11,11,11,11)); } JScrollPane scroll = new JScrollPane(comp); scroll.setBorder(BorderFactory.createEmptyBorder()); scroll.setOpaque(false); scroll.getViewport().setOpaque(false); scroll.getVerticalScrollBar().setUnitIncrement(Utils.ScrollBarUnitIncrement); scroll.getHorizontalScrollBar().setUnitIncrement(Utils.ScrollBarUnitIncrement); pane.setComponentAt(selectedIndex, scroll); controller.update(); controller.isValid(); } if (searchText != null && matchedKeywords != null) { controller.handleSuccessfulSearch(searchText, matchedKeywords); } pcs.firePropertyChange(OptionsPanelController.PROP_HELP_CTX, null, null); } }