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

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

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

JComboBox.configureEditor介绍

暂无

代码示例

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

public void configureEditor(ComboBoxEditor anEditor, Object anItem) {
  combo.configureEditor(anEditor, anItem);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-j2ee-common

private static void setSelectedItem(final JComboBox combo, final Object item) {
  combo.setSelectedItem(item);
  if (combo.isEditable() && combo.getEditor() != null) {
    // item must be set in the editor in case of editable combobox
    combo.configureEditor(combo.getEditor(), combo.getSelectedItem()); 
  }
}

代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler

@Override
  public void mouseReleased(MouseEvent e) {
    comboBox.setSelectedItem(list.getSelectedValue());
    comboBox.setPopupVisible(false);
    // Workaround for cancelling an edited item (JVM bug 4530953).
    if (comboBox.isEditable() && comboBox.getEditor() != null) {
      comboBox.configureEditor(comboBox.getEditor(), comboBox.getSelectedItem());
    }
    
    hide();
  }
}

代码示例来源:origin: com.synaptix/SynaptixTattoo

comboBox.configureEditor(comboBox.getEditor(), comboBox
    .getSelectedItem());

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

public void contentsChanged(ListDataEvent e)
{
  if (!(e.getIndex0() == -1 && e.getIndex1() == -1))
  {
    isMinimumSizeDirty= true;
    comboBox.revalidate();
  }
  // set the editor with the selected item since this
  // is the event handler for a selected item change.
  if (comboBox.isEditable() && editor != null)
  {
    comboBox.configureEditor(
      comboBox.getEditor(),
      comboBox.getSelectedItem());
  }
  comboBox.repaint();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

comboBox.configureEditor(
  comboBox.getEditor(),
  comboBox.getSelectedItem());

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

comboBox.configureEditor(
  comboBox.getEditor(),
  comboBox.getSelectedItem());

相关文章

JComboBox类方法