當前位置: 首頁>>代碼示例>>Java>>正文


Java NameFilteringListModel類代碼示例

本文整理匯總了Java中com.intellij.ui.speedSearch.NameFilteringListModel的典型用法代碼示例。如果您正苦於以下問題:Java NameFilteringListModel類的具體用法?Java NameFilteringListModel怎麽用?Java NameFilteringListModel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


NameFilteringListModel類屬於com.intellij.ui.speedSearch包,在下文中一共展示了NameFilteringListModel類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: propertyChange

import com.intellij.ui.speedSearch.NameFilteringListModel; //導入依賴的package包/類
@Override
public void propertyChange(@NotNull PropertyChangeEvent evt) {
  if (project.isDisposed()) {
    myPopup.cancel();
    return;
  }
  ((NameFilteringListModel)files.getModel()).refilter();
  ((NameFilteringListModel)toolWindows.getModel()).refilter();
  if (files.getModel().getSize() + toolWindows.getModel().getSize() == 0) {
    toolWindows.getEmptyText().setText("");
    files.getEmptyText().setText("Press 'Enter' to search in Project");
  }
  else {
    files.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
    toolWindows.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:Switcher.java

示例2: propertyChange

import com.intellij.ui.speedSearch.NameFilteringListModel; //導入依賴的package包/類
@Override
public void propertyChange(PropertyChangeEvent evt) {
  final MyList list = getSelectedList();
  final Object value = list.getSelectedValue();
  ((NameFilteringListModel)files.getModel()).refilter();
  ((NameFilteringListModel)toolWindows.getModel()).refilter();
  if (files.getModel().getSize() + toolWindows.getModel().getSize() == 0) {
    toolWindows.getEmptyText().setText("");
    files.getEmptyText().setText("Press 'Enter' to search in Project");
  } else {
    files.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
    toolWindows.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
  }
  files.repaint();
  toolWindows.repaint();
  getSelectedList(list).setSelectedValue(value, true);
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:18,代碼來源:Switcher.java

示例3: propertyChange

import com.intellij.ui.speedSearch.NameFilteringListModel; //導入依賴的package包/類
@Override
public void propertyChange(@Nonnull PropertyChangeEvent evt) {
  if (project.isDisposed()) {
    myPopup.cancel();
    return;
  }
  ((NameFilteringListModel)files.getModel()).refilter();
  ((NameFilteringListModel)toolWindows.getModel()).refilter();
  if (files.getModel().getSize() + toolWindows.getModel().getSize() == 0) {
    toolWindows.getEmptyText().setText("");
    files.getEmptyText().setText("Press 'Enter' to search in Project");
  }
  else {
    files.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
    toolWindows.getEmptyText().setText(StatusText.DEFAULT_EMPTY_TEXT);
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:18,代碼來源:Switcher.java

示例4: getDataModel

import com.intellij.ui.speedSearch.NameFilteringListModel; //導入依賴的package包/類
@Nullable
public static DefaultListModel getDataModel(AnActionEvent e) {
  final JList list = getList(e);
  if (list != null) {
    ListModel model = list.getModel();
    if (model instanceof NameFilteringListModel) {
      model = ((NameFilteringListModel)model).getOriginalModel();
      if (model instanceof DefaultListModel) {
        return (DefaultListModel)model;
      }
    }
  }
  return null;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:RecentProjectsWelcomeScreenActionBase.java

示例5: removeElementAt

import com.intellij.ui.speedSearch.NameFilteringListModel; //導入依賴的package包/類
private static void removeElementAt(@NotNull JList jList, int index) {
  final ListModel model = jList.getModel();
  if (model instanceof DefaultListModel) {
    ((DefaultListModel)model).removeElementAt(index);
  }
  else if (model instanceof NameFilteringListModel) {
    ((NameFilteringListModel)model).remove(index);
  }
  else {
    throw new IllegalArgumentException("Wrong list model " + model.getClass());
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:Switcher.java

示例6: replaceModel

import com.intellij.ui.speedSearch.NameFilteringListModel; //導入依賴的package包/類
@Override
protected void replaceModel(@NotNull List<PsiElement> data) {
  final Object selectedValue = myComponent.getSelectedValue();
  final int index = myComponent.getSelectedIndex();
  ((NameFilteringListModel)myComponent.getModel()).replaceAll(data);
  if (index == 0) {
    myComponent.setSelectedIndex(0);
  }
  else {
    myComponent.setSelectedValue(selectedValue, true);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:ListBackgroundUpdaterTask.java

示例7: removeElementAt

import com.intellij.ui.speedSearch.NameFilteringListModel; //導入依賴的package包/類
private static void removeElementAt(JList jList, int index) {
  final ListModel model = jList.getModel();
  if (model instanceof DefaultListModel) {
   ((DefaultListModel)model).removeElementAt(index);
  } else if (model instanceof NameFilteringListModel) {
    ((NameFilteringListModel)model).remove(index);
  } else {
    throw new IllegalArgumentException("Wrong list model " + model.getClass());
  }
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:11,代碼來源:Switcher.java

示例8: removeElementAt

import com.intellij.ui.speedSearch.NameFilteringListModel; //導入依賴的package包/類
private static void removeElementAt(@Nonnull JList jList, int index) {
  final ListModel model = jList.getModel();
  if (model instanceof DefaultListModel) {
    ((DefaultListModel)model).removeElementAt(index);
  }
  else if (model instanceof NameFilteringListModel) {
    ((NameFilteringListModel)model).remove(index);
  }
  else {
    throw new IllegalArgumentException("Wrong list model " + model.getClass());
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:13,代碼來源:Switcher.java

示例9: replaceModel

import com.intellij.ui.speedSearch.NameFilteringListModel; //導入依賴的package包/類
@Override
protected void replaceModel(@Nonnull List<PsiElement> data) {
  final Object selectedValue = myComponent.getSelectedValue();
  final int index = myComponent.getSelectedIndex();
  ((NameFilteringListModel)myComponent.getModel()).replaceAll(data);
  if (index == 0) {
    myComponent.setSelectedIndex(0);
  }
  else {
    myComponent.setSelectedValue(selectedValue, true);
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:13,代碼來源:ListBackgroundUpdaterTask.java


注:本文中的com.intellij.ui.speedSearch.NameFilteringListModel類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。