Search in sources :

Example 6 with StatusBar

use of org.jivesoftware.spark.ui.status.StatusBar in project Spark by igniterealtime.

the class SparkSystemTray method addStatusMenuItems.

/**
 * Add all Registered DND's to MenuItems.
 */
private void addStatusMenuItems() {
    Workspace workspace = SparkManager.getWorkspace();
    StatusBar statusBar = workspace.getStatusBar();
    for (Object o : statusBar.getStatusList()) {
        StatusItem item = (StatusItem) o;
        final JMenuItem menuItem = new JMenuItem(item.getText());
        menuItem.addActionListener(this);
        statusMenu.add(menuItem);
    }
}
Also used : StatusItem(org.jivesoftware.spark.ui.status.StatusItem) StatusBar(org.jivesoftware.spark.ui.status.StatusBar) Workspace(org.jivesoftware.spark.Workspace)

Aggregations

StatusBar (org.jivesoftware.spark.ui.status.StatusBar)6 Presence (org.jivesoftware.smack.packet.Presence)4 ActionEvent (java.awt.event.ActionEvent)2 MouseEvent (java.awt.event.MouseEvent)2 AbstractAction (javax.swing.AbstractAction)2 JMenu (javax.swing.JMenu)2 JMenuItem (javax.swing.JMenuItem)2 SmackException (org.jivesoftware.smack.SmackException)2 Workspace (org.jivesoftware.spark.Workspace)2 StatusItem (org.jivesoftware.spark.ui.status.StatusItem)2 MouseAdapter (java.awt.event.MouseAdapter)1 Action (javax.swing.Action)1 ImageIcon (javax.swing.ImageIcon)1 JPopupMenu (javax.swing.JPopupMenu)1 XMPPException (org.jivesoftware.smack.XMPPException)1 StanzaFilter (org.jivesoftware.smack.filter.StanzaFilter)1 StanzaTypeFilter (org.jivesoftware.smack.filter.StanzaTypeFilter)1 IQ (org.jivesoftware.smack.packet.IQ)1 VCard (org.jivesoftware.smackx.vcardtemp.packet.VCard)1 RolloverButton (org.jivesoftware.spark.component.RolloverButton)1