Java Code Examples for javax.swing.ToolTipManager#setReshowDelay()

The following examples show how to use javax.swing.ToolTipManager#setReshowDelay() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChartPanel.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Handles a 'mouse entered' event. This method changes the tooltip delays
 * of ToolTipManager.sharedInstance() to the possibly different values set
 * for this chart panel.
 *
 * @param e  the mouse event.
 */
@Override
public void mouseEntered(MouseEvent e) {
    if (!this.ownToolTipDelaysActive) {
        ToolTipManager ttm = ToolTipManager.sharedInstance();

        this.originalToolTipInitialDelay = ttm.getInitialDelay();
        ttm.setInitialDelay(this.ownToolTipInitialDelay);

        this.originalToolTipReshowDelay = ttm.getReshowDelay();
        ttm.setReshowDelay(this.ownToolTipReshowDelay);

        this.originalToolTipDismissDelay = ttm.getDismissDelay();
        ttm.setDismissDelay(this.ownToolTipDismissDelay);

        this.ownToolTipDelaysActive = true;
    }
}
 
Example 2
Source File: Test6657026.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 3
Source File: AbstractChartPanel.java    From rapidminer-studio with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
 * Handles a 'mouse entered' event. This method changes the tooltip delays of
 * ToolTipManager.sharedInstance() to the possibly different values set for this chart panel.
 * 
 * @param e
 *            the mouse event.
 */

@Override
public void mouseEntered(MouseEvent e) {
	if (!this.ownToolTipDelaysActive) {
		ToolTipManager ttm = ToolTipManager.sharedInstance();

		this.originalToolTipInitialDelay = ttm.getInitialDelay();
		ttm.setInitialDelay(this.ownToolTipInitialDelay);

		this.originalToolTipReshowDelay = ttm.getReshowDelay();
		ttm.setReshowDelay(this.ownToolTipReshowDelay);

		this.originalToolTipDismissDelay = ttm.getDismissDelay();
		ttm.setDismissDelay(this.ownToolTipDismissDelay);

		this.ownToolTipDelaysActive = true;
	}
}
 
Example 4
Source File: ChartPanel.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Handles a 'mouse entered' event. This method changes the tooltip delays
 * of ToolTipManager.sharedInstance() to the possibly different values set
 * for this chart panel.
 *
 * @param e  the mouse event.
 */
public void mouseEntered(MouseEvent e) {
    if (!this.ownToolTipDelaysActive) {
        ToolTipManager ttm = ToolTipManager.sharedInstance();

        this.originalToolTipInitialDelay = ttm.getInitialDelay();
        ttm.setInitialDelay(this.ownToolTipInitialDelay);

        this.originalToolTipReshowDelay = ttm.getReshowDelay();
        ttm.setReshowDelay(this.ownToolTipReshowDelay);

        this.originalToolTipDismissDelay = ttm.getDismissDelay();
        ttm.setDismissDelay(this.ownToolTipDismissDelay);

        this.ownToolTipDelaysActive = true;
    }

    if (this.liveMouseHandler != null) {
        this.liveMouseHandler.mouseEntered(e);
    }
    Iterator iterator = this.auxiliaryMouseHandlers.iterator();
    while (iterator.hasNext()) {
        AbstractMouseHandler h = (AbstractMouseHandler) iterator.next();
        h.mouseEntered(e);
    }
}
 
Example 5
Source File: Test6657026.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 6
Source File: ChartPanel.java    From ccu-historian with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Handles a 'mouse entered' event. This method changes the tooltip delays
 * of ToolTipManager.sharedInstance() to the possibly different values set
 * for this chart panel.
 *
 * @param e  the mouse event.
 */
@Override
public void mouseEntered(MouseEvent e) {
    if (!this.ownToolTipDelaysActive) {
        ToolTipManager ttm = ToolTipManager.sharedInstance();

        this.originalToolTipInitialDelay = ttm.getInitialDelay();
        ttm.setInitialDelay(this.ownToolTipInitialDelay);

        this.originalToolTipReshowDelay = ttm.getReshowDelay();
        ttm.setReshowDelay(this.ownToolTipReshowDelay);

        this.originalToolTipDismissDelay = ttm.getDismissDelay();
        ttm.setDismissDelay(this.ownToolTipDismissDelay);

        this.ownToolTipDelaysActive = true;
    }
}
 
