private Component createArrowButton( int direction) { JButton b = new NimRODArrowButton(direction); b.setInheritsPopupMenu( true); return b; }
jButtonShowValues.setInheritsPopupMenu(true); jButtonShowValues.setPreferredSize(new java.awt.Dimension(259, 32)); jButtonShowValues.addActionListener(new java.awt.event.ActionListener() {
jButtonShowValues.setInheritsPopupMenu(true); jButtonShowValues.setPreferredSize(new java.awt.Dimension(259, 32)); jButtonShowValues.addActionListener(new java.awt.event.ActionListener() {
b.setInheritsPopupMenu(true); b.setOpaque(false); b.setBackground(color);
b.setBorder(buttonBorder); b.setInheritsPopupMenu(true); return b;
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(); }
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() {
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()); }
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()); }
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()); }
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()); }