org.mockcentral.editor.nodes
Class MockCentralGroupNodeController

java.lang.Object
  extended by org.mockcentral.editor.nodes.MockCentralGroupNodeController

public class MockCentralGroupNodeController
extends java.lang.Object

The controller component within the MVC structure that includes the MockCentralGroupNodeModel and IMockCentralNodeView classes.

Author:
David Hutchinson

Constructor Summary
MockCentralGroupNodeController(MockCentralGroupNodeModel nodeModel)
          Creates a new instance, assigning the MockCentralGroupNodeModel reference.
 
Method Summary
 void addChildNode(int index, MockCentralNode childNode)
          Adds the supplied MockCentralNode to the list of children.
 void deleteChildNode(MockCentralNode childNode)
          Removes the indexed MockCentralNode child from the list.
 void sortChildren(java.util.Comparator<java.lang.Object> comparator)
          Sorts the MockCentralNode children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockCentralGroupNodeController

public MockCentralGroupNodeController(MockCentralGroupNodeModel nodeModel)
Creates a new instance, assigning the MockCentralGroupNodeModel reference.

Parameters:
nodeModel - the MockCentralGroupNodeModel modeling the node data.
Method Detail

addChildNode

public void addChildNode(int index,
                         MockCentralNode childNode)
Adds the supplied MockCentralNode to the list of children.

Parameters:
index - the index at which to add the child.
childNode - the MockCentralNode to add.

deleteChildNode

public void deleteChildNode(MockCentralNode childNode)
Removes the indexed MockCentralNode child from the list.

Parameters:
childNode - the child MockCentralNode to remove.

sortChildren

public void sortChildren(java.util.Comparator<java.lang.Object> comparator)
Sorts the MockCentralNode children.

Parameters:
comparator - a Comparator to use for sorting, or null if standard sorting is to be used.