com.izforge.izpack.panels
Class CheckTreeController

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by com.izforge.izpack.panels.CheckTreeController
All Implemented Interfaces:
java.awt.event.MouseListener, java.util.EventListener

 class CheckTreeController
extends java.awt.event.MouseAdapter

Controller class which handles the mouse clicks on checkbox nodes. Also contains utility methods to update the sizes and the states of the nodes.

Version:
$Revision: 1.1 $
Author:
Vladimir Ralev

Field Summary
(package private)  int checkWidth
           
(package private)  javax.swing.JTree tree
           
(package private)  TreePacksPanel treePacksPanel
           
 
Constructor Summary
CheckTreeController(TreePacksPanel p)
           
 
Method Summary
private  boolean hasExcludes(CheckBoxNode node)
           
static long initTotalSize(CheckBoxNode node, boolean markChanged)
           
 void mouseReleased(java.awt.event.MouseEvent me)
           
 void selectAllChildNodes(CheckBoxNode cbn)
           
 void selectAllDependencies(CheckBoxNode cbn)
           
private  void selectNode(CheckBoxNode current)
           
static void setPartialParent(CheckBoxNode node)
           
 void updateAllParents(CheckBoxNode root)
          Updates partial/deselected/selected state of all parent nodes.
private  void updateParents(CheckBoxNode node)
          Updates the parents of this particular node
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mousePressed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tree

javax.swing.JTree tree

treePacksPanel

TreePacksPanel treePacksPanel

checkWidth

int checkWidth
Constructor Detail

CheckTreeController

public CheckTreeController(TreePacksPanel p)
Method Detail

selectNode

private void selectNode(CheckBoxNode current)

hasExcludes

private boolean hasExcludes(CheckBoxNode node)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class java.awt.event.MouseAdapter

selectAllChildNodes

public void selectAllChildNodes(CheckBoxNode cbn)

selectAllDependencies

public void selectAllDependencies(CheckBoxNode cbn)

updateAllParents

public void updateAllParents(CheckBoxNode root)
Updates partial/deselected/selected state of all parent nodes. This is needed and is a patch to allow unrelated nodes (in terms of the tree) to fire updates for each other.

Parameters:
root -

updateParents

private void updateParents(CheckBoxNode node)
Updates the parents of this particular node

Parameters:
node -

setPartialParent

public static void setPartialParent(CheckBoxNode node)

initTotalSize

public static long initTotalSize(CheckBoxNode node,
                                 boolean markChanged)