本文整理了Java中javax.swing.JComboBox.isLightWeightPopupEnabled()
方法的一些代码示例,展示了JComboBox.isLightWeightPopupEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComboBox.isLightWeightPopupEnabled()
方法的具体详情如下:
包路径:javax.swing.JComboBox
类名称:JComboBox
方法名:isLightWeightPopupEnabled
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javafx2-project
public boolean isLightWeightPopupEnabled() {
return combo.isLightWeightPopupEnabled();
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf
@Override
public void installUI(JComponent c) {
super.installUI(c);
oldBorder = c.getBorder();
c.setBorder(new NapkinCompoundBorder(new NapkinLineBorder(false),
new EmptyBorder(0, 0, 3, 0)));
NapkinUtil.installUI(c);
wasLightWeightPopupEnabled = comboBox.isLightWeightPopupEnabled();
comboBox.setLightWeightPopupEnabled(false);
}
代码示例来源:origin: com.synaptix/SynaptixTattoo
setLightWeightPopupEnabled(comboBox.isLightWeightPopupEnabled());
代码示例来源:origin: FellowTraveler/otapij
@Override
public void show() {
Dimension popupSize = ((SteppedComboBox) comboBox)
.getPopupSize();
popupSize
.setSize(popupSize.width,
getPopupHeightForRowCount(comboBox
.getMaximumRowCount()));
Rectangle popupBounds = computePopupBounds(0, comboBox
.getBounds().height, popupSize.width, popupSize.height);
scroller.setMaximumSize(popupBounds.getSize());
scroller.setPreferredSize(popupBounds.getSize());
scroller.setMinimumSize(popupBounds.getSize());
list.invalidate();
int selectedIndex = comboBox.getSelectedIndex();
if (selectedIndex == -1) {
list.clearSelection();
} else {
list.setSelectedIndex(selectedIndex);
}
list.ensureIndexIsVisible(list.getSelectedIndex());
setLightWeightPopupEnabled(comboBox.isLightWeightPopupEnabled());
show(comboBox, popupBounds.x, popupBounds.y);
}
};
代码示例来源:origin: org.ihtsdo/wb-api
public void show() {
int widestWidth = getWidestItemWidth();
if (widestWidth < comboBox.getPreferredSize().width) {
widestWidth = comboBox.getPreferredSize().width;
}
Dimension popupSize = comboBox.getSize();
popupSize.setSize(widestWidth + (2 * padding),
getPopupHeightForRowCount(comboBox.getMaximumRowCount()));
Rectangle popupBounds = computePopupBounds(0, comboBox.getBounds().height, popupSize.width,
popupSize.height);
scroller.setMaximumSize(popupBounds.getSize());
scroller.setPreferredSize(popupBounds.getSize());
scroller.setMinimumSize(popupBounds.getSize());
list.invalidate();
int selectedIndex = comboBox.getSelectedIndex();
if (selectedIndex == -1) {
list.clearSelection();
} else {
list.setSelectedIndex(selectedIndex);
}
list.ensureIndexIsVisible(list.getSelectedIndex());
setLightWeightPopupEnabled(comboBox.isLightWeightPopupEnabled());
show(comboBox, popupBounds.x, popupBounds.y);
}
};
代码示例来源:origin: com.synaptix/SynaptixTattoo
public GabyComboPopup(JComboBox combo) {
super();
setName("ComboPopup.popup");
comboBox = combo;
setLightWeightPopupEnabled(comboBox.isLightWeightPopupEnabled());
// UI construction of the popup.
list = createList();
list.setName("ComboBox.list");
configureList();
scroller = createScroller();
scroller.setName("ComboBox.scrollPane");
configureScroller();
configurePopup();
installComboBoxListeners();
installKeyboardActions();
}
内容来源于网络,如有侵权,请联系作者删除!