本文整理了Java中javax.swing.JComboBox.setOpaque()
方法的一些代码示例,展示了JComboBox.setOpaque()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.setOpaque()
方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:setOpaque
暂无
代码示例来源:origin: magefree/mage
cbSortBy.setMinimumSize(new java.awt.Dimension(120, 20));
cbSortBy.setName("SortBy"); // NOI18N
cbSortBy.setOpaque(false);
cbSortBy.setPreferredSize(new java.awt.Dimension(120, 20));
cbSortBy.addActionListener(evt -> cbSortByActionPerformed(evt));
代码示例来源:origin: net.sf.nimrod/nimrod-laf
protected void uninstallDefaults() {
super.uninstallDefaults();
comboBox.setOpaque( oldOpaque);
}
代码示例来源:origin: com.github.insubstantial/substance
public static ComponentUI createUI(JComponent comp) {
SubstanceCoreUtilities.testComponentCreationThreadingViolation(comp);
SubstanceComboBoxUI ui = new SubstanceComboBoxUI((JComboBox) comp);
ui.comboBox = (JComboBox) comp;
ui.comboBox.setOpaque(false);
return ui;
}
代码示例来源:origin: senbox-org/snap-desktop
private void createCellDefaultValueComboBox(FocusListener focusListener) {
this.cellDefaultValueComboBox = new JComboBox();
this.cellDefaultValueComboBox.setOpaque(true);
this.cellDefaultValueComboBox.setVisible(false);
this.cellDefaultValueComboBox.setBorder(new EmptyBorder(0, 0, 0, 0));
this.cellDefaultValueComboBox.addFocusListener(focusListener);
}
代码示例来源:origin: org.java.net.substance/substance
public static ComponentUI createUI(JComponent comp) {
SubstanceCoreUtilities.testComponentCreationThreadingViolation(comp);
SubstanceComboBoxUI ui = new SubstanceComboBoxUI((JComboBox) comp);
ui.comboBox = (JComboBox) comp;
ui.comboBox.setOpaque(false);
return ui;
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
protected void installDefaults() {
super.installDefaults();
oldOpaque = comboBox.isOpaque();
comboBox.setOpaque( false);
}
代码示例来源:origin: stackoverflow.com
JComboBox myComboBox = new JComboBox(array);
myComboBox .setOpaque(false);
myComboBox .setEditable(true);
JTextField boxField = (JTextField)myComboBox .getEditor().getEditorComponent();
boxField.setBorder(BorderFactory.createEmptyBorder());
boxField.setBackground(new Color(0, 0, 0, 0));
boxField.setFocusable(false);
代码示例来源:origin: senbox-org/snap-desktop
private void createCellDataTypesComponent() {
this.cellDataTypesComboBox = new JComboBox(typesMap.keySet().toArray());
this.cellDataTypesComboBox.setOpaque(true);
this.cellDataTypesComboBox.setVisible(false);
this.cellDataTypesComboBox.setBorder(new EmptyBorder(0, 0, 0, 0));
this.cellDataTypesComboBox.addActionListener(ev -> {
String typeName = (String) cellDataTypesComboBox.getSelectedItem();
cellDataTypeChanged(typeName, this.cellComponentRowIndex, this.cellComponentColumnIndex);
});
this.cellDataTypesComboBox.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent focusEvent) {
hideCurrentDisplayedCellComponent();
}
});
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-kenai-ui
combo.setOpaque(false);
代码示例来源:origin: otros-systems/otroslogviewer
JComboBox<Level> levelJCombo = new JComboBox<>(levels);
levelJCombo.setRenderer(renderer);
levelJCombo.setOpaque(true);
levelJCombo.setEditable(false);
代码示例来源:origin: abc9070410/JComicDownloader
private JComboBox getComboBox( String[] strings, int selectedIndex )
{
JComboBox comboBox = new JComboBox( strings );
if ( SetUp.getUsingBackgroundPicOfOptionFrame() )
{ // 若設定為透明,就用預定字體。
comboBox.setForeground( SetUp.getOptionFrameOtherDefaultColor() );
comboBox.setOpaque( false );
comboBox.addMouseListener( this );
}
ListCellRenderer renderer = new ComplexCellRenderer();
comboBox.setRenderer( renderer );
comboBox.setSelectedIndex( selectedIndex );
comboBox.setFont( SetUp.getDefaultFont() );
return comboBox;
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-editor
private JComboBox createComboBox( String[] choices, String defaultValue, Icon[] icons, Font font, FocusListener listener ) {
JComboBox combo = new JComboBox(choices);
combo.setSelectedItem(defaultValue);
combo.getAccessibleContext().setAccessibleDescription(getBundleString("FixDupImportStmts_Combo_ACSD")); //NOI18N
combo.getAccessibleContext().setAccessibleName(getBundleString("FixDupImportStmts_Combo_Name_ACSD")); //NOI18N
combo.setOpaque(false);
combo.setFont( font );
combo.addFocusListener( listener );
combo.setEnabled( choices.length > 1 );
combo.setRenderer( new DelegatingRenderer(combo.getRenderer(), choices, icons ) );
InputMap inputMap = combo.getInputMap( JComboBox.WHEN_FOCUSED );
inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_SPACE, 0), "showPopup" ); //NOI18N
combo.getActionMap().put( "showPopup", new TogglePopupAction() ); //NOI18N
return combo;
}
代码示例来源:origin: no.uib/jsparklines
colorGradientJComboBox.setOpaque(false);
colorGradientJComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
backgoundColorJComboBox.setSelectedIndex(1);
backgoundColorJComboBox.setMaximumSize(new java.awt.Dimension(48, 20));
backgoundColorJComboBox.setOpaque(false);
backgoundColorJComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
heatmapTypeJComboBox.setSelectedIndex(1);
heatmapTypeJComboBox.setMaximumSize(new java.awt.Dimension(48, 20));
heatmapTypeJComboBox.setOpaque(false);
heatmapTypeJComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-editor
private JComboBox createComboBox(DataItem item, Font font, FocusListener listener) {
List<ItemVariant> variants = item.getVariants();
JComboBox combo = new JComboBox(variants.toArray());
combo.setSelectedItem(item.getDefaultVariant());
combo.getAccessibleContext().setAccessibleDescription(getBundleString("FixDupImportStmts_Combo_ACSD")); //NOI18N
combo.getAccessibleContext().setAccessibleName(getBundleString("FixDupImportStmts_Combo_Name_ACSD")); //NOI18N
combo.setOpaque(false);
combo.setFont(font);
combo.addFocusListener(listener);
combo.setEnabled(variants.size() > 1);
combo.setRenderer(new DelegatingRenderer(combo.getRenderer(), variants, item.getVariantIcons()));
InputMap inputMap = combo.getInputMap(JComboBox.WHEN_FOCUSED);
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), "showPopup"); //NOI18N
combo.getActionMap().put("showPopup", new TogglePopupAction()); //NOI18N
return combo;
}
代码示例来源:origin: no.uib/jsparklines
multipleDataSeriesJComboBox.setToolTipText("Set the chart type");
multipleDataSeriesJComboBox.setMaximumSize(new java.awt.Dimension(48, 20));
multipleDataSeriesJComboBox.setOpaque(false);
multipleDataSeriesJComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
treeDimensionalDataSeriesJComboBox.setToolTipText("Set the chart type");
treeDimensionalDataSeriesJComboBox.setMaximumSize(new java.awt.Dimension(48, 20));
treeDimensionalDataSeriesJComboBox.setOpaque(false);
treeDimensionalDataSeriesJComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
multipleValuesJComboBox.setToolTipText("Set the chart type");
multipleValuesJComboBox.setMaximumSize(new java.awt.Dimension(48, 20));
multipleValuesJComboBox.setOpaque(false);
multipleValuesJComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
代码示例来源:origin: abc9070410/JComicDownloader
skinBox.setOpaque( false );
skinBox.addMouseListener( this );
代码示例来源:origin: org.verapdf.apps/gui
this.chooseFlavour.setOpaque(true);
ChooseFlavourRenderer renderer = new ChooseFlavourRenderer();
this.chooseFlavour.setRenderer(renderer);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-swingapp
blockingType.setOpaque(false);
代码示例来源:origin: org.geotools/gt-widgets-swing-pending
jcb_exp.setOpaque(false);
jcb_exp.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
内容来源于网络,如有侵权,请联系作者删除!