cz.cuni.amis.pogamut.sposh.elements
Class Adopt

Package class diagram package Adopt
java.lang.Object
  extended by cz.cuni.amis.pogamut.sposh.elements.PoshElement<THIS,PARENT>
      extended by cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement<THIS,PARENT>
          extended by cz.cuni.amis.pogamut.sposh.elements.NamedLapElement<Adopt,PoshPlan>
              extended by cz.cuni.amis.pogamut.sposh.elements.Adopt

public class Adopt
extends NamedLapElement<Adopt,PoshPlan>


Field Summary
static String adName
          Property string of competence name
static DataFlavor dataFlavor
          Data flavor of adopt class, used for drag-and-drop
 
Fields inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement
IDENT_PATTERN
 
Constructor Summary
Adopt(String name, FormalParameters parameters, List<Sense> exitCondition, PrimitiveCall adoptedElement)
           
 
Method Summary
 void addCondition(Sense sense)
           
 TriggeredAction getAdoptedElement()
           
 List<? extends PoshElement> getChildDataNodes()
          Get list of children of this node.
 DataFlavor getDataFlavor()
          Get data flavour of posh plan element,used during DnD from palette to PoshScene.
 Trigger<Adopt> getExitCondition()
           
 String getName()
          Get name of the element.
 FormalParameters getParameters()
           
 boolean moveChild(int newIndex, PoshElement child)
          Move child to the @newIndex.
 void setAdoptedElement(TriggeredAction adoptedElement)
           
 void setName(String name)
           
 void setParameters(FormalParameters parameters)
           
 
Methods inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement
getUnusedName, isUsedName, moveChildInList
 
Methods inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshElement
addElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getNumberOfChildInstances, getParent, getRootNode, isChildOfParent, removeElementListener, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataFlavor

public static final DataFlavor dataFlavor
Data flavor of adopt class, used for drag-and-drop


adName

public static final String adName
Property string of competence name

See Also:
Constant Field Values
Constructor Detail

Adopt

public Adopt(String name,
             FormalParameters parameters,
             List<Sense> exitCondition,
             PrimitiveCall adoptedElement)
Method Detail

getParameters

public FormalParameters getParameters()

setParameters

public void setParameters(FormalParameters parameters)

getName

public String getName()
Description copied from class: NamedLapElement
Get name of the element. The actual name, not display name (e.g. action can have FQN of class, but display name would be derived fromk annotations of the class) or representation (e.g. sense name "health" is different from actual condition of sense "health > 90").

Specified by:
getName in class NamedLapElement<Adopt,PoshPlan>
Returns:
Name of the element

setName

public void setName(String name)
             throws InvalidNameException,
                    DuplicateNameException,
                    CycleException
Throws:
InvalidNameException
DuplicateNameException
CycleException

addCondition

public void addCondition(Sense sense)

getExitCondition

public Trigger<Adopt> getExitCondition()

getAdoptedElement

public TriggeredAction getAdoptedElement()

setAdoptedElement

public void setAdoptedElement(TriggeredAction adoptedElement)

getDataFlavor

public DataFlavor getDataFlavor()
Description copied from class: PoshElement
Get data flavour of posh plan element,used during DnD from palette to PoshScene.

Specified by:
getDataFlavor in class PoshElement<Adopt,PoshPlan>
Returns:
dataFlavour of posh plan element, never null.

getChildDataNodes

public List<? extends PoshElement> getChildDataNodes()
Description copied from class: PoshElement
Get list of children of this node. Most likely auto generated every time this method is called.

Specified by:
getChildDataNodes in class PoshElement<Adopt,PoshPlan>
Returns:
List of all children of this node.

moveChild

public boolean moveChild(int newIndex,
                         PoshElement child)
Description copied from class: PoshElement
Move child to the @newIndex. After child was moved (if it was moved), notify listeners.

Specified by:
moveChild in class PoshElement<Adopt,PoshPlan>
Returns:
if node succesfully moved


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.