本文整理了Java中javax.swing.JButton.setInheritsPopupMenu()
方法的一些代码示例,展示了JButton.setInheritsPopupMenu()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JButton.setInheritsPopupMenu()
方法的具体详情如下:
包路径:javax.swing.JButton
类名称:JButton
方法名:setInheritsPopupMenu
暂无
代码示例来源:origin: net.sf.nimrod/nimrod-laf
private Component createArrowButton( int direction) {
JButton b = new NimRODArrowButton(direction);
b.setInheritsPopupMenu( true);
return b;
}
代码示例来源:origin: digital-preservation/droid
jButtonShowValues.setInheritsPopupMenu(true);
jButtonShowValues.setPreferredSize(new java.awt.Dimension(259, 32));
jButtonShowValues.addActionListener(new java.awt.event.ActionListener() {
代码示例来源:origin: uk.gov.nationalarchives/droid-ui
jButtonShowValues.setInheritsPopupMenu(true);
jButtonShowValues.setPreferredSize(new java.awt.Dimension(259, 32));
jButtonShowValues.addActionListener(new java.awt.event.ActionListener() {
代码示例来源:origin: stackoverflow.com
b.setInheritsPopupMenu(true);
b.setOpaque(false);
b.setBackground(color);
代码示例来源:origin: stackoverflow.com
b.setBorder(buttonBorder);
b.setInheritsPopupMenu(true);
return b;
代码示例来源:origin: lbalazscs/Pixelitor
private void initDropDownButton() {
dropDownButton = new JButton(downIconEnabled);
dropDownButton.setDisabledIcon(downIconDisabled);
dropDownButton.putClientProperty("JComponent.sizeVariant", "mini");
dropDownButton.setRequestFocusEnabled(false);
dropDownButton.setInheritsPopupMenu(true);
dropDownButton.setBorderPainted(false);
dropDownButton.setFocusPainted(false);
dropDownButton.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
dropDown();
}
@Override
public void mouseEntered(MouseEvent e) {
dropDownButton.setBorderPainted(true);
}
@Override
public void mouseExited(MouseEvent e) {
dropDownButton.setBorderPainted(false);
}
});
dropDownButton.setIconTextGap(0);
dropDownButton.setBorder(null);
dropDownButton.setMargin(new Insets(0, 0, 0, 0));
setDropDownButtonSize();
}
代码示例来源:origin: jpcsp/jpcsp
DeleteBreakpoint.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
DeleteBreakpoint.setIconTextGap(2);
DeleteBreakpoint.setInheritsPopupMenu(true);
DeleteBreakpoint.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
DeleteBreakpoint.addActionListener(new java.awt.event.ActionListener() {
代码示例来源:origin: org.swinglabs.swingx/swingx-core
protected void installComponents() {
JFormattedTextField editor = datePicker.getEditor();
if (SwingXUtilities.isUIInstallable(editor)) {
DateFormat[] formats = getCustomFormats(editor);
// we are not yet listening ...
datePicker.setEditor(createEditor());
if (formats != null) {
datePicker.setFormats(formats);
}
}
updateFromEditorChanged(null, false);
popupButton = createPopupButton();
if (popupButton != null) {
// this is a trick to get hold of the client prop which
// prevents closing of the popup
JComboBox box = new JComboBox();
Object preventHide = box.getClientProperty("doNotCancelPopup");
popupButton.putClientProperty("doNotCancelPopup", preventHide);
datePicker.add(popupButton);
popupButton.setEnabled(datePicker.isEnabled());
popupButton.setInheritsPopupMenu(true);
}
updateChildLocale(datePicker.getLocale());
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
protected void installComponents() {
JFormattedTextField editor = datePicker.getEditor();
if (SwingXUtilities.isUIInstallable(editor)) {
DateFormat[] formats = getCustomFormats(editor);
// we are not yet listening ...
datePicker.setEditor(createEditor());
if (formats != null) {
datePicker.setFormats(formats);
}
}
updateFromEditorChanged(null, false);
popupButton = createPopupButton();
if (popupButton != null) {
// this is a trick to get hold of the client prop which
// prevents closing of the popup
JComboBox box = new JComboBox();
Object preventHide = box.getClientProperty("doNotCancelPopup");
popupButton.putClientProperty("doNotCancelPopup", preventHide);
datePicker.add(popupButton);
popupButton.setEnabled(datePicker.isEnabled());
popupButton.setInheritsPopupMenu(true);
}
updateChildLocale(datePicker.getLocale());
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
protected void installComponents() {
JFormattedTextField editor = datePicker.getEditor();
if (SwingXUtilities.isUIInstallable(editor)) {
DateFormat[] formats = getCustomFormats(editor);
// we are not yet listening ...
datePicker.setEditor(createEditor());
if (formats != null) {
datePicker.setFormats(formats);
}
}
updateFromEditorChanged(null, false);
popupButton = createPopupButton();
if (popupButton != null) {
// this is a trick to get hold of the client prop which
// prevents closing of the popup
JComboBox box = new JComboBox();
Object preventHide = box.getClientProperty("doNotCancelPopup");
popupButton.putClientProperty("doNotCancelPopup", preventHide);
datePicker.add(popupButton);
popupButton.setEnabled(datePicker.isEnabled());
popupButton.setInheritsPopupMenu(true);
}
updateChildLocale(datePicker.getLocale());
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
protected void installComponents() {
JFormattedTextField editor = datePicker.getEditor();
if (SwingXUtilities.isUIInstallable(editor)) {
DateFormat[] formats = getCustomFormats(editor);
// we are not yet listening ...
datePicker.setEditor(createEditor());
if (formats != null) {
datePicker.setFormats(formats);
}
}
updateFromEditorChanged(null, false);
popupButton = createPopupButton();
if (popupButton != null) {
// this is a trick to get hold of the client prop which
// prevents closing of the popup
JComboBox box = new JComboBox();
Object preventHide = box.getClientProperty("doNotCancelPopup");
popupButton.putClientProperty("doNotCancelPopup", preventHide);
datePicker.add(popupButton);
popupButton.setEnabled(datePicker.isEnabled());
popupButton.setInheritsPopupMenu(true);
}
updateChildLocale(datePicker.getLocale());
}
内容来源于网络,如有侵权,请联系作者删除!