當前位置: 首頁>>代碼示例>>Java>>正文


Java StreamsContextMenu類代碼示例

本文整理匯總了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());
    }
}
 
開發者ID:pokemane,項目名稱:TwitchChatClient,代碼行數:21,代碼來源:LiveStreamsRemovedList.java

示例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());
        }
    }
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:16,代碼來源:FavoritesDialog.java

示例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());
        }
    }
}
 
開發者ID:chatty,項目名稱:chatty,代碼行數:21,代碼來源:FollowersDialog.java

示例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());
    }
}
 
開發者ID:pokemane,項目名稱:TwitchChatClient,代碼行數:18,代碼來源:LiveStreamsList.java


注:本文中的chatty.gui.components.menus.StreamsContextMenu類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。