public final class DriveCollection extends NamedLapElement
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 |
addChildDataNode(PoshElement child)
This will add new child to the tree.
|
void |
addDrive(DriveElement drive)
Add passed drive as the last drive of this DC and emit new it.
|
List<PoshElement> |
getChildDataNodes()
Get all child nodes of the DC.
|
DataFlavor |
getDataFlavor()
Get data flavour of posh plan element,used during DnD from palette to
PoshScene.
|
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).
|
Goal |
getGoal()
Get goal of the DC
|
String |
getName()
Get name of the DC
|
boolean |
moveChild(PoshElement child,
int relativePosition)
Move child node in list of children up or down.
|
void |
neutralizeChild(PoshElement child)
Neutralize childNode of the node.
|
void |
setGoalNode(Goal goal)
Set goal of the drive collection.
|
void |
setName(String newName)
Change name of the DC and notify property listeners.
|
String |
toString()
Serialize DC into a parser readable form.
|
getUnusedName, isUsedName, moveNodeInList
addElementListener, emitChildMove, emitChildNode, emitNodeDeleted, firePropertyChange, getElementListeners, getNumberOfChildInstances, getParent, getRelativePosition, getRootNode, neutralize, remove, removeElementListener, setParent
public static final String dcName
public static final DataFlavor dataFlavor
public void addDrive(DriveElement drive) throws DuplicateNameException
drive
- drive to addDuplicateNameException
public void setGoalNode(Goal goal)
goal
- new goal of the DCpublic Goal getGoal()
public List<DriveElement> getDrives()
public String toString()
public List<PoshElement> getChildDataNodes()
getChildDataNodes
in class PoshElement
public String getName()
getName
in class NamedLapElement
public void setName(String newName) throws InvalidNameException
newName
- New name of the DC.InvalidNameException
- throw if name is not valid (spaces,
braces...)public boolean moveChild(PoshElement child, int relativePosition)
PoshElement
moveChild
in class PoshElement
public DataFlavor getDataFlavor()
PoshElement
getDataFlavor
in class PoshElement
public void addChildDataNode(PoshElement child) throws DuplicateNameException
PoshElement
newChild
can be children (real type or some other things)
and add it to its children. If child is not accepted, don't add it
REMEBER: that in widget view I should see nodes in groups(not Comp, Freq,
Comp), so adjust getChildDataNodes accordingly (Comp, Comp, Freq)addChildDataNode
in class PoshElement
child
- Child that may be addedDuplicateNameException
public void neutralizeChild(PoshElement child)
PoshElement
neutralizeChild
in class PoshElement
child
- node that will be neutralizedCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.