equal
deleted
inserted
replaced
138 protected AbstractLayoutCache.NodeDimensions nodeDimensions; |
138 protected AbstractLayoutCache.NodeDimensions nodeDimensions; |
139 |
139 |
140 /** Used to determine what to display. */ |
140 /** Used to determine what to display. */ |
141 protected TreeModel treeModel; |
141 protected TreeModel treeModel; |
142 |
142 |
143 /** Model maintaing the selection. */ |
143 /** Model maintaining the selection. */ |
144 protected TreeSelectionModel treeSelectionModel; |
144 protected TreeSelectionModel treeSelectionModel; |
145 |
145 |
146 /** How much the depth should be offset to properly calculate |
146 /** How much the depth should be offset to properly calculate |
147 * x locations. This is based on whether or not the root is visible, |
147 * x locations. This is based on whether or not the root is visible, |
148 * and if the root handles are visible. */ |
148 * and if the root handles are visible. */ |
1273 g.fillRect(rect.x, rect.y, rect.width, rect.height); |
1273 g.fillRect(rect.x, rect.y, rect.width, rect.height); |
1274 } |
1274 } |
1275 } |
1275 } |
1276 |
1276 |
1277 /** |
1277 /** |
1278 * Returns a ubounding box for the drop line. |
1278 * Returns a unbounding box for the drop line. |
1279 * |
1279 * |
1280 * @param loc a {@code DropLocation} |
1280 * @param loc a {@code DropLocation} |
1281 * @return bounding box for the drop line |
1281 * @return bounding box for the drop line |
1282 * @since 1.7 |
1282 * @since 1.7 |
1283 */ |
1283 */ |
2523 |
2523 |
2524 /** |
2524 /** |
2525 * Updates the TreeState in response to nodes expanding/collapsing. |
2525 * Updates the TreeState in response to nodes expanding/collapsing. |
2526 */ |
2526 */ |
2527 public class TreeExpansionHandler implements TreeExpansionListener { |
2527 public class TreeExpansionHandler implements TreeExpansionListener { |
2528 // NOTE: This class exists only for backward compatability. All |
2528 // NOTE: This class exists only for backward compatibility. All |
2529 // its functionality has been moved into Handler. If you need to add |
2529 // its functionality has been moved into Handler. If you need to add |
2530 // new functionality add it to the Handler, but make sure this |
2530 // new functionality add it to the Handler, but make sure this |
2531 // class calls into the Handler. |
2531 // class calls into the Handler. |
2532 |
2532 |
2533 /** |
2533 /** |
2625 /** |
2625 /** |
2626 * Forwards all TreeModel events to the TreeState. |
2626 * Forwards all TreeModel events to the TreeState. |
2627 */ |
2627 */ |
2628 public class TreeModelHandler implements TreeModelListener { |
2628 public class TreeModelHandler implements TreeModelListener { |
2629 |
2629 |
2630 // NOTE: This class exists only for backward compatability. All |
2630 // NOTE: This class exists only for backward compatibility. All |
2631 // its functionality has been moved into Handler. If you need to add |
2631 // its functionality has been moved into Handler. If you need to add |
2632 // new functionality add it to the Handler, but make sure this |
2632 // new functionality add it to the Handler, but make sure this |
2633 // class calls into the Handler. |
2633 // class calls into the Handler. |
2634 |
2634 |
2635 public void treeNodesChanged(TreeModelEvent e) { |
2635 public void treeNodesChanged(TreeModelEvent e) { |
2654 * Listens for changes in the selection model and updates the display |
2654 * Listens for changes in the selection model and updates the display |
2655 * accordingly. |
2655 * accordingly. |
2656 */ |
2656 */ |
2657 public class TreeSelectionHandler implements TreeSelectionListener { |
2657 public class TreeSelectionHandler implements TreeSelectionListener { |
2658 |
2658 |
2659 // NOTE: This class exists only for backward compatability. All |
2659 // NOTE: This class exists only for backward compatibility. All |
2660 // its functionality has been moved into Handler. If you need to add |
2660 // its functionality has been moved into Handler. If you need to add |
2661 // new functionality add it to the Handler, but make sure this |
2661 // new functionality add it to the Handler, but make sure this |
2662 // class calls into the Handler. |
2662 // class calls into the Handler. |
2663 |
2663 |
2664 /** |
2664 /** |
2675 * Listener responsible for getting cell editing events and updating |
2675 * Listener responsible for getting cell editing events and updating |
2676 * the tree accordingly. |
2676 * the tree accordingly. |
2677 */ |
2677 */ |
2678 public class CellEditorHandler implements CellEditorListener { |
2678 public class CellEditorHandler implements CellEditorListener { |
2679 |
2679 |
2680 // NOTE: This class exists only for backward compatability. All |
2680 // NOTE: This class exists only for backward compatibility. All |
2681 // its functionality has been moved into Handler. If you need to add |
2681 // its functionality has been moved into Handler. If you need to add |
2682 // new functionality add it to the Handler, but make sure this |
2682 // new functionality add it to the Handler, but make sure this |
2683 // class calls into the Handler. |
2683 // class calls into the Handler. |
2684 |
2684 |
2685 /** Messaged when editing has stopped in the tree. */ |
2685 /** Messaged when editing has stopped in the tree. */ |
2693 } |
2693 } |
2694 } // BasicTreeUI.CellEditorHandler |
2694 } // BasicTreeUI.CellEditorHandler |
2695 |
2695 |
2696 |
2696 |
2697 /** |
2697 /** |
2698 * This is used to get mutliple key down events to appropriately generate |
2698 * This is used to get multiple key down events to appropriately generate |
2699 * events. |
2699 * events. |
2700 */ |
2700 */ |
2701 public class KeyHandler extends KeyAdapter { |
2701 public class KeyHandler extends KeyAdapter { |
2702 |
2702 |
2703 // NOTE: This class exists only for backward compatability. All |
2703 // NOTE: This class exists only for backward compatibility. All |
2704 // its functionality has been moved into Handler. If you need to add |
2704 // its functionality has been moved into Handler. If you need to add |
2705 // new functionality add it to the Handler, but make sure this |
2705 // new functionality add it to the Handler, but make sure this |
2706 // class calls into the Handler. |
2706 // class calls into the Handler. |
2707 |
2707 |
2708 // Also note these fields aren't use anymore, nor does Handler have |
2708 // Also note these fields aren't use anymore, nor does Handler have |
2740 |
2740 |
2741 /** |
2741 /** |
2742 * Repaints the lead selection row when focus is lost/gained. |
2742 * Repaints the lead selection row when focus is lost/gained. |
2743 */ |
2743 */ |
2744 public class FocusHandler implements FocusListener { |
2744 public class FocusHandler implements FocusListener { |
2745 // NOTE: This class exists only for backward compatability. All |
2745 // NOTE: This class exists only for backward compatibility. All |
2746 // its functionality has been moved into Handler. If you need to add |
2746 // its functionality has been moved into Handler. If you need to add |
2747 // new functionality add it to the Handler, but make sure this |
2747 // new functionality add it to the Handler, but make sure this |
2748 // class calls into the Handler. |
2748 // class calls into the Handler. |
2749 |
2749 |
2750 /** |
2750 /** |
2842 * TreeMouseListener is responsible for updating the selection |
2842 * TreeMouseListener is responsible for updating the selection |
2843 * based on mouse events. |
2843 * based on mouse events. |
2844 */ |
2844 */ |
2845 public class MouseHandler extends MouseAdapter implements MouseMotionListener |
2845 public class MouseHandler extends MouseAdapter implements MouseMotionListener |
2846 { |
2846 { |
2847 // NOTE: This class exists only for backward compatability. All |
2847 // NOTE: This class exists only for backward compatibility. All |
2848 // its functionality has been moved into Handler. If you need to add |
2848 // its functionality has been moved into Handler. If you need to add |
2849 // new functionality add it to the Handler, but make sure this |
2849 // new functionality add it to the Handler, but make sure this |
2850 // class calls into the Handler. |
2850 // class calls into the Handler. |
2851 |
2851 |
2852 /** |
2852 /** |
2875 } // End of BasicTreeUI.MouseHandler |
2875 } // End of BasicTreeUI.MouseHandler |
2876 |
2876 |
2877 |
2877 |
2878 /** |
2878 /** |
2879 * PropertyChangeListener for the tree. Updates the appropriate |
2879 * PropertyChangeListener for the tree. Updates the appropriate |
2880 * varaible, or TreeState, based on what changes. |
2880 * variable, or TreeState, based on what changes. |
2881 */ |
2881 */ |
2882 public class PropertyChangeHandler implements |
2882 public class PropertyChangeHandler implements |
2883 PropertyChangeListener { |
2883 PropertyChangeListener { |
2884 |
2884 |
2885 // NOTE: This class exists only for backward compatability. All |
2885 // NOTE: This class exists only for backward compatibility. All |
2886 // its functionality has been moved into Handler. If you need to add |
2886 // its functionality has been moved into Handler. If you need to add |
2887 // new functionality add it to the Handler, but make sure this |
2887 // new functionality add it to the Handler, but make sure this |
2888 // class calls into the Handler. |
2888 // class calls into the Handler. |
2889 |
2889 |
2890 public void propertyChange(PropertyChangeEvent event) { |
2890 public void propertyChange(PropertyChangeEvent event) { |
2898 * any of the properties of the model change. |
2898 * any of the properties of the model change. |
2899 */ |
2899 */ |
2900 public class SelectionModelPropertyChangeHandler implements |
2900 public class SelectionModelPropertyChangeHandler implements |
2901 PropertyChangeListener { |
2901 PropertyChangeListener { |
2902 |
2902 |
2903 // NOTE: This class exists only for backward compatability. All |
2903 // NOTE: This class exists only for backward compatibility. All |
2904 // its functionality has been moved into Handler. If you need to add |
2904 // its functionality has been moved into Handler. If you need to add |
2905 // new functionality add it to the Handler, but make sure this |
2905 // new functionality add it to the Handler, but make sure this |
2906 // class calls into the Handler. |
2906 // class calls into the Handler. |
2907 |
2907 |
2908 public void propertyChange(PropertyChangeEvent event) { |
2908 public void propertyChange(PropertyChangeEvent event) { |