|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lib.ActionElement
public class ActionElement
An action element is either an action primitive or composite name, or alternatively is a boolean sense primitive, possibly with a value and predicate.
Field Summary | |
---|---|
private boolean |
bIsSense
|
private java.lang.String |
strComparator
|
private java.lang.String |
strElementName
|
private java.lang.String |
strValue
|
Constructor Summary | |
---|---|
ActionElement(boolean isSense,
java.lang.String elementName)
Create an action element with a comp/prim name only |
|
ActionElement(java.lang.String strSense,
java.lang.String strVal)
Create an action element with a sense name and a value. |
|
ActionElement(java.lang.String strSense,
java.lang.String strVal,
java.lang.String pred)
Create an action element with a sense name, value and predicate |
Method Summary | |
---|---|
static JTreeNode |
actionListToTree(java.lang.String text,
java.lang.String subText,
java.util.ArrayList triggerList,
JTreeNode start,
IEditableElement bindTo)
Convert an arraylist of actionelements into a tree representation. |
JTreeNode |
buildTree(JTreeNode root,
LearnableActionPattern lap,
boolean detailed,
boolean expanded)
Convert this element into a tree branch |
java.lang.String |
getElementName()
Get the name of the element or sense we'return referring to |
boolean |
getIsSense()
Return whether or not we represent a sense |
java.lang.String |
getPredicate()
Get the predicate we're using |
ActionElement |
getSelf()
For accesing local references via inner class |
java.lang.String |
getValue()
Get the value of the argument of this element |
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 |
setElementName(java.lang.String val)
Set the name of the element, action primitive or composite we refer to |
void |
setIsSense(boolean isSense)
Set whether or not we're a sense |
void |
setPredicate(java.lang.String pred)
Set the predicate this action element uses |
void |
setValue(java.lang.String val)
Set the value to compare against |
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 boolean bIsSense
private java.lang.String strElementName
private java.lang.String strValue
private java.lang.String strComparator
Constructor Detail |
---|
public ActionElement(boolean isSense, java.lang.String elementName)
isSense
- Is this a sense primitive or not?elementName
- The name of this comppublic ActionElement(java.lang.String strSense, java.lang.String strVal)
strSense
- Name of the sense we're constructingstrVal
- Value of the elementpublic ActionElement(java.lang.String strSense, java.lang.String strVal, java.lang.String pred)
strSense
- Name of the sense we're constructingstrVal
- Value comparing againstpred
- Predicate used for comparison (i.e. < or >)Method Detail |
---|
public java.lang.String getElementName()
public boolean getIsSense()
public java.lang.String getPredicate()
public java.lang.String getValue()
public void setElementName(java.lang.String val)
val
- Name to set our element topublic void setIsSense(boolean isSense)
public void setPredicate(java.lang.String pred)
public void setValue(java.lang.String val)
public ActionElement getSelf()
public void onSelect(JAbode mainGui, JEditorWindow subGui, JDiagram diagram)
onSelect
in interface IEditableElement
mainGui
- The reference to the outer GUIsubGui
- The internal frame we're referring todiagram
- The diagram we're being select on.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 static JTreeNode actionListToTree(java.lang.String text, java.lang.String subText, java.util.ArrayList triggerList, JTreeNode start, IEditableElement bindTo)
text
- Text to show on this list's header nodesubText
- Text to show as the subtitle of lists header nodetriggerList
- List of elements comprising this trigger/apstart
- The point of the tree we'return attatching ourselves to.bindTo
- The editable widget we're linked to
public 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 |