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

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

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

JComboBox.setEditable介绍

暂无

代码示例

代码示例来源:origin: stanfordnlp/CoreNLP

private static Box getNewFilter() {
 Box filter = Box.createHorizontalBox();
 FilterType[] filterTypeOptions = FilterType.values();
 JComboBox filterTypes = new JComboBox(filterTypeOptions );
 filterTypes.setEditable(false);
 filter.add(filterTypes);
 filter.add(Box.createHorizontalGlue());
 JTextField filterInput = new JTextField();
 //filterInput.setMaximumSize(new Dimension(50,50));
 filterInput.setEditable(true);
 filter.add(filterInput);
 return filter;
}

代码示例来源:origin: log4j/log4j

Level.TRACE };
final JComboBox priorities = new JComboBox(allPriorities);
final Level lowest = allPriorities[allPriorities.length - 1];
priorities.setSelectedItem(lowest);
gridbag.setConstraints(priorities, c);
add(priorities);
priorities.setEditable(false);
priorities.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent aEvent) {

代码示例来源:origin: stanfordnlp/CoreNLP

treeDisplayOptions.setLayout(new GridLayout(4,2));
JLabel fontName = new JLabel("Font: ");
final JComboBox fontPicker = new JComboBox(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames());
fontPicker.setSelectedItem(Preferences.getFont());
advOptions.setLayout(new GridLayout(3,2,0,4));
JLabel headfinderName = new JLabel("Head finder:");
final JComboBox headfinderPicker = new JComboBox(new String[] {"ArabicHeadFinder", "BikelChineseHeadFinder", "ChineseHeadFinder", "ChineseSemanticHeadFinder", "CollinsHeadFinder", "DybroFrenchHeadFinder", "LeftHeadFinder", "ModCollinsHeadFinder", "NegraHeadFinder", "SemanticHeadFinder", "SunJurafskyChineseHeadFinder", "TueBaDZHeadFinder", "UniversalSemanticHeadFinder"}); //
headfinderPicker.setEditable(true);
headfinderPicker.setSelectedItem(Preferences.getHeadFinder()
                 .getClass().getSimpleName());
JLabel treeReaderFactoryName = new JLabel("Tree reader factory:");
final JComboBox trfPicker = new JComboBox(new String[] {"ArabicTreeReaderFactory", "ArabicTreeReaderFactory.ArabicRawTreeReaderFactory", "CTBTreeReaderFactory", "Basic categories only (LabeledScoredTreeReaderFactory)", "FrenchTreeReaderFactory","NoEmptiesCTBTreeReaderFactory", "PennTreeReaderFactory", "TregexTreeReaderFactory" });
trfPicker.setEditable(true);
trfPicker.setSelectedItem(Preferences.getTreeReaderFactory()
             .getClass().getSimpleName());

代码示例来源:origin: chewiebug/GCViewer

private GCViewerGuiToolBar initToolBar(Map<String, Action> actions) {
  GCViewerGuiToolBar toolBar = new GCViewerGuiToolBar();
  toolBar.setFloatable(false);
  
  toolBar.add(actions.get(ActionCommands.OPEN_FILE.toString()));
  toolBar.add(actions.get(ActionCommands.OPEN_SERIES.toString()));
  toolBar.add(actions.get(ActionCommands.OPEN_URL.toString()));
  toolBar.add(actions.get(ActionCommands.EXPORT.toString()));
  toolBar.add(actions.get(ActionCommands.REFRESH.toString()));
  
  JToggleButton watchToggle = new JToggleButton();
  watchToggle.setAction(actions.get(ActionCommands.WATCH.toString()));
  watchToggle.setText("");
  toolBar.addWatchToggleButton(watchToggle);
  
  toolBar.addSeparator();
  
  JComboBox<String> zoomComboBox = new JComboBox<String>(new String[] {"1%", "5%", "10%", "50%", "100%", "200%", "300%", "500%", "1000%", "5000%"});
  zoomComboBox.setSelectedIndex(2);
  zoomComboBox.setAction(actions.get(ActionCommands.ZOOM.toString()));
  zoomComboBox.setEditable(true);
  zoomComboBox.setMaximumSize(zoomComboBox.getPreferredSize());
  toolBar.addZoomComboBox(zoomComboBox);
  
  toolBar.addSeparator();
  
  toolBar.add(actions.get(ActionCommands.ABOUT.toString()));
  
  return toolBar;
}

代码示例来源:origin: marytts/marytts

jLabel3 = new javax.swing.JLabel();
cbDownsample = new javax.swing.JCheckBox();
comboSampleRate = new javax.swing.JComboBox();
cbPowerNormalise = new javax.swing.JCheckBox();
cbBestOnly = new javax.swing.JCheckBox();
cbGlobalAmplitude = new javax.swing.JCheckBox();
jLabel5 = new javax.swing.JLabel();
comboMaxAmplitude = new javax.swing.JComboBox();
jLabel6 = new javax.swing.JLabel();
tfSoxPath = new javax.swing.JTextField();
jPanel1.add(cbDownsample, gridBagConstraints);
comboSampleRate.setEditable(true);
comboSampleRate.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "16000", "22050" }));
gridBagConstraints = new java.awt.GridBagConstraints();
jPanel1.add(jLabel5, gridBagConstraints);
comboMaxAmplitude.setEditable(true);
comboMaxAmplitude.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0.5", "0.6", "0.7", "0.8", "0.9",
    "1.0 (maximum)", "1.1 (causes clipping)", "1.2 (causes clipping)", "1.3 (causes clipping)",

