Search in sources :

Example 21 with RolloverButton

use of org.jivesoftware.spark.component.RolloverButton in project Spark by igniterealtime.

the class ButtonFactory method createRegisterButton.

public RolloverButton createRegisterButton() {
    RolloverButton register = new RolloverButton(SparkRes.getImageIcon(SparkRes.PEOPLE_IMAGE));
    register.setToolTipText(Res.getString("button.register").replace("&", ""));
    return register;
}
Also used : RolloverButton(org.jivesoftware.spark.component.RolloverButton)

Example 22 with RolloverButton

use of org.jivesoftware.spark.component.RolloverButton in project Spark by igniterealtime.

the class ButtonFactory method createEmoticonButton.

public RolloverButton createEmoticonButton() {
    final EmoticonManager emoticonManager = EmoticonManager.getInstance();
    final String activeEmoticonSetName = emoticonManager.getActiveEmoticonSetName();
    final Emoticon smileEmoticon = emoticonManager.getEmoticon(activeEmoticonSetName, ":)");
    Emoticon firstEmoticon = (smileEmoticon == null) ? firstEmoticon = emoticonManager.getFirstEmotion(activeEmoticonSetName) : smileEmoticon;
    URL emotionURL = emoticonManager.getEmoticonURL(firstEmoticon);
    ImageIcon icon = new ImageIcon(emotionURL);
    firstEmoticon = null;
    return new RolloverButton(icon);
}
Also used : Emoticon(org.jivesoftware.sparkimpl.plugin.emoticons.Emoticon) ImageIcon(javax.swing.ImageIcon) EmoticonManager(org.jivesoftware.sparkimpl.plugin.emoticons.EmoticonManager) RolloverButton(org.jivesoftware.spark.component.RolloverButton) URL(java.net.URL)

Example 23 with RolloverButton

use of org.jivesoftware.spark.component.RolloverButton in project Spark by igniterealtime.

the class ButtonFactory method createTemaButton.

public RolloverButton createTemaButton() {
    RolloverButton thema = new RolloverButton(SparkRes.getImageIcon(SparkRes.TYPING_TRAY));
    thema.setToolTipText(Res.getString("menuitem.change.subject"));
    return thema;
}
Also used : RolloverButton(org.jivesoftware.spark.component.RolloverButton)

Example 24 with RolloverButton

use of org.jivesoftware.spark.component.RolloverButton in project Spark by igniterealtime.

the class ChatRoom method enableToolbar.

/**
 * Enable the ChatRoom toolbar.
 */
public void enableToolbar() {
    final int count = editorBarLeft.getComponentCount();
    for (int i = 0; i < count; i++) {
        final Object o = editorBarLeft.getComponent(i);
        if (o instanceof RolloverButton) {
            final RolloverButton rb = (RolloverButton) o;
            rb.setEnabled(true);
        }
    }
}
Also used : RolloverButton(org.jivesoftware.spark.component.RolloverButton)

Example 25 with RolloverButton

use of org.jivesoftware.spark.component.RolloverButton in project Spark by igniterealtime.

the class CoBrowser method tabSelected.

public void tabSelected() {
    goButton = new RolloverButton(FastpathRes.getImageIcon(FastpathRes.PUSH_URL_16x16));
    pushCurrentPageButton = new RolloverButton(FastpathRes.getImageIcon(FastpathRes.DOWNLOAD_16x16));
    followMeButton = new JCheckBox(FpRes.getString("checkbox.allow.user.to.follow"), false);
    followMeButton.setToolTipText(GraphicUtils.createToolTip(PUBLIC_TOOLTIP));
    followMeButton.addActionListener(this);
    final JPanel mainPanel = new JPanel();
    browser = BrowserFactory.getBrowser();
    browser.addBrowserListener(this);
    mainPanel.setLayout(new BorderLayout());
    mainPanel.add(browser, BorderLayout.CENTER);
    urlField = new JTextField();
    setLayout(new GridBagLayout());
    backButton = new RolloverButton(FastpathRes.getImageIcon(FastpathRes.SMALL_PIN_BLUE));
    backButton.setText(FpRes.getString("back"));
    backButton.setToolTipText(GraphicUtils.createToolTip(FpRes.getString("tooltip.back.one.page")));
    goButton.setToolTipText(GraphicUtils.createToolTip(FpRes.getString("tooltip.push.url")));
    goButton.setText(FpRes.getString("go"));
    pushCurrentPageButton.setToolTipText(GraphicUtils.createToolTip(FpRes.getString("tooltip.push.current.page")));
    pushCurrentPageButton.setText(FpRes.getString("button.start.cobrowsing.session"));
    load(getStartLocation());
    buildUI();
    add(mainPanel, new GridBagConstraints(0, 2, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    urlField.addKeyListener(new KeyListener() {

        public void keyPressed(KeyEvent e) {
            if (e.getKeyChar() == KeyEvent.VK_ENTER) {
                showSpecifiedPage();
            }
        }

        public void keyReleased(KeyEvent e) {
        }

        public void keyTyped(KeyEvent e) {
        }
    });
    followMeButton.setOpaque(false);
}
Also used : JCheckBox(javax.swing.JCheckBox) KeyEvent(java.awt.event.KeyEvent) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) BorderLayout(java.awt.BorderLayout) GridBagLayout(java.awt.GridBagLayout) KeyListener(java.awt.event.KeyListener) JTextField(javax.swing.JTextField) RolloverButton(org.jivesoftware.spark.component.RolloverButton)

Aggregations

RolloverButton (org.jivesoftware.spark.component.RolloverButton)25 JPanel (javax.swing.JPanel)12 GridBagConstraints (java.awt.GridBagConstraints)11 GridBagLayout (java.awt.GridBagLayout)11 Insets (java.awt.Insets)11 Font (java.awt.Font)7 Color (java.awt.Color)6 JLabel (javax.swing.JLabel)6 BorderLayout (java.awt.BorderLayout)4 JScrollPane (javax.swing.JScrollPane)4 SmackException (org.jivesoftware.smack.SmackException)4 XMPPException (org.jivesoftware.smack.XMPPException)4 FlowLayout (java.awt.FlowLayout)3 ActionEvent (java.awt.event.ActionEvent)3 JTextField (javax.swing.JTextField)3 Dimension (java.awt.Dimension)2 ActionListener (java.awt.event.ActionListener)2 KeyEvent (java.awt.event.KeyEvent)2 MouseEvent (java.awt.event.MouseEvent)2 Collection (java.util.Collection)2