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

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

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

Creates a new LOType. This is used by the EditTypeWizard which first interacts with the user to get data upon which the LOType should be created.

Author:
John Bradley

Constructor Summary
AddLOTypeCommand(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)
          constructs a new 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

AddLOTypeCommand

public AddLOTypeCommand(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)
constructs a new LOType.

In all cases colours and a name must be provided. The Role information however is slightly more complex:

Parameters:
name - String name of new LOType.
titleFore - RGB of color for title Foreground.
titleBack - RGB of color for title Background.
bodyFore - RGB of color for body Foreground.
bodyBack - RGB of color for body Background.
sourceRoleKey - int key to Resource to act as source Role
sourceRoleName - String name of Resource to be created to act as source Role
targetRoleKey - int key to Resource to act as target Role
targetRoleName - String name of Resource to be created to act as target Role
Method Detail

execute

public void execute()

undo

public void undo()