Example 7
Source File: ChartPanel.java    From buffer_bci with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Handles a 'mouse entered' event. This method changes the tooltip delays
 * of ToolTipManager.sharedInstance() to the possibly different values set
 * for this chart panel.
 *
 * @param e  the mouse event.
 */
@Override
public void mouseEntered(MouseEvent e) {
    if (!this.ownToolTipDelaysActive) {
        ToolTipManager ttm = ToolTipManager.sharedInstance();

        this.originalToolTipInitialDelay = ttm.getInitialDelay();
        ttm.setInitialDelay(this.ownToolTipInitialDelay);

        this.originalToolTipReshowDelay = ttm.getReshowDelay();
        ttm.setReshowDelay(this.ownToolTipReshowDelay);

        this.originalToolTipDismissDelay = ttm.getDismissDelay();
        ttm.setDismissDelay(this.ownToolTipDismissDelay);

        this.ownToolTipDelaysActive = true;
    }
}
 
Example 8
Source File: ChartPanel.java    From opensim-gui with Apache License 2.0 6 votes vote down vote up
/**
 * Handles a 'mouse entered' event. This method changes the tooltip delays
 * of ToolTipManager.sharedInstance() to the possibly different values set 
 * for this chart panel. 
 *
 * @param e  the mouse event.
 */
public void mouseEntered(MouseEvent e) {
    if (!this.ownToolTipDelaysActive) {
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        
        this.originalToolTipInitialDelay = ttm.getInitialDelay();
        ttm.setInitialDelay(this.ownToolTipInitialDelay);

        this.originalToolTipReshowDelay = ttm.getReshowDelay();
        ttm.setReshowDelay(this.ownToolTipReshowDelay);
        
        this.originalToolTipDismissDelay = ttm.getDismissDelay();
        ttm.setDismissDelay(this.ownToolTipDismissDelay);

        this.ownToolTipDelaysActive = true;
    }
}
 
Example 9
Source File: Test6657026.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 10
Source File: Test6657026.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    ToolTipManager manager = ToolTipManager.sharedInstance();
    if (DISMISS != manager.getDismissDelay()) {
        throw new Error("unexpected dismiss delay");
    }
    if (INITIAL != manager.getInitialDelay()) {
        throw new Error("unexpected initial delay");
    }
    if (RESHOW != manager.getReshowDelay()) {
        throw new Error("unexpected reshow delay");
    }
    manager.setDismissDelay(DISMISS + 1);
    manager.setInitialDelay(INITIAL + 1);
    manager.setReshowDelay(RESHOW + 1);

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example 11
Source File: ChartPanel.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their
 * original values in effect before mouseEntered()
 *
 * @param e  the mouse event.
 */
public void mouseExited(MouseEvent e) {
    if (this.ownToolTipDelaysActive) {
        // restore original tooltip dealys
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        ttm.setInitialDelay(this.originalToolTipInitialDelay);
        ttm.setReshowDelay(this.originalToolTipReshowDelay);
        ttm.setDismissDelay(this.originalToolTipDismissDelay);
        this.ownToolTipDelaysActive = false;
    }

    if (this.liveMouseHandler != null) {
        this.liveMouseHandler.mouseExited(e);
    }
    Iterator iterator = this.auxiliaryMouseHandlers.iterator();
    while (iterator.hasNext()) {
        AbstractMouseHandler h = (AbstractMouseHandler) iterator.next();
        h.mouseExited(e);
    }
}
 
Example 12
Source File: ChartPanel.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their
 * original values in effect before mouseEntered()
 *
 * @param e  the mouse event.
 */
@Override
public void mouseExited(MouseEvent e) {
    if (this.ownToolTipDelaysActive) {
        // restore original tooltip dealys
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        ttm.setInitialDelay(this.originalToolTipInitialDelay);
        ttm.setReshowDelay(this.originalToolTipReshowDelay);
        ttm.setDismissDelay(this.originalToolTipDismissDelay);
        this.ownToolTipDelaysActive = false;
    }
}
 
Example 13
Source File: RapidMinerGUI.java    From rapidminer-studio with GNU Affero General Public License v3.0 5 votes vote down vote up
private void setupToolTipManager() {
	// setup tool tip text manager
	ToolTipManager manager = ToolTipManager.sharedInstance();
	manager.setDismissDelay(25000); // original: 4000
	manager.setInitialDelay(1125);   // original: 750
	manager.setReshowDelay(50);    // original: 500
	// heavyweight popups are necessary because of native Chromium window by our browser extension (JxBrowser)
	manager.setLightWeightPopupEnabled(false);
}
 
