|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lib.CompetenceElement
public class CompetenceElement
A Competence Element is is a named trigger and an action, along with an optional number of retries.
Field Summary | |
---|---|
private java.util.ArrayList |
alTrigger
|
private java.lang.String |
documentation
|
private int |
iRetries
|
private int |
senseCount
|
private java.lang.String |
strAction
|
private java.lang.String |
strName
|
Constructor Summary | |
---|---|
CompetenceElement(java.lang.String name,
java.util.ArrayList triggerList,
java.lang.String action)
Initialize this Competence Element with a name, a list of triggers, an action and the optional number of retries IS NOT being specified. |
|
CompetenceElement(java.lang.String name,
java.util.ArrayList triggerList,
java.lang.String action,
int ret)
Initialize this Competence Element with a name, a list of triggers, an action and the optional number of retries being specified. |
Method Summary | |
---|---|
JTreeNode |
buildTree(JTreeNode root,
LearnableActionPattern lap,
boolean detailed,
boolean expanded)
Convert this element into a tree branch |
java.lang.String |
getAction()
Get the action |
java.lang.String |
getDocumentation()
Get the documentation string for this element |
java.lang.String |
getName()
Get the name of this competence element |
int |
getRetries()
Get the number of retries for this element |
CompetenceElement |
getSelf()
|
java.util.ArrayList |
getTrigger()
Get the arraylist of action elements that comprises our trigger. |
void |
onSelect(JAbode mainGui,
JEditorWindow subGui,
JDiagram diagram)
When we click this Competence in the GUI populate the properties panel with the various attributes and setup listeners to catch modifications that are made. |
void |
setAction(java.lang.String action)
Set the name of the action to invoke |
void |
setDocumentation(java.lang.String docString)
Set the documentation string for this element |
void |
setName(java.lang.String name)
Set the name of this competence element |
void |
setRetries(int val)
Set the number of retries for this element. |
void |
setTrigger(java.util.ArrayList list)
Set our list of triggers |
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 |
---|
private java.lang.String strName
private java.util.ArrayList alTrigger
private java.lang.String strAction
private int iRetries
private java.lang.String documentation
private int senseCount
Constructor Detail |
---|
public CompetenceElement(java.lang.String name, java.util.ArrayList triggerList, java.lang.String action)
name
- Name of this competencetriggerList
- List of actionelements comprising the triggeraction
- Action to invokepublic CompetenceElement(java.lang.String name, java.util.ArrayList triggerList, java.lang.String action, int ret)
name
- Name of this competencetriggerList
- List of actionelements comprising the triggeraction
- Action to invokeMethod Detail |
---|
public java.lang.String getAction()
public java.lang.String getName()
getName
in interface INamedElement
public int getRetries()
public java.util.ArrayList getTrigger()
public java.lang.String getDocumentation()
public void setDocumentation(java.lang.String docString)
docString
- New documentation stringpublic void setAction(java.lang.String action)
action
- Name of new action to invokepublic void setName(java.lang.String name)
setName
in interface INamedElement
name
- New name of this competence elementpublic void setRetries(int val)
val
- New number of retries.public void setTrigger(java.util.ArrayList list)
public void onSelect(JAbode mainGui, JEditorWindow subGui, JDiagram diagram)
onSelect
in interface IEditableElement
mainGui
- Reference to the MDIsubGui
- Reference to the editor windowdiagram
- Diagram refernece on our editing windowpublic CompetenceElement getSelf()
public void showContextMenu(JTreeNode showOn, LearnableActionPattern lap, JEditorWindow window, JDiagram diagram)
showContextMenu
in interface IEditableElement
showOn
- The tree node invoking uslap
- The file we're a part ofwindow
- The window we're being dispalyed indiagram
- The diagram in the window we'return being shown onpublic JTreeNode buildTree(JTreeNode root, LearnableActionPattern lap, boolean detailed, boolean expanded)
buildTree
in interface IEditableElement
root
- The root of this sub-treelap
- The learnable action pattern file we're part of.detailed
- Is the diagram detailed (i.e. decorative nodes)expanded
- Is this diagram expanded (i.e. show sub-tree chained elements)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |