本文整理匯總了Java中chatty.gui.components.menus.StreamsContextMenu類的典型用法代碼示例。如果您正苦於以下問題:Java StreamsContextMenu類的具體用法?Java StreamsContextMenu怎麽用?Java StreamsContextMenu使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
StreamsContextMenu類屬於chatty.gui.components.menus包,在下文中一共展示了StreamsContextMenu類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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包/類
private void openContextMenu(MouseEvent e) {
if (e.isPopupTrigger()) {
int clickedRow = table.rowAtPoint(e.getPoint());
if (clickedRow != -1) {
if (!Helper.arrayContainsInt(table.getSelectedRows(), clickedRow)) {
table.setRowSelectionInterval(clickedRow, clickedRow);
}
}
if (table.getSelectedRow() != -1) {
Set<String> selected = getSelectedChannels();
ContextMenu m = new StreamsContextMenu(selected, contextMenuListener);
m.show(table, e.getX(), e.getY());
}
}
}
示例3: 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());
}
}
}
示例4: 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());
}
}