本文整理汇总了Java中chatty.gui.components.menus.TabContextMenu类的典型用法代码示例。如果您正苦于以下问题:Java TabContextMenu类的具体用法?Java TabContextMenu怎么用?Java TabContextMenu使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TabContextMenu类属于chatty.gui.components.menus包,在下文中一共展示了TabContextMenu类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Channels
import chatty.gui.components.menus.TabContextMenu; //导入依赖的package包/类
public Channels(MainGui gui, StyleManager styleManager,
ContextMenuListener contextMenuListener) {
windowListener = new MyWindowListener();
tabs = new Tabs();
tabs.setPopupMenu(new TabContextMenu(contextMenuListener));
this.styleManager = styleManager;
this.contextMenuListener = contextMenuListener;
this.gui = gui;
tabs.addChangeListener(new TabChangeListener());
tabs.setMouseWheelScrollingEnabled(gui.getSettings().getBoolean("tabsMwheelScrolling"));
tabs.setMouseWheelScrollingAnywhereEnabled(gui.getSettings().getBoolean("tabsMwheelScrollingAnywhere"));
tabs.setTabPlacement(gui.getSettings().getString("tabsPlacement"));
tabs.setTabLayoutPolicy(gui.getSettings().getString("tabsLayout"));
gui.addWindowListener(windowListener);
//tabs.setOpaque(false);
//tabs.setBackground(new Color(0,0,0,0));
addDefaultChannel();
}
示例2: TabComponent
import chatty.gui.components.menus.TabContextMenu; //导入依赖的package包/类
public TabComponent(String text, ContextMenuListener listener) {
super(new FlowLayout(FlowLayout.LEFT, 0, 0));
JLabel label = new JLabel(text);
add(label);
setOpaque(false);
label.setComponentPopupMenu(new TabContextMenu(listener));
}
示例3: Tabs
import chatty.gui.components.menus.TabContextMenu; //导入依赖的package包/类
public Tabs(ContextMenuListener contextMenuListener) {
this.contextMenuListener = contextMenuListener;
setLayout(new BorderLayout());
tabs.setOpaque(false);
tabs.setComponentPopupMenu(new TabContextMenu(contextMenuListener));
//tabs.setTabPlacement(JTabbedPane.LEFT);
}