Example 14
Source File: AbstractChartPanel.java    From rapidminer-studio with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their original values in effect before mouseEntered()
 * 
 * @param e
 *            the mouse event.
 */

@Override
public void mouseExited(MouseEvent e) {
	if (this.ownToolTipDelaysActive) {
		// restore original tooltip dealys
		ToolTipManager ttm = ToolTipManager.sharedInstance();
		ttm.setInitialDelay(this.originalToolTipInitialDelay);
		ttm.setReshowDelay(this.originalToolTipReshowDelay);
		ttm.setDismissDelay(this.originalToolTipDismissDelay);
		this.ownToolTipDelaysActive = false;
	}
}
 
Example 15
Source File: ChartPanel.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their
 * original values in effect before mouseEntered()
 *
 * @param e  the mouse event.
 */
@Override
public void mouseExited(MouseEvent e) {
    if (this.ownToolTipDelaysActive) {
        // restore original tooltip dealys
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        ttm.setInitialDelay(this.originalToolTipInitialDelay);
        ttm.setReshowDelay(this.originalToolTipReshowDelay);
        ttm.setDismissDelay(this.originalToolTipDismissDelay);
        this.ownToolTipDelaysActive = false;
    }
}
 
Example 16
Source File: ChartPanel.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their
 * original values in effect before mouseEntered()
 *
 * @param e  the mouse event.
 */
public void mouseExited(MouseEvent e) {
    if (this.ownToolTipDelaysActive) {
        // restore original tooltip dealys 
        ToolTipManager ttm = ToolTipManager.sharedInstance();       
        ttm.setInitialDelay(this.originalToolTipInitialDelay);
        ttm.setReshowDelay(this.originalToolTipReshowDelay);
        ttm.setDismissDelay(this.originalToolTipDismissDelay);
        this.ownToolTipDelaysActive = false;
    }
}
 
Example 17
Source File: ChartPanel.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their
 * original values in effect before mouseEntered()
 *
 * @param e  the mouse event.
 */
@Override
public void mouseExited(MouseEvent e) {
    if (this.ownToolTipDelaysActive) {
        // restore original tooltip dealys
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        ttm.setInitialDelay(this.originalToolTipInitialDelay);
        ttm.setReshowDelay(this.originalToolTipReshowDelay);
        ttm.setDismissDelay(this.originalToolTipDismissDelay);
        this.ownToolTipDelaysActive = false;
    }
}
 
Example 18
Source File: GuiInitializer.java    From binnavi with Apache License 2.0 5 votes vote down vote up
/**
 * Sets up the application-wide tooltip delay.
 */
private static void initializeTooltipDelay() {
  final ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
  toolTipManager.setDismissDelay(60000);
  toolTipManager.setInitialDelay(1000);
  toolTipManager.setReshowDelay(1000);
}
 
Example 19
Source File: ChartPanel.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their
 * original values in effect before mouseEntered()
 *
 * @param e  the mouse event.
 */
@Override
public void mouseExited(MouseEvent e) {
    if (this.ownToolTipDelaysActive) {
        // restore original tooltip dealys
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        ttm.setInitialDelay(this.originalToolTipInitialDelay);
        ttm.setReshowDelay(this.originalToolTipReshowDelay);
        ttm.setDismissDelay(this.originalToolTipDismissDelay);
        this.ownToolTipDelaysActive = false;
    }
}
 
Example 20
Source File: ChartPanel.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Handles a 'mouse exited' event. This method resets the tooltip delays of
 * ToolTipManager.sharedInstance() to their
 * original values in effect before mouseEntered()
 *
 * @param e  the mouse event.
 */
@Override
public void mouseExited(MouseEvent e) {
    if (this.ownToolTipDelaysActive) {
        // restore original tooltip dealys
        ToolTipManager ttm = ToolTipManager.sharedInstance();
        ttm.setInitialDelay(this.originalToolTipInitialDelay);
        ttm.setReshowDelay(this.originalToolTipReshowDelay);
        ttm.setDismissDelay(this.originalToolTipDismissDelay);
        this.ownToolTipDelaysActive = false;
    }
}