本文整理了Java中javax.swing.JComboBox.showPopup()
方法的一些代码示例,展示了JComboBox.showPopup()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.showPopup()
方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:showPopup
暂无
代码示例来源:origin: freeplane/freeplane
@Override
public void run() {
comboBox.showPopup();
}
});
代码示例来源:origin: org.codehaus.jtstand/jtstand-ui
private void jComboBoxPartRevisionFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jComboBoxPartRevisionFocusGained
jComboBoxPartRevision.showPopup();
}//GEN-LAST:event_jComboBoxPartRevisionFocusGained
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javafx2-project
public void showPopup() {
combo.showPopup();
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-ui
private void jComboBoxFixtureFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jComboBoxFixtureFocusGained
jComboBoxFixture.showPopup();
}//GEN-LAST:event_jComboBoxFixtureFocusGained
代码示例来源:origin: stackoverflow.com
final JComboBox comboBox = new JComboBox(
new Object[] { "", "Item #1", "Another item", "Something else" } );
comboBox.setEditable( true );
comboBox.getEditor().getEditorComponent().addFocusListener( new FocusAdapter() {
@Override
public void focusGained( final FocusEvent event ) {
comboBox.showPopup();
}
} );
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
public void actionPerformed(ActionEvent ae) {
if (!comboBox.isPopupVisible()) {
comboBox.showPopup();
}
}
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets
@Override
public void mouseClicked(MouseEvent e) {
if (ui.isEnabled()) {
combobox.showPopup();
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public void actionPerformed(ActionEvent ae) {
if (!comboBox.isPopupVisible()) {
comboBox.showPopup();
}
}
}); //NOI18N
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public void actionPerformed(ActionEvent ae) {
if (!comboBox.isPopupVisible()) {
comboBox.showPopup();
}
}
}); //NOI18N
代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler
private void setComboModelAccordingToPath(String pathString) {
List<String> currentNodeChildren = new ArrayList<>();
currentNodeChildren.addAll(getChildren(getCurrentNode(pathString), pathString));
comboBoxPathChooser.setModel(new DefaultComboBoxModel<>(currentNodeChildren.toArray(new String[0])));
comboBoxPathChooser.setSelectedItem(pathString);
if(!pathString.isEmpty()) {
comboBoxPathChooser.showPopup();
}
}
代码示例来源:origin: elki-project/elki
@Override
public void keyPressed(KeyEvent e) {
if((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0) {
if(e.getKeyCode() == KeyEvent.VK_SPACE //
|| e.getKeyCode() == KeyEvent.VK_ENTER //
|| e.getKeyCode() == KeyEvent.VK_DOWN //
|| e.getKeyCode() == KeyEvent.VK_KP_DOWN) {
if(!comboBox.isPopupVisible()) {
comboBox.showPopup();
e.consume();
}
}
}
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-gui-minigui
@Override
public void keyPressed(KeyEvent e) {
if((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0) {
if(e.getKeyCode() == KeyEvent.VK_SPACE //
|| e.getKeyCode() == KeyEvent.VK_ENTER //
|| e.getKeyCode() == KeyEvent.VK_DOWN //
|| e.getKeyCode() == KeyEvent.VK_KP_DOWN) {
if(!comboBox.isPopupVisible()) {
comboBox.showPopup();
e.consume();
}
}
}
}
代码示例来源:origin: PavlikPolivka/GitLabProjects
private void dataChanged() {
super.fireContentsChanged(this, 0, data.size());
comboBox.hidePopup();
comboBox.showPopup();
if (!data.isEmpty()) {
comboBox.setSelectedIndex(0);
}
}
代码示例来源:origin: stackoverflow.com
Action actionListener = new AbstractAction() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
JComboBox source = (JComboBox) actionEvent.getSource();
source.requestFocus();
source.showPopup();
// source.setFocusable(true);
}
};
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void run() {
InplaceEditor ied = getInplaceEditor();
ied = PropUtils.findInnermostInplaceEditor(ied);
JComponent c = ied.getComponent();
if (c instanceof JComboBox && c.isShowing()) {
((JComboBox) c).showPopup();
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public void run() {
InplaceEditor ied = getInplaceEditor();
ied = PropUtils.findInnermostInplaceEditor(ied);
JComponent c = ied.getComponent();
if (c instanceof JComboBox && c.isShowing()) {
((JComboBox) c).showPopup();
}
}
});
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public void run() {
InplaceEditor ied = getInplaceEditor();
ied = PropUtils.findInnermostInplaceEditor(ied);
JComponent c = ied.getComponent();
if (c instanceof JComboBox && c.isShowing()) {
((JComboBox) c).showPopup();
}
}
});
代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java15
/**
* A small convenience method to try showing the ComboBoxPopup.
*/
private void togglePopup() {
// break out early if we're flagged to ignore attempts to toggle the popup state
if (doNotTogglePopup) return;
if (comboBoxModel.getSize() == 0)
comboBox.hidePopup();
else if (comboBox.isShowing() && !comboBox.isPopupVisible() && comboBoxEditorComponent.hasFocus())
comboBox.showPopup();
}
代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java16
/**
* A small convenience method to try showing the ComboBoxPopup.
*/
private void togglePopup() {
// break out early if we're flagged to ignore attempts to toggle the popup state
if (doNotTogglePopup) return;
if (comboBoxModel.getSize() == 0)
comboBox.hidePopup();
else if (comboBox.isShowing() && !comboBox.isPopupVisible() && comboBoxEditorComponent.hasFocus())
comboBox.showPopup();
}
代码示例来源:origin: com.haulmont.thirdparty/glazedlists
/**
* A small convenience method to try showing the ComboBoxPopup.
*/
private void togglePopup() {
// break out early if we're flagged to ignore attempts to toggle the popup state
if (doNotTogglePopup) return;
if (comboBoxModel.getSize() == 0) {
comboBox.hidePopup();
}
else if (comboBox.isShowing() && !comboBox.isPopupVisible() && comboBoxEditorComponent.hasFocus())
comboBox.showPopup();
}
内容来源于网络,如有侵权,请联系作者删除!