au.edu.swin.synergy.plugin.workspace
Class BProject
java.lang.Object
|
+--au.edu.swin.synergy.plugin.workspace.BProject
- public class BProject
- extends Object
- implements BTreeNode, BSaveable
Represents a project of models. Can be saved, and is used by the BWorkspace
to create BWorkspaceTreeBranch objects
- Author:
- Matthew Evans
kKeyName
protected static final String kKeyName
kDefaultName
protected static final String kDefaultName
kKeyModel
protected static final String kKeyModel
BProject
public BProject(BWorkspaceTreeModel parent,
String name,
String path)
- Construct a new project with name set to 'name', and the
models Vector created
- Parameters:
name
- the name of the model
BProject
public BProject()
- Default constructor for BSaveable
setParent
public void setParent(BWorkspaceTreeModel parent)
setName
public void setName(String name)
- Specified by:
- setName in interface BTreeNode
addModel
public BModel addModel(File modelFile,
String packageFileName)
- Add a model to the project, so that it is accessible via this project
from the cohesion workspace
- Parameters:
model
- the model to be included in this project
nodeWasInserted
public void nodeWasInserted(BTreeNode model,
int index,
BTreeNode elementAdded)
nodeWasRemoved
public void nodeWasRemoved(BTreeNode model,
int index,
BTreeNode elementRemoved)
removeModel
public BModel removeModel(BModel model)
- Remove a specified model form the project
- Parameters:
model
- the model to remove
getModels
public Vector getModels()
getPath
public String getPath()
getName
public String getName()
- Specified by:
- getName in interface BTreeNode
isLeaf
public boolean isLeaf()
- Specified by:
- isLeaf in interface BTreeNode
getChildAt
public Object getChildAt(int index)
- Specified by:
- getChildAt in interface BTreeNode
getChildCount
public int getChildCount()
- Specified by:
- getChildCount in interface BTreeNode
getParent
public Object getParent()
- Specified by:
- getParent in interface BTreeNode
getIndexOf
public int getIndexOf(Object node)
- Specified by:
- getIndexOf in interface BTreeNode
setParent
public void setParent(Object parent)
- Specified by:
- setParent in interface BTreeNode
removeAllChildren
public void removeAllChildren()
- Specified by:
- removeAllChildren in interface BTreeNode
load
public boolean load(BDataFile file)
- Specified by:
- load in interface BSaveable
save
public boolean save(BDataFile file)
- Specified by:
- save in interface BSaveable
saveModifiedModels
public void saveModifiedModels(BWorkspace workspacePlugin)
toString
public String toString()
- Overrides:
- toString in class Object