com.pietschy.command.worker
Class DefaultGlassPaneStrategy

java.lang.Object
  extended by com.pietschy.command.worker.DefaultGlassPaneStrategy
All Implemented Interfaces:
GlassPaneStrategy

public class DefaultGlassPaneStrategy
extends java.lang.Object
implements GlassPaneStrategy

Default implementation of GlassPaneStrategy that simply activates a transparent component, blocks mouse events and displays the standard wait cursor.

It is also possible to specify the actual glasspane component to use. In this case it's up to the user to specify the cursor and handle mouse events.


Constructor Summary
DefaultGlassPaneStrategy()
          Creates a new instance.
DefaultGlassPaneStrategy(javax.swing.JComponent glassPane)
          Creates a new instance that uses the specified glasspane component.
 
Method Summary
 void activatePane(java.lang.Object source)
          Activates the glasspane.
 void deactivatePane(java.lang.Object source)
          Deactivates the glasspane.
 javax.swing.JComponent getGlassPane()
          Gets the glasspane component this strategy is using.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGlassPaneStrategy

public DefaultGlassPaneStrategy()
Creates a new instance.


DefaultGlassPaneStrategy

public DefaultGlassPaneStrategy(javax.swing.JComponent glassPane)
Creates a new instance that uses the specified glasspane component.

Parameters:
glassPane - the component to use as the glasspane.
Method Detail

getGlassPane

public javax.swing.JComponent getGlassPane()
Gets the glasspane component this strategy is using.

Returns:
the glasspane component this strategy is using.

activatePane

public void activatePane(java.lang.Object source)
Activates the glasspane.

Specified by:
activatePane in interface GlassPaneStrategy
Parameters:
source - the object that requested the activation.

deactivatePane

public void deactivatePane(java.lang.Object source)
Deactivates the glasspane.

Specified by:
deactivatePane in interface GlassPaneStrategy
Parameters:
source - the object that previously activated the glasspane.


Copyright © 2006 - 2007 Andrew Pietsch