< prev index next >
src/java.desktop/share/classes/javax/swing/ToolTipManager.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 78,89 ****
private KeyListener accessibilityKeyListener = null;
private KeyStroke postTip;
private KeyStroke hideTip;
! // PENDING(ges)
protected boolean lightWeightPopupEnabled = true;
protected boolean heavyWeightPopupEnabled = false;
ToolTipManager() {
enterTimer = new Timer(750, new insideTimerAction());
enterTimer.setRepeats(false);
--- 78,94 ----
private KeyListener accessibilityKeyListener = null;
private KeyStroke postTip;
private KeyStroke hideTip;
! /**
! * Lightweight popup enabled.
! */
protected boolean lightWeightPopupEnabled = true;
+ /**
+ * Heavyweight popup enabled.
+ */
protected boolean heavyWeightPopupEnabled = false;
ToolTipManager() {
enterTimer = new Timer(750, new insideTimerAction());
enterTimer.setRepeats(false);
*** 655,665 ****
--- 660,676 ----
enterTimer.stop();
exitTimer.restart();
}
}
+ /**
+ * Inside timer action.
+ */
protected class insideTimerAction implements ActionListener {
+ /**
+ * {@inheritDoc}
+ */
public void actionPerformed(ActionEvent e) {
if(insideComponent != null && insideComponent.isShowing()) {
// Lazy lookup
if (toolTipText == null && mouseEvent != null) {
toolTipText = insideComponent.getToolTipText(mouseEvent);
*** 679,695 ****
--- 690,718 ----
}
}
}
}
+ /**
+ * Outside timer action.
+ */
protected class outsideTimerAction implements ActionListener {
+ /**
+ * {@inheritDoc}
+ */
public void actionPerformed(ActionEvent e) {
showImmediately = false;
}
}
+ /**
+ * Still inside timer action.
+ */
protected class stillInsideTimerAction implements ActionListener {
+ /**
+ * {@inheritDoc}
+ */
public void actionPerformed(ActionEvent e) {
hideTipWindow();
enterTimer.stop();
showImmediately = false;
insideComponent = null;
< prev index next >