venice
Class OpenPackageCommand

java.lang.Object
  |
  +--venice.Command
        |
        +--venice.OpenPackageCommand

public class OpenPackageCommand
extends Command

Opens the selected packages. This means that all their children will become visible and all composite relationships in this package will be opened and the contents of those composite relationships will be put back in the visualization.

Author:
Petteri Kamppuri

Fields inherited from class venice.Command
stAppModule
 
Constructor Summary
OpenPackageCommand()
           
 
Method Summary
static void decomposeVRelationship(VRelationship inRel)
          Decomposes a composite VRelationship.
 void execute()
          This method goes through the currently selected nodes from visualization and does the openPackage operation on all VPackage instances.
static void openPackage(VPackage inPackage)
          This method opens the given VPackage.
 
Methods inherited from class venice.Command
getAppModule, setAppModule
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

OpenPackageCommand

public OpenPackageCommand()
Method Detail

execute

public void execute()
This method goes through the currently selected nodes from visualization and does the openPackage operation on all VPackage instances.
Overrides:
execute in class Command

openPackage

public static void openPackage(VPackage inPackage)
This method opens the given VPackage. Opening means showing all children and moving all composite relationships down from the package level.

The operation itself is described below as pseudo code.

 openPackage(inPackage)
         for each inPackage.child as myChild
                 myChild.show
         iterate inPackage.mCompositeRelationshipList as myElement
                 iterate myElement as myRel
                         myRel.show
                         inPackage.removeFromCompositeRelationships(myRel)
         inPackage.setShowContent(true)
 
Parameters:
inPackage - the package to open

decomposeVRelationship

public static void decomposeVRelationship(VRelationship inRel)
Decomposes a composite VRelationship. Add all the subrelationships to Visualization
Parameters:
inRel - the composite relationship to decompose