javax.swing.JComboBox#getClientProperty ( )源码实例Demo

下面列出了javax.swing.JComboBox#getClientProperty ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: gcs   文件: EditorPanel.java
@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();
            }
        }
    }
}
 
源代码2 项目: PyramidShader   文件: MenuToggleButton.java
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);
    }
 
源代码3 项目: netbeans   文件: ComboBoxAutoCompleteSupport.java
static boolean isIgnoreSelectionEvents( JComboBox combo ) {
    Object res = combo.getClientProperty( "nb.combo.autocomplete.ignoreselection" ); //NOI18N
    
    return res instanceof Boolean && ((Boolean)res).booleanValue();
}
 
源代码4 项目: netbeans   文件: ComboBoxAutoCompleteSupport.java
static boolean isAutoCompleteInstalled( JComboBox combo ) {
    Object res = combo.getClientProperty( "nb.combo.autocomplete" ); //NOI18N

    return res instanceof Boolean && ((Boolean)res).booleanValue();
}
 
源代码5 项目: netbeans   文件: ComboBoxAutoCompleteSupport.java
static boolean isIgnoreSelectionEvents( JComboBox combo ) {
    Object res = combo.getClientProperty( "nb.combo.autocomplete.ignoreselection" ); //NOI18N
    
    return res instanceof Boolean && ((Boolean)res).booleanValue();
}
 
源代码6 项目: netbeans   文件: ComboBoxAutoCompleteSupport.java
static boolean isAutoCompleteInstalled( JComboBox combo ) {
    Object res = combo.getClientProperty( "nb.combo.autocomplete" ); //NOI18N

    return res instanceof Boolean && ((Boolean)res).booleanValue();
}