本文整理汇总了Java中chatty.gui.components.FavoritesDialog类的典型用法代码示例。如果您正苦于以下问题:Java FavoritesDialog类的具体用法?Java FavoritesDialog怎么用?Java FavoritesDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FavoritesDialog类属于chatty.gui.components包,在下文中一共展示了FavoritesDialog类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: chooseFavorites
import chatty.gui.components.FavoritesDialog; //导入依赖的package包/类
public Set<String> chooseFavorites(Component owner, String channel) {
updateFavoritesDialog();
favoritesDialog.setLocationRelativeTo(owner);
int result = favoritesDialog.showDialog(channel, "Use chosen channels",
"Use chosen channel");
if (result == FavoritesDialog.ACTION_DONE) {
return favoritesDialog.getChannels();
}
return new HashSet<>();
}
示例2: openFavoritesDialogToJoin
import chatty.gui.components.FavoritesDialog; //导入依赖的package包/类
private void openFavoritesDialogToJoin(String channel) {
updateFavoritesDialog();
favoritesDialog.setLocationRelativeTo(this);
int result = favoritesDialog.showDialog(channel, "Join chosen channels",
"Join chosen channel");
if (result == FavoritesDialog.ACTION_DONE) {
Set<String> selectedChannels = favoritesDialog.getChannels();
client.joinChannels(selectedChannels);
}
}
示例3: createGui
import chatty.gui.components.FavoritesDialog; //导入依赖的package包/类
/**
* Creates the gui, run in the EDT.
*/
private void createGui() {
setWindowIcons();
actionListener = new MyActionListener();
debugWindow = new DebugWindow(new DebugCheckboxListener());
connectionDialog = new ConnectionDialog(this);
tokenDialog = new TokenDialog(this);
tokenGetDialog = new TokenGetDialog(this);
userInfoDialog = new UserInfo(this, contextMenuListener);
aboutDialog = new About();
setHelpWindowIcons();
channelInfoDialog = new ChannelInfoDialog(this);
channelInfoDialog.addContextMenuListener(contextMenuListener);
settingsDialog = new SettingsDialog(this,client.settings);
adminDialog = new AdminDialog(this);
favoritesDialog = new FavoritesDialog(this);
joinDialog = new JoinDialog(this);
searchDialog = new SearchDialog(this);
GuiUtil.installEscapeCloseOperation(searchDialog);
liveStreamsDialog = new LiveStreamsDialog(contextMenuListener);
setLiveStreamsWindowIcons();
//GuiUtil.installEscapeCloseOperation(liveStreamsDialog);
errorMessage = new ErrorMessage(this, linkLabelListener);
trayIcon = new TrayIconManager(createImage("app_16.png"));
trayIcon.addActionListener(new TrayMenuListener());
notificationManager = new NotificationManager<>(this);
notificationManager.setNotificationActionListener(new MyNotificationActionListener());
styleManager = new StyleManager(client.settings);
highlightedMessages = new HighlightedMessages(this, styleManager);
highlightedMessages.setContextMenuListener(contextMenuListener);
channels = new Channels(this,styleManager, contextMenuListener);
channels.getComponent().setPreferredSize(new Dimension(600,300));
add(channels.getComponent(), BorderLayout.CENTER);
channels.addTabChangeListener(new TabChangeListener());
addressbookDialog = new AddressbookDialog(this, client.addressbook);
//dialogs = new DialogManager(this, channels);
client.settings.setSettingChangeListener(new MySettingChangeListener());
this.getContentPane().setBackground(new Color(0,0,0,0));
MenuListener menuListener = new MenuListener();
menu = new MainMenu(menuListener,menuListener);
setJMenuBar(menu);
state.update();
addListeners();
pack();
setLocationByPlatform(true);
client.api.requestEmoticons();
windowStateManager = new WindowStateManager(this, client.settings);
windowStateManager.addWindow(this, "main", true, true);
windowStateManager.setPrimaryWindow(this);
windowStateManager.addWindow(highlightedMessages, "highlights", true, true);
windowStateManager.addWindow(channelInfoDialog, "channelInfo", true, true);
windowStateManager.addWindow(liveStreamsDialog, "liveStreams", true, true);
windowStateManager.addWindow(adminDialog, "admin", true, true);
windowStateManager.addWindow(addressbookDialog, "addressbook", true, true);
}