当前位置: 首页>>代码示例>>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;未经允许,请勿转载。