代码示例来源:origin: marytts/marytts

jLabel3 = new javax.swing.JLabel();
cbDownsample = new javax.swing.JCheckBox();
comboSampleRate = new javax.swing.JComboBox();
cbPowerNormalise = new javax.swing.JCheckBox();
cbBestOnly = new javax.swing.JCheckBox();
cbGlobalAmplitude = new javax.swing.JCheckBox();
jLabel5 = new javax.swing.JLabel();
comboMaxAmplitude = new javax.swing.JComboBox();
jLabel6 = new javax.swing.JLabel();
tfSoxPath = new javax.swing.JTextField();
jPanel1.add(cbDownsample, gridBagConstraints);
comboSampleRate.setEditable(true);
comboSampleRate.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "16000", "22050" }));
gridBagConstraints = new java.awt.GridBagConstraints();
jPanel1.add(jLabel5, gridBagConstraints);
comboMaxAmplitude.setEditable(true);
comboMaxAmplitude.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "0.5", "0.6", "0.7", "0.8", "0.9",
    "1.0 (maximum)", "1.1 (causes clipping)", "1.2 (causes clipping)", "1.3 (causes clipping)",

代码示例来源:origin: geotools/geotools

servers = defaultServers();
JComboBox combo = new JComboBox(servers.toArray());
combo.setEditable(true);

代码示例来源:origin: camunda/camunda-bpm-platform

final JComboBox priorities = new JComboBox(allPriorities);
final Priority lowest = allPriorities[allPriorities.length - 1];
priorities.setSelectedItem(lowest);
gridbag.setConstraints(priorities, c);
add(priorities);
priorities.setEditable(false);
priorities.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent aEvent) {

代码示例来源:origin: pentaho/mondrian

listEditor = new JComboBox();
listEditor.setEditable(true);
listEditor.setMaximumSize(stringEditor.getMaximumSize());
listEditor.setFont(Font.decode("Dialog"));

代码示例来源:origin: winder/Universal-G-Code-Sender

macroEditPanel = new javax.swing.JScrollPane(macroPanel);
connectionPanel = new javax.swing.JPanel();
commPortComboBox = new javax.swing.JComboBox();
baudrateSelectionComboBox = new javax.swing.JComboBox();
opencloseButton = new javax.swing.JButton();
refreshButton = new javax.swing.JButton();
portLabel = new javax.swing.JLabel();
firmwareLabel = new javax.swing.JLabel();
firmwareComboBox = new javax.swing.JComboBox();
showVerboseOutputCheckBox = new javax.swing.JCheckBox();
statusPanel = new javax.swing.JPanel();
connectionPanel.setPreferredSize(new java.awt.Dimension(247, 100));
commPortComboBox.setEditable(true);

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

/**
 * Creates the combo box where user types the text to be searched.
 *
 * @return a combo box.
 * @since 3.4.1
 */
protected JComboBox createComboBox() {
  JComboBox comboBox = new JComboBox();
  comboBox.setEditable(true);
  return comboBox;
}

代码示例来源:origin: org.zaproxy/zap

private JComboBox<String> getRemoteAddress() {
  if (remoteAddress == null) {
    remoteAddress = new JComboBox<String>();
    remoteAddress.setEditable(true);
  }
  return remoteAddress;
}

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

String[] list = {"A", "B", "C"};
JComboBox jcb = new JComboBox(list);
jcb.setEditable(true);
JOptionPane.showMessageDialog( null, jcb, "select or type a value", JOptionPane.QUESTION_MESSAGE);

代码示例来源:origin: org.apache.airavata/airavata-xbaya-gui

private void init(ComboBoxModel model) {
  this.comboBox = new JComboBox(model);
  this.comboBox.setEditable(false);
}

代码示例来源:origin: hneemann/Digital

public LongEditor(Long value, Key<Long> key) {
  comboBox = new JComboBox<>(DEFAULTS);
  comboBox.setEditable(true);
  comboBox.setSelectedItem(value.toString());
}

代码示例来源:origin: protegeproject/protege

public JComboBox<String> getLanguageSelector() {
  JComboBox<String> c = new JComboBox<>();
  c.setSelectedItem(null);
  c.setEditable(true);
  c.setModel(new DefaultComboBoxModel<>(new String[]{null, "en", "de", "es", "fr", "pt"}));
  return c;
}

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

public JComboBox<String> getLanguageSelector() {
  JComboBox<String> c = new JComboBox<>();
  c.setSelectedItem(null);
  c.setEditable(true);
  c.setModel(new DefaultComboBoxModel<>(new String[]{null, "en", "de", "es", "fr", "pt"}));
  return c;
}

代码示例来源:origin: org.protege/protege-editor-owl

public JComboBox getLanguageSelector() {
  JComboBox c = new JComboBox();
  c.setSelectedItem(null);
  c.setEditable(true);
  c.setModel(new DefaultComboBoxModel(new String[]{null, "en", "de", "es", "fr", "pt"}));
  return c;
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

public JComboBox getLanguageSelector() {
  JComboBox c = new JComboBox();
  c.setSelectedItem(null);
  c.setEditable(true);
  c.setModel(new DefaultComboBoxModel(new String[]{null, "en", "de", "es", "fr", "pt"}));
  return c;
}

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

Vector<String> options  = new Vector<String>();
  options.add("");
  options.add("blue");
  options.add("red");
...
 JComboBox result = new JComboBox(options);
 result.setEditable(true);

相关文章

JComboBox类方法