de.schlichtherle.truezip.crypto.raes.param.swing
Class BasicInvalidKeyFeedback
java.lang.Object
de.schlichtherle.truezip.crypto.raes.param.swing.BasicFeedback
de.schlichtherle.truezip.crypto.raes.param.swing.BasicInvalidKeyFeedback
- All Implemented Interfaces:
- Feedback, InvalidKeyFeedback
- Direct Known Subclasses:
- HurlingWindowFeedback
public class BasicInvalidKeyFeedback
- extends BasicFeedback
- implements InvalidKeyFeedback
Provides feedback by beeping using the default toolkit and disabling the
default button in the root pane for SafeKeyProvider.MIN_KEY_RETRY_DELAY
milliseconds when prompting for a key and the last input was invalid.
Note that the root pane is normally the root pane of a parent
JOptionPane which has the OK button set as its default button.
This is to inhibit the use of a GUI robot for exhaustive password searching.
- Author:
- Christian Schlichtherle
|
Method Summary |
void |
feedback(JPanel panel)
Starts the visual/audible feedback. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
duration
private final int duration
BasicInvalidKeyFeedback
public BasicInvalidKeyFeedback()
BasicInvalidKeyFeedback
protected BasicInvalidKeyFeedback(int duration)
- Constructs a new feedback.
- Parameters:
duration - the duration for disabling the default button in the
root pane in milliseconds.
feedback
public void feedback(JPanel panel)
- Description copied from class:
BasicFeedback
- Starts the visual/audible feedback.
This method is called when the panel is shown in its containing window.
It is run on AWT's Event Dispatch Thread, so it must complete fast
in order not to block the GUI.
If an implementation is going to do animations, the
Timer class should be used to schedule timer events
for the animation.
The implementation in this class simply beeps using the default toolkit.
- Specified by:
feedback in interface Feedback- Overrides:
feedback in class BasicFeedback
- Parameters:
panel - the panel to provide visual/audible feedback to.
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.