|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockcentral.editor.nodes.MockCentralNodeModel
org.mockcentral.editor.nodes.MockCentralGroupNodeModel
public abstract class MockCentralGroupNodeModel
The model component within the MVC structure that includes the
MockCentralGroupNodeController and
IMockCentralNodeView classes.
| Field Summary | |
|---|---|
protected java.util.List<IMockCentralGroupNodeModelObserver> |
observers
The list of IMockCentralGroupNodeModelObserver instances
listening for changes to this model. |
| Fields inherited from class org.mockcentral.editor.nodes.MockCentralNodeModel |
|---|
element, node |
| Constructor Summary | |
|---|---|
MockCentralGroupNodeModel(MockCentralNode node)
Creates a new instance, assigning the references to the MockCentralNode and its JDOM Element. |
|
| Method Summary | |
|---|---|
void |
addChildNode(int index,
MockCentralNode child)
Adds the supplied MockCentralNode to the list of children. |
void |
addObserver(IMockCentralGroupNodeModelObserver observer)
Adds an entry to the list of IMockCentralGroupNodeModelObserver instances listening for
changes to this model |
void |
editSelectedChild(java.lang.Object selected)
Activates the selected child MockCentralNode for editing. |
void |
fireChildrenChanged()
Notifies the registered IMockCentralGroupNodeModelObserver
instances that the list of children has changed. |
abstract java.lang.String |
getChildNodeTypeDescription(boolean singular)
Returns a String description of the MockCentralNode's child
type, ie "Fixture", "Mock Object" etc. |
java.util.List<MockCentralNode> |
getChildren()
Returns the List of child MockCentralNode
instances. |
org.jdom.Element |
getElement()
Returns the JDOM Element containing the modeled data. |
void |
loadElementData(boolean refreshUI)
Loads the data from the JDOM Element provided by the
MockCentralNode into the model. |
void |
removeChildNode(MockCentralNode childNode)
Deletes the indexed child MockCentralNode. |
void |
sortChildren(java.util.Comparator<java.lang.Object> comparator)
Sorts the MockCentralNode children. |
| Methods inherited from class org.mockcentral.editor.nodes.MockCentralNodeModel |
|---|
addObserver, getEnclosingFixtureNode, getNode, getNotRemovableMessage, getObservers, registerChanges, removeObserver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<IMockCentralGroupNodeModelObserver> observers
IMockCentralGroupNodeModelObserver instances
listening for changes to this model.
| Constructor Detail |
|---|
public MockCentralGroupNodeModel(MockCentralNode node)
MockCentralNode and its JDOM Element.
node - the MockCentralNode associated with this model.| Method Detail |
|---|
public void loadElementData(boolean refreshUI)
MockCentralNodeModelElement provided by the
MockCentralNode into the model.
loadElementData in class MockCentralNodeModelrefreshUI - whether to send notification to ui components to update
the display.public org.jdom.Element getElement()
MockCentralNodeModelElement containing the modeled data.
getElement in class MockCentralNodeModelElement containing the modeled data.public java.util.List<MockCentralNode> getChildren()
List of child MockCentralNode
instances.
List of child MockCentralNode
instances.public abstract java.lang.String getChildNodeTypeDescription(boolean singular)
MockCentralNode's child
type, ie "Fixture", "Mock Object" etc.
singular - value for whether the String should be in singular form.
MockCentralNode type.
public void addChildNode(int index,
MockCentralNode child)
MockCentralNode to the list of children.
index - the index at which to add the child.child - the MockCentralNode to add.public void editSelectedChild(java.lang.Object selected)
MockCentralNode for editing.
selected - the MockCentralNode to activate.public void removeChildNode(MockCentralNode childNode)
MockCentralNode.
childNode - the child MockCentralNode to delete.public void sortChildren(java.util.Comparator<java.lang.Object> comparator)
MockCentralNode children.
comparator - a Comparator to use for sorting, or null
if standard sorting is to be used.public void addObserver(IMockCentralGroupNodeModelObserver observer)
IMockCentralGroupNodeModelObserver instances listening for
changes to this model
observer - the observer to add.public void fireChildrenChanged()
IMockCentralGroupNodeModelObserver
instances that the list of children has changed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||