Coverage Report - net.wotonomy.test.BindingController
 
Classes in this File Line Coverage Branch Coverage Complexity
BindingController
0% 
N/A 
1
 
 1  
 package net.wotonomy.test;
 2  
 
 3  
 //import net.wotonomy.foundation.*;
 4  
 import javax.swing.JDialog;
 5  
 
 6  
 import net.wotonomy.ui.EOAssociation;
 7  
 import net.wotonomy.ui.EODisplayGroup;
 8  
 import net.wotonomy.ui.swing.TreeAssociation;
 9  
 import net.wotonomy.ui.swing.util.WindowUtilities;
 10  
 
 11  
 /**
 12  
 * A simple editor panel with a few textfields.
 13  
 */
 14  
 public class BindingController
 15  
 {    
 16  0
     public BindingController( EODisplayGroup titlesGroup, EODisplayGroup childGroup )
 17  0
     {
 18  0
                 BindingPanel bindingPanel = new BindingPanel();
 19  
         
 20  
                 EOAssociation ta;
 21  0
                 ta = new TreeAssociation( bindingPanel.treeChooser, "People" );
 22  0
                 ta.bindAspect( EOAssociation.TitlesAspect, titlesGroup, "lastName" );
 23  0
                 ta.bindAspect( EOAssociation.ChildrenAspect, childGroup, "children" );
 24  0
                 ta.bindAspect( EOAssociation.IsLeafAspect, titlesGroup, "childCount" );
 25  0
                 ta.establishConnection();
 26  
                 
 27  0
                 JDialog d = new JDialog();
 28  0
                 d.getContentPane().add( bindingPanel );
 29  0
                 d.setTitle( "Chooser Panel" );
 30  0
                 d.pack();
 31  0
         WindowUtilities.cascade( d );
 32  0
                 d.show();
 33  0
         }
 34  
     
 35  
 }