javax.swing.ToolTipManager#setReshowDelay ( )源码实例Demo

下面列出了javax.swing.ToolTipManager#setReshowDelay ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: buffer_bci   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码2 项目: buffer_bci   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码3 项目: jdk8u60   文件: Test6657026.java
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();
}
 
源代码4 项目: astor   文件: ChartPanel.java
/**
 * 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);
    }
}
 
源代码5 项目: openjdk-jdk9   文件: Test6657026.java
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();
}
 
源代码6 项目: ccu-historian   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码7 项目: opensim-gui   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码8 项目: openjdk-8-source   文件: Test6657026.java
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();
}
 
源代码9 项目: jdk8u-jdk   文件: Test6657026.java
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();
}
 
源代码10 项目: astor   文件: ChartPanel.java
/**
 * 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);
    }
}
 
源代码11 项目: rapidminer-studio   文件: AbstractChartPanel.java
/**
 * 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;
	}
}
 
源代码12 项目: openstock   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码13 项目: ECG-Viewer   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码14 项目: binnavi   文件: GuiInitializer.java
/**
 * 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);
}
 
源代码15 项目: buffer_bci   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码16 项目: ccu-historian   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码17 项目: astor   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码18 项目: SIMVA-SoS   文件: ChartPanel.java
/**
 * 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;
    }
}
 
源代码19 项目: rapidminer-studio   文件: AbstractChartPanel.java
/**
 * 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;
	}
}
 
源代码20 项目: rapidminer-studio   文件: RapidMinerGUI.java
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);
}