Java Code Examples for javax.swing.JComboBox#getClientProperty()
The following examples show how to use
javax.swing.JComboBox#getClientProperty() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EditorPanel.java From gcs with Mozilla Public License 2.0 | 6 votes |
@Override public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); if (COMPARISON.equals(command)) { JComboBox<?> combo = (JComboBox<?>) event.getSource(); int selectedIndex = combo.getSelectedIndex(); StringCriteria stringCriteria = (StringCriteria) combo.getClientProperty(StringCriteria.class); if (stringCriteria != null) { stringCriteria.setType(StringCompareType.values()[selectedIndex]); notifyActionListeners(); } else { NumericCriteria numericCriteria = (NumericCriteria) combo.getClientProperty(NumericCriteria.class); if (numericCriteria != null) { numericCriteria.setType(NumericCompareType.values()[selectedIndex]); notifyActionListeners(); } } } }
Example 2
Source File: MenuToggleButton.java From PyramidShader with GNU General Public License v3.0 | 5 votes |
public MenuToggleButton() { // install a special client property on the button to prevent it from // closing of the popup when the down arrow is pressed. JComboBox box = new JComboBox(); Object preventHide = box.getClientProperty("doNotCancelPopup"); putClientProperty("doNotCancelPopup", preventHide); }
Example 3
Source File: ComboBoxAutoCompleteSupport.java From netbeans with Apache License 2.0 | 4 votes |
static boolean isIgnoreSelectionEvents( JComboBox combo ) { Object res = combo.getClientProperty( "nb.combo.autocomplete.ignoreselection" ); //NOI18N return res instanceof Boolean && ((Boolean)res).booleanValue(); }
Example 4
Source File: ComboBoxAutoCompleteSupport.java From netbeans with Apache License 2.0 | 4 votes |
static boolean isAutoCompleteInstalled( JComboBox combo ) { Object res = combo.getClientProperty( "nb.combo.autocomplete" ); //NOI18N return res instanceof Boolean && ((Boolean)res).booleanValue(); }
Example 5
Source File: ComboBoxAutoCompleteSupport.java From netbeans with Apache License 2.0 | 4 votes |
static boolean isIgnoreSelectionEvents( JComboBox combo ) { Object res = combo.getClientProperty( "nb.combo.autocomplete.ignoreselection" ); //NOI18N return res instanceof Boolean && ((Boolean)res).booleanValue(); }
Example 6
Source File: ComboBoxAutoCompleteSupport.java From netbeans with Apache License 2.0 | 4 votes |
static boolean isAutoCompleteInstalled( JComboBox combo ) { Object res = combo.getClientProperty( "nb.combo.autocomplete" ); //NOI18N return res instanceof Boolean && ((Boolean)res).booleanValue(); }