本文整理汇总了Java中chatty.gui.components.menus.StreamsContextMenu.show方法的典型用法代码示例。如果您正苦于以下问题:Java StreamsContextMenu.show方法的具体用法?Java StreamsContextMenu.show怎么用?Java StreamsContextMenu.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chatty.gui.components.menus.StreamsContextMenu
的用法示例。
在下文中一共展示了StreamsContextMenu.show方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: openContextMenu
import chatty.gui.components.menus.StreamsContextMenu; //导入方法依赖的package包/类
/**
* Open context menu for this user, if the event points at one.
*
* @param e
*/
private void openContextMenu(MouseEvent e) {
if (e.isPopupTrigger()) {
selectClicked(e, false);
List<RemovedListItem> selectedItems = list.getSelectedValuesList();
List<StreamInfo> selected = new ArrayList<>();
for (RemovedListItem item : selectedItems) {
selected.add(item.getStreamInfo());
}
StreamsContextMenu m = new StreamsContextMenu(selected, false);
for (ContextMenuListener cml : contextMenuListeners) {
m.addContextMenuListener(cml);
}
m.show(list, e.getX(), e.getY());
}
}
示例2: openContextMenu
import chatty.gui.components.menus.StreamsContextMenu; //导入方法依赖的package包/类
/**
* Open the context menu for the given MouseEvent if it is the popup trigger
* and rows are selected.
*
* @param e The MouseEvent
*/
private void openContextMenu(MouseEvent e) {
if (e.isPopupTrigger()) {
Collection<String> streams = new HashSet<>();
int[] selectedRows = table.getSelectedRows();
for (int selectedRow : selectedRows) {
Follower selected = followers.get(selectedRow);
streams.add(StringUtil.toLowerCase(selected.name));
}
if (!streams.isEmpty()) {
StreamsContextMenu m = new StreamsContextMenu(streams, contextMenuListener);
m.show(table, e.getX(), e.getY());
}
}
}
示例3: openContextMenu
import chatty.gui.components.menus.StreamsContextMenu; //导入方法依赖的package包/类
/**
* Open context menu for this user, if the event points at one.
*
* @param e
*/
private void openContextMenu(MouseEvent e) {
if (e.isPopupTrigger()) {
selectClicked(e, false);
List<StreamInfo> selected = getSelectedValuesList();
StreamsContextMenu m = new StreamsContextMenu(selected, true);
for (ContextMenuListener cml : contextMenuListeners) {
m.addContextMenuListener(cml);
}
lastContextMenu = m;
m.show(this, e.getX(), e.getY());
}
}