javax.swing.JComboBox.setKeySelectionManager()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中javax.swing.JComboBox.setKeySelectionManager()方法的一些代码示例,展示了JComboBox.setKeySelectionManager()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.setKeySelectionManager()方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:setKeySelectionManager

JComboBox.setKeySelectionManager介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javafx2-project

public void setKeySelectionManager(JComboBox.KeySelectionManager aManager) {
  combo.setKeySelectionManager(aManager);
}

代码示例来源:origin: stackoverflow.com

javax.swing.JComboBox.setKeySelectionManager(KeySelectionManager)

代码示例来源:origin: net.sf.sfac/sfac-core

public JComponent getObjectComponent() {
  if (objectPane == null) {
    objectPane = new JPanel(new BorderLayout());
    combo = new JComboBox(comboModel);
    combo.setKeySelectionManager(new ComboBoxKeyManager());
    combo.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent ie) {
        if (ie.getStateChange() == ItemEvent.SELECTED) {
          updateModel();
        }
      }
    });
    if (renderer != null) combo.setRenderer(renderer);
    objectPane.add(combo, BorderLayout.CENTER);
    if ((getEditorContext() != null) && isAllowedToOpen()) {
      openButton = new JButton("...");
      objectPane.add(openButton, BorderLayout.EAST);
      openButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent newE) {
          openSelectedObject();
        }
      });
      openButton.setEnabled(canViewItem());
    }
    updateView();
    synchronizeEditableState();
  }
  return objectPane;
}

代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-extra

public static void setAutoCompleted(JComboBox comboBox) {
  AutoCompletionManager autoCompletionManager = new AutoCompletionManager(
      comboBox);
  AutoCompletionModelListener autoCompletionModelListener = new AutoCompletionModelListener(
      autoCompletionManager);
  AutoCompletionCellRenderer autoCompletionCellRenderer = new AutoCompletionCellRenderer(
      autoCompletionManager, comboBox.getRenderer());
  comboBox.setKeySelectionManager(autoCompletionManager);
  comboBox.getModel().addListDataListener(autoCompletionModelListener);
  comboBox.setRenderer(autoCompletionCellRenderer);
}

代码示例来源:origin: org.nuiton/nuiton-widgets

public static void setAutoCompleted(JComboBox comboBox) {
  AutoCompletionManager autoCompletionManager = new AutoCompletionManager(
      comboBox);
  AutoCompletionModelListener autoCompletionModelListener = new AutoCompletionModelListener(
      autoCompletionManager);
  AutoCompletionCellRenderer autoCompletionCellRenderer = new AutoCompletionCellRenderer(
      autoCompletionManager, comboBox.getRenderer());
  comboBox.setKeySelectionManager(autoCompletionManager);
  comboBox.getModel().addListDataListener(autoCompletionModelListener);
  comboBox.setRenderer(autoCompletionCellRenderer);
}

代码示例来源:origin: net.sf.sfac/sfac-core

combo.setKeySelectionManager(new ComboBoxKeyManager());
combo.addItemListener(new ItemListener() {

代码示例来源:origin: stackoverflow.com

comboBox.setKeySelectionManager( this );

代码示例来源:origin: stackoverflow.com

comboBox.getActionMap().put("spacePopup", search);
comboBox.setKeySelectionManager( new MyKeySelectionManager(comboBox) );

代码示例来源:origin: stackoverflow.com

comboBox.setKeySelectionManager( new MyKeySelectionManager(comboBox) );

代码示例来源:origin: com.jidesoft/jide-oss

comboBox.setKeySelectionManager(new JComboBox.KeySelectionManager() {
  public int selectionForKey(char aKey, ComboBoxModel aModel) {
    return -1;

相关文章

JComboBox类方法