uk.ac.kcl.cch.jb.pliny.commands
Class UpdateLOTypeCommand

java.lang.Object
  extended byorg.eclipse.gef.commands.Command
      extended byuk.ac.kcl.cch.jb.pliny.commands.UpdateLOTypeCommand

public class UpdateLOTypeCommand
extends org.eclipse.gef.commands.Command

this command allows any of the attributes associated with a LOType to be changed. It is invoked from the Type Manager's EditTypeWizard.

Author:
John Bradley
See Also:
EditTypeWizard

Constructor Summary
UpdateLOTypeCommand(LOType myType, String name, org.eclipse.swt.graphics.RGB titleFore, org.eclipse.swt.graphics.RGB titleBack, org.eclipse.swt.graphics.RGB bodyFore, org.eclipse.swt.graphics.RGB bodyBack, int sourceRoleKey, String sourceRoleName, int targetRoleKey, String targetRoleName)
          sets up an instance of the command to update the LOType.
 
Method Summary
 void execute()
           
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateLOTypeCommand

public UpdateLOTypeCommand(LOType myType,
                           String name,
                           org.eclipse.swt.graphics.RGB titleFore,
                           org.eclipse.swt.graphics.RGB titleBack,
                           org.eclipse.swt.graphics.RGB bodyFore,
                           org.eclipse.swt.graphics.RGB bodyBack,
                           int sourceRoleKey,
                           String sourceRoleName,
                           int targetRoleKey,
                           String targetRoleName)
sets up an instance of the command to update the LOType.

Parameters:
myType - LOType the type to be changed.
name - String the new name for the LOType.
titleFore - RGB the new color for the Title Foreground
titleBack - RGB the new color for the Title Backroundground
bodyFore - RGB the new color for the Body Foreground
bodyBack - RGB the new color for the Body Background
sourceRoleKey - int key to Resource to act as the Source Role
sourceRoleName - String name of Resource to be created to ast as the Source Role.
targetRoleKey - int key to Resource to act as the Target Role
targetRoleName - String name of Resource to be created to ast as the Target Role.
Method Detail

execute

public void execute()

undo

public void undo()