Java Code Examples for javax.swing.ToolTipManager#setDismissDelay()
The following examples show how to use
javax.swing.ToolTipManager#setDismissDelay() .
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: Test6657026.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
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 2
Source File: ChartPanel.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * 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 3
Source File: Test6657026.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
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 4
Source File: Test6657026.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
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 5
Source File: ChartPanel.java From opensim-gui with Apache License 2.0 | 6 votes |
/** * 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 6
Source File: ChartPanel.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * 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 ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * 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 openstock with GNU General Public License v3.0 | 6 votes |
/** * 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 9
Source File: Test6657026.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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: TooltipHack.java From netbeans with Apache License 2.0 | 6 votes |
/** Hack to invoke tooltip on given JComponent, with given dismiss delay. * Triggers <br> * <code>comp.getToolTipText(MouseEvent)</code> and * <code>comp.getToolTipLocation(MouseEvent)</code> with fake mousemoved * MouseEvent, set to given coordinates. */ public static void invokeTip (JComponent comp, int x, int y, int dismissDelay) { final ToolTipManager ttm = ToolTipManager.sharedInstance(); final int prevInit = ttm.getInitialDelay(); prevDismiss = ttm.getDismissDelay(); ttm.setInitialDelay(0); ttm.setDismissDelay(dismissDelay); MouseEvent fakeEvt = new MouseEvent( comp, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, x, y, 0, false); ttm.mouseMoved(fakeEvt); ttm.setInitialDelay(prevInit); Timer timer = new Timer(20, instance()); timer.setRepeats(false); timer.start(); }
Example 11
Source File: TooltipHack.java From netbeans with Apache License 2.0 | 6 votes |
/** Hack to invoke tooltip on given JComponent, with given dismiss delay. * Triggers <br> * <code>comp.getToolTipText(MouseEvent)</code> and * <code>comp.getToolTipLocation(MouseEvent)</code> with fake mousemoved * MouseEvent, set to given coordinates. */ public static void invokeTip (JComponent comp, int x, int y, int dismissDelay) { final ToolTipManager ttm = ToolTipManager.sharedInstance(); final int prevInit = ttm.getInitialDelay(); prevDismiss = ttm.getDismissDelay(); ttm.setInitialDelay(0); ttm.setDismissDelay(dismissDelay); MouseEvent fakeEvt = new MouseEvent( comp, MouseEvent.MOUSE_MOVED, System.currentTimeMillis(), 0, x, y, 0, false); ttm.mouseMoved(fakeEvt); ttm.setInitialDelay(prevInit); Timer timer = new Timer(20, instance()); timer.setRepeats(false); timer.start(); }
Example 12
Source File: Test6657026.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
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 13
Source File: ChartPanel.java From astor with GNU General Public License v2.0 | 6 votes |
/** * 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 14
Source File: Test6657026.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
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 15
Source File: Test6657026.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
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 16
Source File: AbstractChartPanel.java From rapidminer-studio with GNU Affero General Public License v3.0 | 6 votes |
/** * 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 17
Source File: RapidMinerGUI.java From rapidminer-studio with GNU Affero General Public License v3.0 | 5 votes |
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 18
Source File: ChartPanel.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * 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 19
Source File: ChartPanel.java From opensim-gui with Apache License 2.0 | 5 votes |
/** * 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 20
Source File: ChartPanel.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * 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; } }