Search in sources :

Example 1 with KotlinOrJavaClassCellRenderer

use of org.jetbrains.kotlin.idea.refactoring.memberInfo.KotlinOrJavaClassCellRenderer in project kotlin by JetBrains.

the class KotlinPullUpDialogBase method initClassCombo.

@SuppressWarnings("unchecked")
@Override
protected void initClassCombo(JComboBox classCombo) {
    classCombo.setRenderer(new KotlinOrJavaClassCellRenderer());
    classCombo.addItemListener(new ItemListener() {

        @Override
        public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                if (myMemberSelectionPanel == null)
                    return;
                AbstractMemberSelectionTable<KtNamedDeclaration, KotlinMemberInfo> table = myMemberSelectionPanel.getTable();
                if (table == null)
                    return;
                table.setMemberInfos(myMemberInfos);
                table.fireExternalDataChange();
            }
        }
    });
}
Also used : AbstractMemberSelectionTable(com.intellij.refactoring.ui.AbstractMemberSelectionTable) ItemEvent(java.awt.event.ItemEvent) KotlinOrJavaClassCellRenderer(org.jetbrains.kotlin.idea.refactoring.memberInfo.KotlinOrJavaClassCellRenderer) ItemListener(java.awt.event.ItemListener)

Aggregations

AbstractMemberSelectionTable (com.intellij.refactoring.ui.AbstractMemberSelectionTable)1 ItemEvent (java.awt.event.ItemEvent)1 ItemListener (java.awt.event.ItemListener)1 KotlinOrJavaClassCellRenderer (org.jetbrains.kotlin.idea.refactoring.memberInfo.KotlinOrJavaClassCellRenderer)1