|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--au.edu.swin.synergy.plugin.packager.BPackageModel
Data structure for the package model. Keeps track of the p-nodes, p-arcs, and p-terminators that make up the package. Also has a meta-model. Implements the TreeModel interface, so that the data can be viewed from inside a JTree.
Field Summary | |
static int |
kArcBranch
|
protected static String |
kDefaultName
|
protected static String |
kKeyName
|
static int |
kNodeBranch
|
static int |
kNumBranches
|
static int |
kTerminatorBranch
|
Constructor Summary | |
BPackageModel()
|
|
BPackageModel(BMetaModel metaModel,
String packageName)
When you create a package model, you must specify the meta model on which it is based. |
Method Summary | |
void |
addBGroupsToVector(int branch,
Vector groupList)
This will add all BGroups in a branch of the model to the vector provided. |
void |
addPackageArc(BTreeNode node)
Adds a package arc to the package model.. |
void |
addPackageNode(BTreeNode node)
Adds a package node to the package model.. |
void |
addPackageTerminator(BTreeNode node)
Adds a package terminator to the package model.. |
void |
addTreeModelListener(TreeModelListener l)
|
void |
fireInserted(TreeModelEvent e)
|
void |
fireRemoved(TreeModelEvent e)
|
protected void |
fireStructureChanged()
|
Object |
getChild(Object parent,
int index)
|
Object |
getChildAt(int index)
|
int |
getChildCount()
|
int |
getChildCount(Object parent)
|
int |
getIndexOf(Object node)
|
int |
getIndexOfChild(Object parent,
Object child)
|
BMetaModel |
getMetaModel()
|
String |
getName()
|
Object |
getPackageArcByName(String name)
Gets a package arc from the package model.. |
Object |
getPackageItemByName(String name)
Gets a package element from the package model.. |
Object |
getPackageNodeByName(String name)
Gets a package node from the package model.. |
Object |
getPackageTerminatorByName(String name)
Gets a package terminator from the package model.. |
Object |
getParent()
|
Object |
getRoot()
|
boolean |
isLeaf()
|
boolean |
isLeaf(Object node)
|
boolean |
load(BDataFile file)
|
static BPackageModel |
loadFromFile(String fileName)
loads a package from a file.. |
void |
removeAllChildren()
|
void |
removeTreeModelListener(TreeModelListener l)
|
boolean |
save(BDataFile file)
|
void |
saveToFile(String fileName)
saves this package to a file.. |
void |
setMetaModel(BMetaModel metaModel)
This will set the meta model this tree represents to the given meta model. |
void |
setName(String newPackageName)
Sets the name of the package to the value specified. |
void |
setParent(Object parent)
|
String |
toString()
|
void |
valueForPathChanged(TreePath path,
Object newValue)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected static final String kKeyName
protected static final String kDefaultName
public static final int kNumBranches
public static final int kNodeBranch
public static final int kArcBranch
public static final int kTerminatorBranch
Constructor Detail |
public BPackageModel(BMetaModel metaModel, String packageName)
metaModel
- The model this package is based onpublic BPackageModel()
Method Detail |
public void setMetaModel(BMetaModel metaModel)
metaModel
- The new meta modelpublic BMetaModel getMetaModel()
public void setName(String newPackageName)
newPackageName
- The name of the packagepublic void addBGroupsToVector(int branch, Vector groupList)
public Object getPackageItemByName(String name)
String
- name - the name of the package item..public Object getPackageNodeByName(String name)
String
- name - the name of the package node..public Object getPackageArcByName(String name)
String
- name - the name of the package arc..public Object getPackageTerminatorByName(String name)
String
- name - the name of the package terminator..public void addPackageNode(BTreeNode node)
public void addPackageArc(BTreeNode node)
public void addPackageTerminator(BTreeNode node)
public static BPackageModel loadFromFile(String fileName)
String
- fileName - the file to loadpublic void saveToFile(String fileName)
public void addTreeModelListener(TreeModelListener l)
public Object getChild(Object parent, int index)
public int getChildCount(Object parent)
public int getIndexOfChild(Object parent, Object child)
public Object getRoot()
public boolean isLeaf(Object node)
public void removeTreeModelListener(TreeModelListener l)
public void valueForPathChanged(TreePath path, Object newValue)
public void fireInserted(TreeModelEvent e)
public void fireRemoved(TreeModelEvent e)
protected void fireStructureChanged()
public String toString()
public String getName()
public boolean isLeaf()
public Object getChildAt(int index)
public int getChildCount()
public Object getParent()
public int getIndexOf(Object node)
public void setParent(Object parent)
public void removeAllChildren()
public boolean load(BDataFile file)
public boolean save(BDataFile file)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |