net.refractions.udig.project.command
Class SetLayerVisibilityCommand

java.lang.Object
  extended by net.refractions.udig.project.command.AbstractCommand
      extended by net.refractions.udig.project.command.SetLayerVisibilityCommand
All Implemented Interfaces:
Command, MapCommand, UndoableCommand, UndoableMapCommand

public class SetLayerVisibilityCommand
extends AbstractCommand
implements UndoableMapCommand

Set the visiblity of the layer

Since:
1.1.0
Author:
Jesse

Constructor Summary
SetLayerVisibilityCommand(ILayer layer, boolean newValue)
           
 
Method Summary
 java.lang.String getName()
          Returns the name of the MapCommand
 void rollback(IProgressMonitor monitor)
          Rollback the effects of the command
 void run(IProgressMonitor monitor)
          The method that performs the work of the command.
 
Methods inherited from class net.refractions.udig.project.command.AbstractCommand
copy, getMap, setMap, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.refractions.udig.project.command.MapCommand
getMap, setMap
 
Methods inherited from interface net.refractions.udig.project.command.Command
copy
 
Methods inherited from interface net.refractions.udig.project.command.Command
copy
 

Constructor Detail

SetLayerVisibilityCommand

public SetLayerVisibilityCommand(ILayer layer,
                                 boolean newValue)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Command
Returns the name of the MapCommand

Specified by:
getName in interface Command
Returns:
The name of the command.

run

public void run(IProgressMonitor monitor)
         throws java.lang.Exception
Description copied from interface: Command
The method that performs the work of the command.

Run is called by UDIG when the command is received. Commands are run in a seperate thread.

Specified by:
run in interface Command
Parameters:
monitor - A progress monitor used by the command to report on its internal state. API how is this associated with a Thread? is it a Thread?
Throws:
java.lang.Exception

rollback

public void rollback(IProgressMonitor monitor)
              throws java.lang.Exception
Description copied from interface: UndoableCommand
Rollback the effects of the command

Specified by:
rollback in interface UndoableCommand
Throws:
java.lang.Exception