|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lib.ActionPattern
public class ActionPattern
An Action Pattern is a name, interval and a sequence of action elements
Field Summary | |
---|---|
private java.util.ArrayList |
alElements
|
private java.lang.String |
documentation
|
private java.lang.String |
strName
|
private TimeUnit |
tTimeOut
|
Constructor Summary | |
---|---|
ActionPattern(java.lang.String name,
TimeUnit time)
Initialize our action pattern with a blank list of elements |
|
ActionPattern(java.lang.String name,
TimeUnit time,
java.util.ArrayList children)
Create an Action Pattern with a pre-loaded list of elements |
Method Summary | |
---|---|
JTreeNode |
buildTree(JTreeNode root,
LearnableActionPattern lap,
boolean detailed,
boolean expanded)
Convert this element into a tree branch |
java.lang.String |
getDocumentation()
Get the documentation string for this element |
java.util.ArrayList |
getElements()
Get the list of elements of this action pattern |
java.lang.String |
getName()
Get the name of this action pattern |
ActionPattern |
getSelf()
|
TimeUnit |
getTimeUnit()
Get the timeout for this action pattern |
void |
onSelect(JAbode mainGui,
JEditorWindow subGui,
JDiagram diagram)
When we click this Action Pattern in the GUI populate the properties panel with the various attributes and setup listeners to catch modifications that are made. |
void |
setDocumentation(java.lang.String docString)
Set the documentation string for this element |
void |
setElements(java.util.ArrayList elements)
Set the list of elements used in this action pattern |
void |
setName(java.lang.String name)
Set the name of this action pattern |
void |
setTimeUnit(TimeUnit unit)
Set the timeout/interval for this action pattern |
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.util.ArrayList alElements
private TimeUnit tTimeOut
private java.lang.String strName
private java.lang.String documentation
Constructor Detail |
---|
public ActionPattern(java.lang.String name, TimeUnit time)
name
- Name of this action Patterntime
- Time unit for our interval/timeout (Ymir-style)public ActionPattern(java.lang.String name, TimeUnit time, java.util.ArrayList children)
name
- Name of this action patterntime
- Time unit for our interval/timeout (Ymir-style)Method Detail |
---|
public java.util.ArrayList getElements()
public java.lang.String getName()
getName
in interface INamedElement
public TimeUnit getTimeUnit()
public java.lang.String getDocumentation()
public void setDocumentation(java.lang.String docString)
docString
- New documentation stringpublic void setElements(java.util.ArrayList elements)
elements
- New list of elements for this action patternpublic void setName(java.lang.String name)
setName
in interface INamedElement
name
- The new name of this action patternpublic void setTimeUnit(TimeUnit unit)
unit
- The new timeout for this action pattern.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 ActionPattern 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 |