com.intellij.ui.ListUtil Java Examples
The following examples show how to use
com.intellij.ui.ListUtil.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PopupListAdapter.java From consulo with Apache License 2.0 | 5 votes |
private MyListWrapper(final JList list) { super(-1); list.setVisibleRowCount(myBuilder.getVisibleRowCount()); setViewportView(list); if (myBuilder.isAutoselectOnMouseMove()) { ListUtil.installAutoSelectOnMouseMove(list); } ScrollingUtil.installActions(list); setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); myList = list; }
Example #2
Source File: DeleteBookmarkAction.java From consulo with Apache License 2.0 | 5 votes |
@Override public void actionPerformed(AnActionEvent e) { List<Bookmark> bookmarks = BookmarksAction.getSelectedBookmarks(myList); ListUtil.removeSelectedItems(myList); for (Bookmark bookmark : bookmarks) { BookmarkManager.getInstance(myProject).removeBookmark(bookmark); } }
Example #3
Source File: RecentProjectPanel.java From consulo with Apache License 2.0 | 5 votes |
@Override public void mouseReleased(MouseEvent e) { final Point point = e.getPoint(); final MyList list = MyList.this; final int index = list.locationToIndex(point); if (index != -1) { if (getCloseIconRect(index).contains(point)) { e.consume(); final Object element = getModel().getElementAt(index); removeRecentProjectElement(element); ListUtil.removeSelectedItems(MyList.this); } } }
Example #4
Source File: FilteringListModel.java From consulo with Apache License 2.0 | 4 votes |
public void addAll(List<? extends T> elements) { ListUtil.addAllItems(myOriginalModel, elements); }
Example #5
Source File: FilteringListModel.java From consulo with Apache License 2.0 | 4 votes |
public void replaceAll(List<? extends T> elements) { ListUtil.removeAllItems(myOriginalModel); ListUtil.addAllItems(myOriginalModel, elements); }
Example #6
Source File: FilteringListModel.java From consulo with Apache License 2.0 | 4 votes |
public void remove(int index) { ListUtil.removeItem(myOriginalModel, index); }
Example #7
Source File: HintUpdateSupply.java From consulo with Apache License 2.0 | 4 votes |
private static boolean isSelectedByMouse(@Nonnull JComponent c) { return Boolean.TRUE.equals(c.getClientProperty(ListUtil.SELECTED_BY_MOUSE_EVENT)); }
Example #8
Source File: MoveBookmarkDownAction.java From consulo with Apache License 2.0 | 4 votes |
@Override public void actionPerformed(AnActionEvent e) { ListUtil.moveSelectedItemsDown(myList); BookmarkManager.getInstance(myProject).moveBookmarkDown(BookmarksAction.getSelectedBookmarks(myList).get(0)); }
Example #9
Source File: MoveBookmarkUpAction.java From consulo with Apache License 2.0 | 4 votes |
@Override public void actionPerformed(AnActionEvent e) { ListUtil.moveSelectedItemsUp(myList); BookmarkManager.getInstance(myProject).moveBookmarkUp(BookmarksAction.getSelectedBookmarks(myList).get(0)); }