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

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

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

JComboBox.setPopupVisible介绍

暂无

代码示例

代码示例来源: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: openpnp/openpnp

/**
 * Prevent closing of the popup when attempting to select the separator with the mouse.
 */
@Override
public void setPopupVisible(boolean visible) {
  // Keep the popup open when the separator was clicked on
  if (separatorSelected) {
    separatorSelected = false;
    return;
  }
  super.setPopupVisible(visible);
}

代码示例来源:origin: net.sf.cuf/cuf-swing

public void focusLost(final FocusEvent pEvent)
  {
    // Workaround for Bug 5100422 - Hide Popup on focus loss
    if (mHidePopupOnFocusLoss) pComboBox.setPopupVisible(false);
  }
};

代码示例来源:origin: sc.fiji/TrackMate_

@Override
public void setPopupVisible( final boolean v )
{
  if ( !v && isCategoryIndex )
  {
    isCategoryIndex = false;
  }
  else
  {
    super.setPopupVisible( v );
  }
}

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

@Override
  public void itemStateChanged(ItemEvent e) {
    JComboBox combo = (JComboBox) e.getSource();
    combo.setPopupVisible(false);
  }
});

代码示例来源:origin: dcaoyuan/nbscala

public void itemStateChanged(java.awt.event.ItemEvent e){ 
    javax.swing.JComboBox combo = (javax.swing.JComboBox)e.getSource(); 
    combo.setPopupVisible(false); 
  } 
});

代码示例来源:origin: dcaoyuan/nbscala

public void itemStateChanged(java.awt.event.ItemEvent e){ 
    javax.swing.JComboBox combo = (javax.swing.JComboBox)e.getSource(); 
    combo.setPopupVisible(false); 
  } 
});

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor

@Override
  public void actionPerformed(ActionEvent e) {
    if (e.getSource() instanceof JComboBox) {
      JComboBox combo = (JComboBox) e.getSource();
      combo.setPopupVisible(!combo.isPopupVisible());
    }
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-editor

public void actionPerformed(ActionEvent e) {
    if( e.getSource() instanceof JComboBox ) {
      JComboBox combo = (JComboBox)e.getSource();
      combo.setPopupVisible( !combo.isPopupVisible() );
    }
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects

public void itemStateChanged(java.awt.event.ItemEvent e) {
    JComboBox combo = (JComboBox) e.getSource();
    combo.setPopupVisible(false);
  }
});

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

public void actionPerformed(ActionEvent e)
{
  JComboBox comboBox= (JComboBox) e.getSource();
  if (comboBox.isEnabled())
  {
    comboBox.setPopupVisible(false);
  }
}

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

public void itemStateChanged(ItemEvent e) {
    JComboBox combo = (JComboBox) e.getSource();
    combo.setPopupVisible(false);
  }
});

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

public void itemStateChanged(java.awt.event.ItemEvent e) {
    javax.swing.JComboBox combo = (javax.swing.JComboBox) e.getSource();
    combo.setPopupVisible(false);
  }
});

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

public void itemStateChanged(ItemEvent e) {
    JComboBox combo = (JComboBox) e.getSource();
    combo.setPopupVisible(false);
  }
});

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-grailsproject

public void itemStateChanged(java.awt.event.ItemEvent e){
    javax.swing.JComboBox combo = (javax.swing.JComboBox)e.getSource();
    combo.setPopupVisible(false);
  }
});

代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

private void hidePopup() {
  if (combobox.isShowing() && combobox.isPopupVisible()) {
    combobox.setPopupVisible(false);
  }
}

代码示例来源: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.cedarsoft.utils/tags

public void actionPerformed( ActionEvent e ) {
  tagCombo.setSelectedItem( tagCombo.getEditor().getItem() );
  if ( tagCombo.isPopupVisible() ) {
   tagCombo.setPopupVisible( false );
  } else {
   addSelectedTag();
   tagCombo.getEditor().selectAll();
  }
 }
} );

代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

private void showPopup() {
  if (isShowPopup() && combobox.isShowing() && combobox.isEnabled() && !combobox.isPopupVisible()) {
    combobox.setPopupVisible(true);
  }
}

相关文章

JComboBox类方法