Example usage for com.intellij.openapi.ui.popup IconButton getTooltip

List of usage examples for com.intellij.openapi.ui.popup IconButton getTooltip

Introduction

In this page you can find the example usage for com.intellij.openapi.ui.popup IconButton getTooltip.

Prototype

public String getTooltip() 

Source Link

Usage

From source file:com.intellij.ui.InplaceButton.java

License:Apache License

public InplaceButton(IconButton source, final ActionListener listener, final Pass<MouseEvent> me,
        TimedDeadzone.Length mouseDeadzone) {
    myBehavior = new BaseButtonBehavior(this, mouseDeadzone) {
        @Override/*from  ww  w  .  ja  v  a  2s.c o  m*/
        protected void execute(final MouseEvent e) {
            listener.actionPerformed(
                    new ActionEvent(e, ActionEvent.ACTION_PERFORMED, "execute", e.getModifiers()));
        }

        @Override
        protected void repaint(Component c) {
            doRepaintComponent(c);
        }

        @Override
        protected void pass(final MouseEvent e) {
            if (me != null) {
                me.pass(e);
            }
        }
    };

    setIcons(source);

    //setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    setToolTipText(source.getTooltip());
    setOpaque(false);
    setHoveringEnabled(true);
}