lib
Class LearnableActionPattern

java.lang.Object
  extended by lib.LearnableActionPattern
All Implemented Interfaces:
IEditableElement

public class LearnableActionPattern
extends java.lang.Object
implements IEditableElement

A LearnableActionPattern encapsulates the various constructs within the LAP file as an arraylist of elements which are drive collections, action patterns and competances

Version:
1.0
Author:
CobaltSoftware (abode.devteam@cobaltsoftware.net)

Field Summary
private  java.util.ArrayList alElements
           
private  Documentation documentation
           
private static int elementsMade
           
 
Constructor Summary
LearnableActionPattern()
          Initialize this BOD object with an empty set of definitions.
LearnableActionPattern(java.util.ArrayList elements)
          Initialize this BOD file with a pre-loaded arraylist of elements.
LearnableActionPattern(java.util.ArrayList elements, Documentation d)
          Initialize this BOD file with a pre-loaded list of elements and some documentation
 
Method Summary
 JTreeNode buildTree(JTreeNode root, LearnableActionPattern lap, boolean detailed, boolean expanded)
          Don't call this on ourselves
 boolean containsElementNamed(java.lang.String name)
          Do we contain an element with the name given?
 Documentation getDocumentation()
           
 IEditableElement getElementNamed(java.lang.String name)
          Get an element with the name given
 java.util.ArrayList getElements()
          Expose the arraylist to other classes
 void onSelect(JAbode mainGui, JEditorWindow subGui, JDiagram diagram)
          Populate the property grid
 void scanActionTree(JTreeNode deNode, java.lang.String action, boolean detailed, boolean expanded)
          Add the specified node summary beneath the current node (i.e in overview mode, use to add the sub-tree for the action pattern or competence in question)
 void setDocumentation(Documentation d)
           
 void showContextMenu(JTreeNode showOn, LearnableActionPattern lap, JEditorWindow window, JDiagram diagram)
          Produce and show a context menu for this object
 JTreeNode toActionTree()
          Produce a diagram tree hierarchy of action pattern elements
 JTreeNode toCompetenceTree()
          Produce a tree hierarchy of competence elements
 JTreeNode toDriveTree()
          Produce a tree hierarchy of drive elements
 JTreeNode toLogicTree()
          Produce a logic tree
 JTreeNode toOverviewTree()
          Produce an overview tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alElements

private java.util.ArrayList alElements

documentation

private Documentation documentation

elementsMade

private static int elementsMade
Constructor Detail

LearnableActionPattern

public LearnableActionPattern()
Initialize this BOD object with an empty set of definitions.


LearnableActionPattern

public LearnableActionPattern(java.util.ArrayList elements)
Initialize this BOD file with a pre-loaded arraylist of elements.


LearnableActionPattern

public LearnableActionPattern(java.util.ArrayList elements,
                              Documentation d)
Initialize this BOD file with a pre-loaded list of elements and some documentation

Method Detail

getDocumentation

public Documentation getDocumentation()

setDocumentation

public void setDocumentation(Documentation d)

getElements

public java.util.ArrayList getElements()
Expose the arraylist to other classes


containsElementNamed

public boolean containsElementNamed(java.lang.String name)
Do we contain an element with the name given?


getElementNamed

public IEditableElement getElementNamed(java.lang.String name)
Get an element with the name given


toOverviewTree

public JTreeNode toOverviewTree()
Produce an overview tree


toLogicTree

public JTreeNode toLogicTree()
Produce a logic tree


scanActionTree

public void scanActionTree(JTreeNode deNode,
                           java.lang.String action,
                           boolean detailed,
                           boolean expanded)
Add the specified node summary beneath the current node (i.e in overview mode, use to add the sub-tree for the action pattern or competence in question)


toCompetenceTree

public JTreeNode toCompetenceTree()
Produce a tree hierarchy of competence elements


toActionTree

public JTreeNode toActionTree()
Produce a diagram tree hierarchy of action pattern elements


toDriveTree

public JTreeNode toDriveTree()
Produce a tree hierarchy of drive elements


buildTree

public JTreeNode buildTree(JTreeNode root,
                           LearnableActionPattern lap,
                           boolean detailed,
                           boolean expanded)
Don't call this on ourselves

Specified by:
buildTree in interface IEditableElement
Returns:
Tree node representing this node and the relevent sub-tree for the specified diagram rendering settings

onSelect

public void onSelect(JAbode mainGui,
                     JEditorWindow subGui,
                     JDiagram diagram)
Populate the property grid

Specified by:
onSelect in interface IEditableElement
Parameters:
mainGui - The reference to the outer GUI
subGui - The internal frame we're referring to
diagram - The diagram we're being select on.

showContextMenu

public void showContextMenu(JTreeNode showOn,
                            LearnableActionPattern lap,
                            JEditorWindow window,
                            JDiagram diagram)
Produce and show a context menu for this object

Specified by:
showContextMenu in interface IEditableElement
Parameters:
showOn - The tree node invoking us
lap - The file we're a part of
window - The window we're being dispalyed in
diagram - The diagram in the window we'return being shown on