當前位置: 首頁>>代碼示例>>Java>>正文


Java OptionsPanelController.addPropertyChangeListener方法代碼示例

本文整理匯總了Java中org.netbeans.spi.options.OptionsPanelController.addPropertyChangeListener方法的典型用法代碼示例。如果您正苦於以下問題:Java OptionsPanelController.addPropertyChangeListener方法的具體用法?Java OptionsPanelController.addPropertyChangeListener怎麽用?Java OptionsPanelController.addPropertyChangeListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.netbeans.spi.options.OptionsPanelController的用法示例。


在下文中一共展示了OptionsPanelController.addPropertyChangeListener方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addPropertyChangeListener

import org.netbeans.spi.options.OptionsPanelController; //導入方法依賴的package包/類
@Override
public void addPropertyChangeListener(PropertyChangeListener l) {
    pcs.addPropertyChangeListener(l);
    for (OptionsPanelController c : getControllers()) {
        c.addPropertyChangeListener(l);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:TabbedController.java

示例2: getComponent

import org.netbeans.spi.options.OptionsPanelController; //導入方法依賴的package包/類
@Override
public synchronized JComponent getComponent(Lookup masterLookup) {
    if (panel == null) {
        this.masterLookup = masterLookup;
        for (Entry<String, OptionsPanelController> e : getMimeType2delegates ().entrySet()) {
            OptionsFilter f = OptionsFilter.create(filterDocument, new FilteringUsedCallback(e.getKey()));
            Lookup innerLookup = new ProxyLookup(masterLookup, Lookups.singleton(f));
            OptionsPanelController controller = e.getValue();
            controller.getComponent(innerLookup);
            controller.addPropertyChangeListener(this);
        }
        panel = new FolderBasedOptionPanel(this, filterDocument, allowFiltering);
    }
    return panel;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:16,代碼來源:FolderBasedController.java

示例3: addPropertyChangeListener

import org.netbeans.spi.options.OptionsPanelController; //導入方法依賴的package包/類
@Override
public void addPropertyChangeListener(PropertyChangeListener l) {
    for (OptionsPanelController c: categoryToController.values()) {
        c.addPropertyChangeListener(l);
    }
    tasksPanel.getPropertySupport().addPropertyChangeListener(l);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:BugtrackingOptions.java

示例4: addPropertyChangeListener

import org.netbeans.spi.options.OptionsPanelController; //導入方法依賴的package包/類
void addPropertyChangeListener(PropertyChangeListener listener) {
    propertyChangeListener = listener;
    for(OptionsPanelController controller : categoryToController.values()) {
        controller.addPropertyChangeListener(listener);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:7,代碼來源:Model.java

示例5: handleTabSwitched

import org.netbeans.spi.options.OptionsPanelController; //導入方法依賴的package包/類
/** 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);
      }
  }
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:46,代碼來源:TabbedController.java


注:本文中的org.netbeans.spi.options.OptionsPanelController.addPropertyChangeListener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。