public final class DriveCollection extends PoshDummyElement<DriveCollection,PoshPlan> implements INamedElement, IConditionElement<DriveCollection>
| Modifier and Type | Field and Description |
|---|---|
static DataFlavor |
dataFlavor
Data flavor of DC, used for drag and drop
|
static String |
dcName
Property name for change of name.
|
IDENT_PATTERN| Modifier and Type | Method and Description |
|---|---|
void |
addDrive(DriveElement drive)
Add passed drive as the last drive of this DC and emit new it.
|
void |
addDrive(int index,
DriveElement drive) |
Trigger<DriveCollection> |
getCondition()
Get goal of the DC.
|
DataFlavor |
getDataFlavor()
Get data flavour of posh plan element,used during DnD from palette to
PoshScene.
|
DriveElement |
getDrive(int id)
Get drive with @id, equivalent of
getDrives(). |
List<DriveElement> |
getDrives()
Get list of all drives of this DC in correct order (drive with higest
priority is first, drive with lowest priority is last).
|
Trigger<DriveCollection> |
getGoal()
Get goal of the DC.
|
List<PoshElement> |
getChildDataNodes()
Get all child nodes of the DC.
|
String |
getName()
Get name of the DC
|
LapType |
getType()
Get type of the element.
|
boolean |
moveChild(int newIndex,
PoshElement child)
Move child to the @newIndex.
|
void |
removeDrive(DriveElement drive)
Remove drive from the drive collection.
|
void |
rename(String newName)
Because DC is not referenced anywhere, it has same effect as
setName(java.lang.String). |
void |
setName(String newName)
Change name of the DC and notify property listeners.
|
String |
toString()
Serialize DC into a parser readable form.
|
getElementId, getUnusedName, isUsedName, moveChildInListaddElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getChildId, getChildren, getId, getParent, getRootNode, isChildOfParent, removeElementListener, setParentpublic static final String dcName
public static final DataFlavor dataFlavor
public void addDrive(DriveElement drive) throws DuplicateNameException
drive - drive to addDuplicateNameExceptionpublic void addDrive(int index,
DriveElement drive)
throws DuplicateNameException
DuplicateNameExceptionpublic Trigger<DriveCollection> getGoal()
public Trigger<DriveCollection> getCondition()
getCondition in interface IConditionElement<DriveCollection>getGoal()public List<DriveElement> getDrives()
public DriveElement getDrive(int id)
getDrives().List.get(int).public String toString()
(DC funbot (goal ((cz.cuni.HaveFun)(cz.cuni.Sing)))
(drives (
(fun (trigger ((cz.cuni.IsAtParty)(cz.cuni.FriendsInSight)) ) cz.cuni.Enjoy )
(default cz.cuni.DoNothing)
)
)
)
public List<PoshElement> getChildDataNodes()
getChildDataNodes in class PoshElement<DriveCollection,PoshPlan>public String getName()
getName in interface INamedElementpublic void setName(String newName) throws InvalidNameException
newName - New name of the DC.InvalidNameException - throw if name is not valid (spaces,
braces...)public void rename(String newName) throws InvalidNameException, CycleException, DuplicateNameException
setName(java.lang.String).rename in interface INamedElementnewName - New name of the element.InvalidNameException - Passed name is not valid Yaposh name.CycleException - Renaming causes cycle.DuplicateNameException - Such name is already used in the plan.setName(java.lang.String)public boolean moveChild(int newIndex,
PoshElement child)
PoshElementmoveChild in class PoshElement<DriveCollection,PoshPlan>public DataFlavor getDataFlavor()
PoshElementgetDataFlavor in class PoshElement<DriveCollection,PoshPlan>public LapType getType()
PoshElementgetType in class PoshElement<DriveCollection,PoshPlan>public void removeDrive(DriveElement drive)
drive - Drive to be removed.Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.