本文整理匯總了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);
}
}
示例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);
}
示例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);
}
}
示例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;
}
示例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());
}
}
示例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);
}
}
示例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());
}
}
示例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());
}
}
示例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);
}
}