271 // the first occurrence of |
271 // the first occurrence of |
272 // setDividerLocation() |
272 // setDividerLocation() |
273 private Color dividerDraggingColor; |
273 private Color dividerDraggingColor; |
274 private boolean rememberPaneSizes; |
274 private boolean rememberPaneSizes; |
275 |
275 |
276 // Indicates wether the one of splitpane sides is expanded |
276 // Indicates whether the one of splitpane sides is expanded |
277 private boolean keepHidden = false; |
277 private boolean keepHidden = false; |
278 |
278 |
279 /** Indicates that we have painted once. */ |
279 /** Indicates that we have painted once. */ |
280 // This is used by the LayoutManager to determine when it should use |
280 // This is used by the LayoutManager to determine when it should use |
281 // the divider location provided by the JSplitPane. This is used as there |
281 // the divider location provided by the JSplitPane. This is used as there |
681 * This class should be treated as a "protected" inner class. |
681 * This class should be treated as a "protected" inner class. |
682 * Instantiate it only within subclasses of BasicSplitPaneUI. |
682 * Instantiate it only within subclasses of BasicSplitPaneUI. |
683 */ |
683 */ |
684 public class PropertyHandler implements PropertyChangeListener |
684 public class PropertyHandler implements PropertyChangeListener |
685 { |
685 { |
686 // NOTE: This class exists only for backward compatability. All |
686 // NOTE: This class exists only for backward compatibility. All |
687 // its functionality has been moved into Handler. If you need to add |
687 // its functionality has been moved into Handler. If you need to add |
688 // new functionality add it to the Handler, but make sure this |
688 // new functionality add it to the Handler, but make sure this |
689 // class calls into the Handler. |
689 // class calls into the Handler. |
690 |
690 |
691 /** |
691 /** |
705 * This class should be treated as a "protected" inner class. |
705 * This class should be treated as a "protected" inner class. |
706 * Instantiate it only within subclasses of BasicSplitPaneUI. |
706 * Instantiate it only within subclasses of BasicSplitPaneUI. |
707 */ |
707 */ |
708 public class FocusHandler extends FocusAdapter |
708 public class FocusHandler extends FocusAdapter |
709 { |
709 { |
710 // NOTE: This class exists only for backward compatability. All |
710 // NOTE: This class exists only for backward compatibility. All |
711 // its functionality has been moved into Handler. If you need to add |
711 // its functionality has been moved into Handler. If you need to add |
712 // new functionality add it to the Handler, but make sure this |
712 // new functionality add it to the Handler, but make sure this |
713 // class calls into the Handler. |
713 // class calls into the Handler. |
714 public void focusGained(FocusEvent ev) { |
714 public void focusGained(FocusEvent ev) { |
715 getHandler().focusGained(ev); |
715 getHandler().focusGained(ev); |
1071 } |
1071 } |
1072 |
1072 |
1073 |
1073 |
1074 /** |
1074 /** |
1075 * Returns the preferred size for the passed in component, |
1075 * Returns the preferred size for the passed in component, |
1076 * This is passed off to the current layoutmanager. |
1076 * This is passed off to the current layout manager. |
1077 */ |
1077 */ |
1078 public Dimension getPreferredSize(JComponent jc) { |
1078 public Dimension getPreferredSize(JComponent jc) { |
1079 if(splitPane != null) |
1079 if(splitPane != null) |
1080 return layoutManager.preferredLayoutSize(splitPane); |
1080 return layoutManager.preferredLayoutSize(splitPane); |
1081 return new Dimension(0, 0); |
1081 return new Dimension(0, 0); |
1082 } |
1082 } |
1083 |
1083 |
1084 |
1084 |
1085 /** |
1085 /** |
1086 * Returns the minimum size for the passed in component, |
1086 * Returns the minimum size for the passed in component, |
1087 * This is passed off to the current layoutmanager. |
1087 * This is passed off to the current layout manager. |
1088 */ |
1088 */ |
1089 public Dimension getMinimumSize(JComponent jc) { |
1089 public Dimension getMinimumSize(JComponent jc) { |
1090 if(splitPane != null) |
1090 if(splitPane != null) |
1091 return layoutManager.minimumLayoutSize(splitPane); |
1091 return layoutManager.minimumLayoutSize(splitPane); |
1092 return new Dimension(0, 0); |
1092 return new Dimension(0, 0); |
1093 } |
1093 } |
1094 |
1094 |
1095 |
1095 |
1096 /** |
1096 /** |
1097 * Returns the maximum size for the passed in component, |
1097 * Returns the maximum size for the passed in component, |
1098 * This is passed off to the current layoutmanager. |
1098 * This is passed off to the current layout manager. |
1099 */ |
1099 */ |
1100 public Dimension getMaximumSize(JComponent jc) { |
1100 public Dimension getMaximumSize(JComponent jc) { |
1101 if(splitPane != null) |
1101 if(splitPane != null) |
1102 return layoutManager.maximumLayoutSize(splitPane); |
1102 return layoutManager.maximumLayoutSize(splitPane); |
1103 return new Dimension(0, 0); |
1103 return new Dimension(0, 0); |
1436 } |
1436 } |
1437 |
1437 |
1438 |
1438 |
1439 /** |
1439 /** |
1440 * Returns the minimum size needed to contain the children. |
1440 * Returns the minimum size needed to contain the children. |
1441 * The width is the sum of all the childrens min widths and |
1441 * The width is the sum of all the children's min widths and |
1442 * the height is the largest of the childrens minimum heights. |
1442 * the height is the largest of the children's minimum heights. |
1443 */ |
1443 */ |
1444 public Dimension minimumLayoutSize(Container container) { |
1444 public Dimension minimumLayoutSize(Container container) { |
1445 int minPrimary = 0; |
1445 int minPrimary = 0; |
1446 int minSecondary = 0; |
1446 int minSecondary = 0; |
1447 Insets insets = splitPane.getInsets(); |
1447 Insets insets = splitPane.getInsets(); |
1469 } |
1469 } |
1470 |
1470 |
1471 |
1471 |
1472 /** |
1472 /** |
1473 * Returns the preferred size needed to contain the children. |
1473 * Returns the preferred size needed to contain the children. |
1474 * The width is the sum of all the childrens preferred widths and |
1474 * The width is the sum of all the preferred widths of the children and |
1475 * the height is the largest of the childrens preferred heights. |
1475 * the height is the largest preferred height of the children. |
1476 */ |
1476 */ |
1477 public Dimension preferredLayoutSize(Container container) { |
1477 public Dimension preferredLayoutSize(Container container) { |
1478 int prePrimary = 0; |
1478 int prePrimary = 0; |
1479 int preSecondary = 0; |
1479 int preSecondary = 0; |
1480 Insets insets = splitPane.getInsets(); |
1480 Insets insets = splitPane.getInsets(); |