private void initTree() { String sFilter; if (jCheckBoxCVS.isSelected()) { if (jCheckBoxTests.isSelected()) { sFilter = GENERAL_EXCLUDES + "|" + STANDARD_ANT_EXCLUDES + "|" + TEST_EXCLUDES + ")$"; // NOI18N } else { sFilter = GENERAL_EXCLUDES + "|" + STANDARD_ANT_EXCLUDES + ")$"; // NOI18N } } else { if (jCheckBoxTests.isSelected()) { sFilter = GENERAL_EXCLUDES + "|" + TEST_EXCLUDES + ")$"; // NOI18N } else { sFilter = GENERAL_EXCLUDES + ")$"; // NOI18N } } this.filter = Pattern.compile(sFilter); try { final DataObject dob = DataObject.find(srcRoot); manager.setRootContext(new FOBNode(dob.getNodeDelegate().cloneNode(), dob.getPrimaryFile())); } catch (DataObjectNotFoundException dnfe) { manager.setRootContext(Node.EMPTY); } treeView.registerProperty(properties, excludesTranslatedPropertyName, filter); }
private void initAccessibility() { getAccessibleContext() .setAccessibleName(NbBundle.getMessage(CustomizerFiltering.class, "ACSN_CustFilter")); getAccessibleContext() .setAccessibleDescription( NbBundle.getMessage(CustomizerFiltering.class, "ACSD_CustFilter")); treeView.getAccessibleContext().setAccessibleName(jLabelTree.getText()); treeView.getAccessibleContext().setAccessibleDescription(jLabelTree.getText()); }
/** Creates new form CustomizerConfigs */ public CustomizerFiltering() { initComponents(); jPanelTree.setBorder(BasicBorders.getTextFieldBorder()); sourceExplorer = new ExplorerPanel(); manager = sourceExplorer.getExplorerManager(); treeView = new CheckedTreeBeanView(); initAccessibility(); jLabelTree.setLabelFor(treeView); treeView.setPopupAllowed(false); treeView.setRootVisible(false); treeView.setDefaultActionAllowed(false); sourceExplorer.setLayout(new BorderLayout()); sourceExplorer.add(treeView, BorderLayout.CENTER); sourceExplorer.setPreferredSize(new Dimension(200, 250)); jPanelTree.add(sourceExplorer, BorderLayout.CENTER); }
public void initGroupValues(final boolean useDefault) { jCheckBoxCVS.removeActionListener(this); jCheckBoxTests.removeActionListener(this); vps.register(jCheckBoxCVS, DefaultPropertiesDescriptor.FILTER_USE_STANDARD, useDefault); vps.register(jCheckBoxTests, DefaultPropertiesDescriptor.FILTER_EXCLUDE_TESTS, useDefault); vps.register(jTextFieldExcludes, DefaultPropertiesDescriptor.FILTER_MORE_EXCLUDES, useDefault); this.excludesTranslatedPropertyName = VisualPropertySupport.translatePropertyName( configuration, DefaultPropertiesDescriptor.FILTER_EXCLUDES, useDefault); initTree(); treeView.setEditable(!useDefault); jLabelTree.setEnabled(!useDefault); jLabelExcludes.setEnabled(!useDefault); jCheckBoxCVS.addActionListener(this); jCheckBoxTests.addActionListener(this); }
public void initValues(ProjectProperties props, String configuration) { this.vps = VisualPropertySupport.getDefault(props); this.properties = props; this.configuration = configuration; this.srcRoot = props.getSourceRoot(); if (srcRoot == null) { // Issue 153666 - getting projects instantiated w/ nonexistent source // roots. props.toString() will call project.toString(), hopefully // provide some better info Logger.getLogger(getClass().getName()) .log(Level.INFO, "Source root null for " + props); // NOI18N srcRoot = FileUtil.createMemoryFileSystem().getRoot(); } treeView.setSrcRoot(srcRoot); vps.register(defaultCheck, configuration, this); }