本文整理了Java中javax.swing.JComboBox.isDisplayable()
方法的一些代码示例,展示了JComboBox.isDisplayable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.isDisplayable()
方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:isDisplayable
暂无
代码示例来源:origin: pentaho/mondrian
public void keyPressed(KeyEvent e) {
if (listEditor.isDisplayable()) {
listEditor.setPopupVisible(true);
}
}
代码示例来源:origin: pentaho/mondrian
public void mousePressed(MouseEvent e) {
if (listEditor.isDisplayable()) {
listEditor.setPopupVisible(true);
}
}
});
代码示例来源:origin: stackoverflow.com
jcb.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
System.out.println("test");
final JComboBox j= (JComboBox)evt.getSource();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (j.isDisplayable()) j.setPopupVisible(true);
}
});
}});
代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop
public void keyPressed(KeyEvent keyEvent) {
// don't popup on action keys (cursor movements, etc...)
if (keyEvent.isActionKey()) return;
// don't popup if the combobox isn't visible anyway
if (comboBox.isDisplayable() && !comboBox.isPopupVisible()) {
int keyCode = keyEvent.getKeyCode();
// don't popup when the user hits shift,ctrl or alt
if (keyCode==KeyEvent.VK_SHIFT || keyCode==KeyEvent.VK_CONTROL || keyCode==KeyEvent.VK_ALT) return;
// don't popup when the user hits escape (see issue #311)
if (keyCode==KeyEvent.VK_ENTER || keyCode==KeyEvent.VK_ESCAPE) return;
comboBox.setPopupVisible(true);
}
}
};
代码示例来源:origin: net.sf.cuf/cuf-swing
public void keyPressed(final KeyEvent pEvent)
{
if (pComboBox.isDisplayable()) pComboBox.setPopupVisible(true);
mHitBackspace = false;
switch (pEvent.getKeyCode())
{
// determine if the pressed key is backspace (needed by the remove method)
case KeyEvent.VK_BACK_SPACE:
mHitBackspace = true;
mHitBackspaceOnSelection = mEditor.getSelectionStart() != mEditor.getSelectionEnd();
break;
// ignore delete key
case KeyEvent.VK_DELETE:
pEvent.consume();
pComboBox.getToolkit().beep();
break;
}
}
};
代码示例来源:origin: tmyroadctfig/swingx
@Override
public void keyPressed(KeyEvent keyEvent) {
// don't popup on action keys (cursor movements, etc...)
if (keyEvent.isActionKey()) {
return;
}
// don't popup if the combobox isn't visible anyway
if (comboBox.isDisplayable() && !comboBox.isPopupVisible()) {
int keyCode = keyEvent.getKeyCode();
// don't popup when the user hits shift,ctrl or alt
if (keyCode==KeyEvent.VK_SHIFT || keyCode==KeyEvent.VK_CONTROL || keyCode==KeyEvent.VK_ALT) return;
// don't popup when the user hits escape (see issue #311)
if (keyCode==KeyEvent.VK_ENTER || keyCode==KeyEvent.VK_ESCAPE) return;
comboBox.setPopupVisible(true);
}
}
}
代码示例来源:origin: triplea-game/triplea
@Override
public void keyPressed(final KeyEvent e) {
if ((e.getKeyCode() != KeyEvent.VK_ENTER)
&& (e.getKeyCode() != KeyEvent.VK_ESCAPE)
&& comboBox.isDisplayable()) {
comboBox.setPopupVisible(true);
}
hitBackspace = false;
switch (e.getKeyCode()) {
// determine if the pressed key is backspace (needed by the remove method)
case KeyEvent.VK_BACK_SPACE:
hitBackspace = true;
hitBackspaceOnSelection = editor.getSelectionStart() != editor.getSelectionEnd();
break;
// ignore delete key
case KeyEvent.VK_DELETE:
e.consume();
comboBox.getToolkit().beep();
break;
default:
break;
}
}
};
代码示例来源:origin: org.swinglabs.swingx/swingx-all
@Override
public void keyPressed(KeyEvent keyEvent) {
// don't popup on action keys (cursor movements, etc...)
if (keyEvent.isActionKey()) {
return;
}
// don't popup if the combobox isn't visible anyway
if (comboBox.isDisplayable() && !comboBox.isPopupVisible()) {
int keyCode = keyEvent.getKeyCode();
// don't popup when the user hits shift,ctrl or alt
if (keyCode==KeyEvent.VK_SHIFT || keyCode==KeyEvent.VK_CONTROL || keyCode==KeyEvent.VK_ALT) return;
// don't popup when the user hits escape (see issue #311)
if (keyCode==KeyEvent.VK_ENTER || keyCode==KeyEvent.VK_ESCAPE) return;
comboBox.setPopupVisible(true);
}
}
}
代码示例来源:origin: stackoverflow.com
protected void updatePopup() {
if (combo.isDisplayable()) {
代码示例来源:origin: org.netbeans.api/org-openide-explorer
try {
setIgnoreSelectionEvents( combo, true );
if( !combo.isDisplayable() )
return;
String editorText;
代码示例来源:origin: stackoverflow.com
protected void updatePopup() {
if (combo.isDisplayable()) {
内容来源于网络,如有侵权,请联系作者删除!