lib
Class DriveCollection

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

public class DriveCollection
extends java.lang.Object
implements IEditableElement

A (RealTime/Discrete Time) drive collection is a named goal and a set of drive elements that work to achieve that goal.

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

Field Summary
private  java.util.ArrayList alDriveElements
           
private  java.util.ArrayList alGoal
           
private  boolean bIsRealTime
           
private  int driveElement
           
private  java.lang.String strName
           
 
Constructor Summary
DriveCollection(java.lang.String name, boolean realTime, java.util.ArrayList goal, java.util.ArrayList elements)
          Initialize this drive collection
 
Method Summary
 JTreeNode buildTree(JTreeNode root, LearnableActionPattern lap, boolean detailed, boolean expanded)
          Build the tree structure of the file
 java.util.ArrayList getDriveElements()
          Get our list of drive elements
 java.util.ArrayList getGoal()
          Get the arraylist of actionelements that comprise our goal
 java.lang.String getName()
          Get the name of this drive collection
 boolean getRealTime()
          Get whether or not this is a real-time drive collection
 DriveCollection getSelf()
          Get reference back this object for inner class
 void onSelect(JAbode mainGui, JEditorWindow subGui, JDiagram diagram)
          When we click this Action Element in the GUI populate the properties panel with the various attributes and setup listeners to catch modifications that are made.
 void setDriveElements(java.util.ArrayList drive)
          Set our list of drive elements to be some new list
 void setGoal(java.util.ArrayList goal)
          Set our goal list
 void setName(java.lang.String name)
          Reset the name of this drive element
 void setRealTime(boolean real)
          Set whether or not this is a real-time drive collection
 void showContextMenu(JTreeNode showOn, LearnableActionPattern lap, JEditorWindow window, JDiagram diagram)
          Produce and show a context menu for this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bIsRealTime

private boolean bIsRealTime

strName

private java.lang.String strName

alGoal

private java.util.ArrayList alGoal

alDriveElements

private java.util.ArrayList alDriveElements

driveElement

private int driveElement
Constructor Detail

DriveCollection

public DriveCollection(java.lang.String name,
                       boolean realTime,
                       java.util.ArrayList goal,
                       java.util.ArrayList elements)
Initialize this drive collection

Parameters:
name - Name of the collection
realTime - Is this a real-time drive collection?
elements - Arraylist of drive elements (or lists thereof, to be more precise)
Method Detail

setName

public void setName(java.lang.String name)
Reset the name of this drive element

Parameters:
name - New name of the drive collection

getName

public java.lang.String getName()
Get the name of this drive collection

Returns:
Name of the drive collection

getDriveElements

public java.util.ArrayList getDriveElements()
Get our list of drive elements

Returns:
Arraylist of lists of drive elements

getGoal

public java.util.ArrayList getGoal()
Get the arraylist of actionelements that comprise our goal

Returns:
Arraylist of action elements comprising our goal

getRealTime

public boolean getRealTime()
Get whether or not this is a real-time drive collection

Returns:
True if real time drive collection, false otherwise

setDriveElements

public void setDriveElements(java.util.ArrayList drive)
Set our list of drive elements to be some new list

Parameters:
drive - Drive element lists .

setGoal

public void setGoal(java.util.ArrayList goal)
Set our goal list


setRealTime

public void setRealTime(boolean real)
Set whether or not this is a real-time drive collection

Parameters:
real - Real time if true, discrete time if not

getSelf

public DriveCollection getSelf()
Get reference back this object for inner class


onSelect

public void onSelect(JAbode mainGui,
                     JEditorWindow subGui,
                     JDiagram diagram)
When we click this Action Element in the GUI populate the properties panel with the various attributes and setup listeners to catch modifications that are made.

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

buildTree

public JTreeNode buildTree(JTreeNode root,
                           LearnableActionPattern lap,
                           boolean detailed,
                           boolean expanded)
Build the tree structure of the file

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