abbot.editor.widgets
Class WaitIndicator

java.lang.Object
  extended by abbot.editor.widgets.AbstractComponentDecorator
      extended by abbot.editor.widgets.WaitIndicator
All Implemented Interfaces:
KeyEventDispatcher
Direct Known Subclasses:
SpinningDialWaitIndicator

public class WaitIndicator
extends AbstractComponentDecorator
implements KeyEventDispatcher

Prevents mouse and key input to a JComponent or JFrame, while dimming the component and displaying a wait cursor.


Nested Class Summary
 
Nested classes/interfaces inherited from class abbot.editor.widgets.AbstractComponentDecorator
AbstractComponentDecorator.Painter
 
Field Summary
 
Fields inherited from class abbot.editor.widgets.AbstractComponentDecorator
DEFAULT_BOUNDS, TOP
 
Constructor Summary
WaitIndicator(JComponent target)
          Place the wait indicator over the given component.
WaitIndicator(JFrame frame)
          Place the wait indicator over the entire frame.
 
Method Summary
 boolean dispatchKeyEvent(KeyEvent e)
          Consume events targeted at our target component.
 void dispose()
          Remove the wait indicator.
 void paint(Graphics g)
          The default dims the blocked component.
 
Methods inherited from class abbot.editor.widgets.AbstractComponentDecorator
attach, clipDecorationBounds, getComponent, getDecorationBounds, getPainter, getToolTipText, getToolTipText, isShowing, isVisible, repaint, setCursor, setDecorationBounds, setDecorationBounds, setPainterBounds, setToolTipText, setVisible, synch, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WaitIndicator

public WaitIndicator(JFrame frame)
Place the wait indicator over the entire frame.


WaitIndicator

public WaitIndicator(JComponent target)
Place the wait indicator over the given component.

Method Detail

dispose

public void dispose()
Remove the wait indicator.

Overrides:
dispose in class AbstractComponentDecorator

dispatchKeyEvent

public boolean dispatchKeyEvent(KeyEvent e)
Consume events targeted at our target component. Return true to consume the event.

Specified by:
dispatchKeyEvent in interface KeyEventDispatcher

paint

public void paint(Graphics g)
The default dims the blocked component.

Specified by:
paint in class AbstractComponentDecorator


Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge