예제 #1
0
 /**
  * Method declaration
  *
  * @param e
  * @see
  */
 public void actionPerformed(ActionEvent e) {
   ScaleTreeDlg scaleTreeDlg =
       new ScaleTreeDlg(
           GUIManager.getManager().getFrame(), PaintConfig.inst().tree_distance_scaling);
   Double d = scaleTreeDlg.display();
   if (null == d) {
     return;
   }
   TreePanel tree = PaintManager.inst().getTree();
   if (tree != null) {
     tree.scaleTree(d);
   } else {
     PaintConfig.inst().tree_distance_scaling = d;
   }
 }
예제 #2
0
 /**
  * Method declaration
  *
  * @param e
  * @see
  */
 public void itemStateChanged(ItemEvent e) {
   if (e.getStateChange() == ItemEvent.SELECTED) {
     TreePanel tree = PaintManager.inst().getTree();
     if (tree != null) {
       switch (action) {
         case TREE_SPECIES:
           tree.speciesOrder();
           break;
         case TREE_TOP:
           tree.descendentCountLadder(true);
           break;
         case TREE_BOTTOM:
           tree.descendentCountLadder(false);
           break;
       }
     }
   }
 }
예제 #3
0
 /**
  * Method declaration
  *
  * @param e
  * @see
  */
 public void actionPerformed(ActionEvent e) {
   TreePanel tree = PaintManager.inst().getTree();
   if (tree != null) {
     switch (action) {
       case TREE_USE_DISTANCES:
         PaintConfig.inst().use_distances = ((JCheckBoxMenuItem) e.getSource()).isSelected();
         tree.rescaleTree();
         break;
       case TREE_EXPAND_ALL_NODES:
         PaintConfig.inst().collapse_no_exp = false;
         collapseNonExpNodesItem.setSelected(false);
         tree.expandAllNodes();
         break;
       case TREE_COLLAPSE_NONEXP_NODES:
         PaintConfig.inst().collapse_no_exp = ((JCheckBoxMenuItem) e.getSource()).isSelected();
         if (PaintConfig.inst().collapse_no_exp) {
           tree.collapseNonExperimental();
         } else {
           tree.expandAllNodes();
         }
         break;
     }
   }
 }