ponderToolkit.mgmtConsole.gui
Class PmcNavigator

java.lang.Object
  |
  +--ponderToolkit.mgmtConsole.gui.PmcNavigator
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.TreeSelectionListener

public class PmcNavigator
extends java.lang.Object
implements javax.swing.event.TreeSelectionListener

Function: Models the PMC Navigator. A tree view of the PMC's loaded in the Management Console


Constructor Summary
PmcNavigator(PmcView newPmcViewer)
          Constructor
 
Method Summary
 javax.swing.tree.DefaultMutableTreeNode addObject(javax.swing.tree.DefaultMutableTreeNode parent, java.lang.Object child, java.lang.String name, boolean shouldBeVisible)
          Add an object to the given parent node.
 javax.swing.tree.DefaultMutableTreeNode addPmcObject(PonderMC child, java.lang.String name)
          Add a PMC Object to the PMC Navigator (Tree).
 javax.swing.tree.DefaultMutableTreeNode addPolicyObject(BasicPolicyInfo child, java.lang.String name)
          Add a Policy Object to the Selected PMC Node
 void clear()
          Clear the tree list
 void clearObligs()
          Clear obligation policies for the selected PMC
 void clearRefrains()
          Clear refrain policies for the selected PMC
 java.util.Vector getObligsForPmc()
           
 javax.swing.JScrollPane getPane()
          Return the ScrollPane
 java.util.Vector getRefrainsForPmc()
           
 PonderMC getSelectedPMC()
          Return the Selected PMC
 void valueChanged(javax.swing.event.TreeSelectionEvent e)
          Implementation of the TreeSelectionListener Interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PmcNavigator

public PmcNavigator(PmcView newPmcViewer)
Constructor
Parameters:
newPmcViewer - The PmcView JPanel which represents the PMC view of the application
Method Detail

clear

public void clear()
Clear the tree list

clearObligs

public void clearObligs()
Clear obligation policies for the selected PMC

clearRefrains

public void clearRefrains()
Clear refrain policies for the selected PMC

addPmcObject

public javax.swing.tree.DefaultMutableTreeNode addPmcObject(PonderMC child,
                                                            java.lang.String name)
Add a PMC Object to the PMC Navigator (Tree). The PMC is added to the root by default
Parameters:
child - The node to add (a PMC)
name - The name of the node to add

addPolicyObject

public javax.swing.tree.DefaultMutableTreeNode addPolicyObject(BasicPolicyInfo child,
                                                               java.lang.String name)
Add a Policy Object to the Selected PMC Node
Parameters:
child - The Policy object to be added
name - The name of the policy object to be added

addObject

public javax.swing.tree.DefaultMutableTreeNode addObject(javax.swing.tree.DefaultMutableTreeNode parent,
                                                         java.lang.Object child,
                                                         java.lang.String name,
                                                         boolean shouldBeVisible)
Add an object to the given parent node.
Parameters:
parent - The node to which to add
child - The node to be added
name - The name of the node to add
shouldBeVisible - If true the new node is made visible

getPane

public javax.swing.JScrollPane getPane()
Return the ScrollPane

getSelectedPMC

public PonderMC getSelectedPMC()
Return the Selected PMC

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent e)
Implementation of the TreeSelectionListener Interface
Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener

getObligsForPmc

public java.util.Vector getObligsForPmc()
Returns:
A vector of (oblig-name, status) pairs for the obligations of the selected PMC name

getRefrainsForPmc

public java.util.Vector getRefrainsForPmc()
Returns:
A vector of (refrain-name, status) pairs for the refrains of the selected PMC name