Ejemplo n.º 1
0
 internal void attach()
 {
     if (tree != null)
     {
         tree.Model.addTreeModelListener(this);
         tree.SelectionModel.addTreeSelectionListener(this);
         tree.addHierarchyBoundsListener(this);
         tree.addHierarchyListener(this);
         tree.addComponentListener(this);
     }
     else
     {
         list.SelectionModel.addListSelectionListener(this);
         list.Model.addListDataListener(this);
         list.addHierarchyBoundsListener(this);
         list.addHierarchyListener(this);
         list.addComponentListener(this);
     }
     if (null != pane.HorizontalScrollBar)
     {
         pane.HorizontalScrollBar.Model.addChangeListener(this);
     }
     if (null != pane.VerticalScrollBar)
     {
         pane.VerticalScrollBar.Model.addChangeListener(this);
     }
     KeyboardFocusManager.CurrentKeyboardFocusManager.addPropertyChangeListener(this);
 }