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<Adopt,PoshPlan>
          extended by cz.cuni.amis.pogamut.sposh.elements.Adopt
All Implemented Interfaces:
INamedElement, IParametrizedElement

public class Adopt
extends PoshDummyElement<Adopt,PoshPlan>
implements IParametrizedElement


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()
           
 DataFlavor getDataFlavor()
          Get data flavour of posh plan element,used during DnD from palette to PoshScene.
 Trigger<Adopt> getExitCondition()
           
 List<? extends PoshElement> getChildDataNodes()
          Get list of children of this node.
 String getName()
          Get name of the element.
 FormalParameters getParameters()
           
 LapType getType()
          Get type of the element.
 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
getElementId, getUnusedName, isUsedName, moveChildInList
 
Methods inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshElement
addElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getChildId, getChildren, getId, 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()
Specified by:
getParameters in interface IParametrizedElement

setParameters

public void setParameters(FormalParameters parameters)
Specified by:
setParameters in interface IParametrizedElement

getName

public String getName()
Description copied from interface: INamedElement
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 interface INamedElement
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.

getType

public LapType getType()
Description copied from class: PoshElement
Get type of the element.

Specified by:
getType in class PoshElement<Adopt,PoshPlan>
Returns:
Type of element.

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 © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.