use of javax.swing.ToolTipManager in project binnavi by google.
the class GuiInitializer method initializeTooltipDelay.
/**
* 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);
}
use of javax.swing.ToolTipManager in project SIMVA-SoS by SESoS.
the class ChartPanel method mouseExited.
/**
* 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;
}
}
use of javax.swing.ToolTipManager in project SIMVA-SoS by SESoS.
the class ChartPanel method mouseEntered.
/**
* 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;
}
}
Aggregations