Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libjava / classpath / javax / swing / plaf / basic / BasicInternalFrameTitlePane.java
blob56022f3331e56e6b912c00f0f384b2bbb4961f8e
1 /* BasicInternalFrameTitlePane.java --
2 Copyright (C) 2004, 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package javax.swing.plaf.basic;
41 import java.awt.Color;
42 import java.awt.Component;
43 import java.awt.Container;
44 import java.awt.Dimension;
45 import java.awt.Font;
46 import java.awt.FontMetrics;
47 import java.awt.Graphics;
48 import java.awt.Insets;
49 import java.awt.LayoutManager;
50 import java.awt.Rectangle;
51 import java.awt.event.ActionEvent;
52 import java.awt.event.KeyEvent;
53 import java.beans.PropertyChangeEvent;
54 import java.beans.PropertyChangeListener;
55 import java.beans.PropertyVetoException;
57 import javax.swing.AbstractAction;
58 import javax.swing.Action;
59 import javax.swing.Icon;
60 import javax.swing.JButton;
61 import javax.swing.JComponent;
62 import javax.swing.JInternalFrame;
63 import javax.swing.JLabel;
64 import javax.swing.JMenu;
65 import javax.swing.JMenuBar;
66 import javax.swing.JMenuItem;
67 import javax.swing.SwingConstants;
68 import javax.swing.SwingUtilities;
69 import javax.swing.UIManager;
71 /**
72 * This class acts as a titlebar for JInternalFrames.
74 public class BasicInternalFrameTitlePane extends JComponent
76 /**
77 * The Action responsible for closing the JInternalFrame.
79 * @specnote Apparently this class was intended to be protected,
80 * but was made public by a compiler bug and is now
81 * public for compatibility.
83 public class CloseAction extends AbstractAction
85 /**
86 * Creates a new action.
88 public CloseAction()
90 super("Close");
93 /**
94 * This method is called when something closes the JInternalFrame.
96 * @param e The ActionEvent.
98 public void actionPerformed(ActionEvent e)
100 if (frame.isClosable())
104 frame.setClosed(true);
106 catch (PropertyVetoException pve)
108 // We do nothing if the attempt has been vetoed.
115 * This Action is responsible for iconifying the JInternalFrame.
117 * @specnote Apparently this class was intended to be protected,
118 * but was made public by a compiler bug and is now
119 * public for compatibility.
121 public class IconifyAction extends AbstractAction
124 * Creates a new action.
126 public IconifyAction()
128 super("Minimize");
132 * This method is called when the user wants to iconify the
133 * JInternalFrame.
135 * @param e The ActionEvent.
137 public void actionPerformed(ActionEvent e)
139 if (frame.isIconifiable() && ! frame.isIcon())
143 frame.setIcon(true);
145 catch (PropertyVetoException pve)
147 // We do nothing if the attempt has been vetoed.
154 * This Action is responsible for maximizing the JInternalFrame.
156 * @specnote Apparently this class was intended to be protected,
157 * but was made public by a compiler bug and is now
158 * public for compatibility.
160 public class MaximizeAction extends AbstractAction
163 * Creates a new action.
165 public MaximizeAction()
167 super("Maximize");
170 * This method is called when the user wants to maximize the
171 * JInternalFrame.
173 * @param e The ActionEvent.
175 public void actionPerformed(ActionEvent e)
179 if (frame.isMaximizable() && ! frame.isMaximum())
180 frame.setMaximum(true);
181 else if (frame.isMaximum())
182 frame.setMaximum(false);
184 catch (PropertyVetoException pve)
186 // We do nothing if the attempt has been vetoed.
192 * This Action is responsible for dragging the JInternalFrame.
194 * @specnote Apparently this class was intended to be protected,
195 * but was made public by a compiler bug and is now
196 * public for compatibility.
198 public class MoveAction extends AbstractAction
201 * Creates a new action.
203 public MoveAction()
205 super("Move");
208 * This method is called when the user wants to drag the JInternalFrame.
210 * @param e The ActionEvent.
212 public void actionPerformed(ActionEvent e)
214 // FIXME: Implement keyboard driven? move actions.
219 * This Action is responsible for restoring the JInternalFrame. Restoring
220 * the JInternalFrame is the same as setting the maximum property to false.
222 * @specnote Apparently this class was intended to be protected,
223 * but was made public by a compiler bug and is now
224 * public for compatibility.
226 public class RestoreAction extends AbstractAction
229 * Creates a new action.
231 public RestoreAction()
233 super("Restore");
236 * This method is called when the user wants to restore the
237 * JInternalFrame.
239 * @param e The ActionEvent.
241 public void actionPerformed(ActionEvent e)
243 if (frame.isMaximum())
247 frame.setMaximum(false);
249 catch (PropertyVetoException pve)
251 // We do nothing if the attempt has been vetoed.
258 * This action is responsible for sizing the JInternalFrame.
260 * @specnote Apparently this class was intended to be protected,
261 * but was made public by a compiler bug and is now
262 * public for compatibility.
264 public class SizeAction extends AbstractAction
267 * Creates a new action.
269 public SizeAction()
271 super("Size");
274 * This method is called when the user wants to resize the JInternalFrame.
276 * @param e The ActionEvent.
278 public void actionPerformed(ActionEvent e)
280 // FIXME: Not sure how size actions should be handled.
285 * This class is responsible for handling property change events from the
286 * JInternalFrame and adjusting the Title Pane as necessary.
288 * @specnote Apparently this class was intended to be protected,
289 * but was made public by a compiler bug and is now
290 * public for compatibility.
292 public class PropertyChangeHandler implements PropertyChangeListener
295 * This method is called when a PropertyChangeEvent is received by the
296 * Title Pane.
298 * @param evt The PropertyChangeEvent.
300 public void propertyChange(PropertyChangeEvent evt)
302 String propName = evt.getPropertyName();
303 if (propName.equals("closable"))
305 if (evt.getNewValue().equals(Boolean.TRUE))
306 closeButton.setVisible(true);
307 else
308 closeButton.setVisible(false);
310 else if (propName.equals("iconifiable"))
312 if (evt.getNewValue().equals(Boolean.TRUE))
313 iconButton.setVisible(true);
314 else
315 iconButton.setVisible(false);
317 else if (propName.equals("maximizable"))
319 if (evt.getNewValue().equals(Boolean.TRUE))
320 maxButton.setVisible(true);
321 else
322 maxButton.setVisible(false);
329 * This class acts as the MenuBar for the TitlePane. Clicking on the Frame
330 * Icon in the top left corner will activate it.
332 * @specnote Apparently this class was intended to be protected,
333 * but was made public by a compiler bug and is now
334 * public for compatibility.
336 public class SystemMenuBar extends JMenuBar
339 * This method returns true if it can receive focus.
341 * @return True if this Component can receive focus.
343 public boolean isFocusTransversable()
345 return true;
349 * This method returns true if this Component is expected to paint all of
350 * itself.
352 * @return True if this Component is expect to paint all of itself.
354 public boolean isOpaque()
356 return true;
360 * This method paints this Component.
362 * @param g The Graphics object to paint with.
364 public void paint(Graphics g)
366 Icon frameIcon = frame.getFrameIcon();
367 if (frameIcon == null)
368 frameIcon = BasicDesktopIconUI.defaultIcon;
369 frameIcon.paintIcon(this, g, 0, 0);
373 * This method requests that focus be given to this Component.
375 public void requestFocus()
377 super.requestFocus();
382 * This class acts as the Layout Manager for the TitlePane.
384 * @specnote Apparently this class was intended to be protected,
385 * but was made public by a compiler bug and is now
386 * public for compatibility.
388 public class TitlePaneLayout implements LayoutManager
391 * Creates a new <code>TitlePaneLayout</code> object.
393 public TitlePaneLayout()
395 // Do nothing.
399 * This method is called when adding a Component to the Container.
401 * @param name The name to reference the added Component by.
402 * @param c The Component to add.
404 public void addLayoutComponent(String name, Component c)
406 // Do nothing.
410 * This method is called to lay out the children of the Title Pane.
412 * @param c The Container to lay out.
414 public void layoutContainer(Container c)
416 Dimension size = c.getSize();
417 Insets insets = c.getInsets();
418 int width = size.width - insets.left - insets.right;
419 int height = size.height - insets.top - insets.bottom;
421 // MenuBar is always present and located at the top left corner.
422 Dimension menupref = menuBar.getPreferredSize();
423 menuBar.setBounds(insets.left, insets.top, menupref.width, height);
425 int loc = width + insets.left - 1;
426 int top = insets.top + 1;
427 int buttonHeight = height - 4;
428 if (closeButton.isVisible())
430 int buttonWidth = closeIcon.getIconWidth();
431 loc -= buttonWidth + 2;
432 closeButton.setBounds(loc, top, buttonWidth, buttonHeight);
435 if (maxButton.isVisible())
437 int buttonWidth = maxIcon.getIconWidth();
438 loc -= buttonWidth + 2;
439 maxButton.setBounds(loc, top, buttonWidth, buttonHeight);
442 if (iconButton.isVisible())
444 int buttonWidth = iconIcon.getIconWidth();
445 loc -= buttonWidth + 2;
446 iconButton.setBounds(loc, top, buttonWidth, buttonHeight);
449 if (title != null)
450 title.setBounds(insets.left + menupref.width, insets.top,
451 loc - menupref.width - insets.left, height);
455 * This method returns the minimum size of the given Container given the
456 * children that it has.
458 * @param c The Container to get a minimum size for.
460 * @return The minimum size of the Container.
462 public Dimension minimumLayoutSize(Container c)
464 return preferredLayoutSize(c);
468 * This method returns the preferred size of the given Container taking
469 * into account the children that it has.
471 * @param c The Container to lay out.
473 * @return The preferred size of the Container.
475 public Dimension preferredLayoutSize(Container c)
477 return new Dimension(22, 18);
481 * This method is called when removing a Component from the Container.
483 * @param c The Component to remove.
485 public void removeLayoutComponent(Component c)
487 // Nothing to do here.
492 * This helper class is used to create the minimize, maximize and close
493 * buttons in the top right corner of the Title Pane. These buttons are
494 * special since they cannot be given focus and have no border.
496 private class PaneButton extends JButton
499 * Creates a new PaneButton object with the given Action.
501 * @param a The Action that the button uses.
503 public PaneButton(Action a)
505 super(a);
506 setMargin(new Insets(0, 0, 0, 0));
510 * This method returns true if the Component can be focused.
512 * @return false.
514 public boolean isFocusable()
516 // These buttons cannot be given focus.
517 return false;
522 /** The action command for the Close action. */
523 protected static final String CLOSE_CMD = "Close";
525 /** The action command for the Minimize action. */
526 protected static final String ICONIFY_CMD = "Minimize";
528 /** The action command for the Maximize action. */
529 protected static final String MAXIMIZE_CMD = "Maximize";
531 /** The action command for the Move action. */
532 protected static final String MOVE_CMD = "Move";
534 /** The action command for the Restore action. */
535 protected static final String RESTORE_CMD = "Restore";
537 /** The action command for the Size action. */
538 protected static final String SIZE_CMD = "Size";
540 /** The action associated with closing the JInternalFrame. */
541 protected Action closeAction;
543 /** The action associated with iconifying the JInternalFrame. */
544 protected Action iconifyAction;
546 /** The action associated with maximizing the JInternalFrame. */
547 protected Action maximizeAction;
549 /** The action associated with moving the JInternalFrame. */
550 protected Action moveAction;
552 /** The action associated with restoring the JInternalFrame. */
553 protected Action restoreAction;
555 /** The action associated with resizing the JInternalFrame. */
556 protected Action sizeAction;
558 /** The button that closes the JInternalFrame. */
559 protected JButton closeButton;
561 /** The button that iconifies the JInternalFrame. */
562 protected JButton iconButton;
564 /** The button that maximizes the JInternalFrame. */
565 protected JButton maxButton;
567 /** The icon displayed in the restore button. */
568 protected Icon minIcon = BasicIconFactory.createEmptyFrameIcon();
570 /** The icon displayed in the maximize button. */
571 protected Icon maxIcon = BasicIconFactory.createEmptyFrameIcon();
573 /** The icon displayed in the iconify button. */
574 protected Icon iconIcon = BasicIconFactory.createEmptyFrameIcon();
576 /** The icon displayed in the close button. */
577 protected Icon closeIcon;
579 /** The JInternalFrame that this TitlePane is used in. */
580 protected JInternalFrame frame;
582 /** The JMenuBar that is located at the top left of the Title Pane. */
583 protected JMenuBar menuBar;
585 /** The JMenu inside the menuBar. */
586 protected JMenu windowMenu;
589 * The text color of the TitlePane when the JInternalFrame is not selected.
591 protected Color notSelectedTextColor;
594 * The background color of the TitlePane when the JInternalFrame is not
595 * selected.
597 protected Color notSelectedTitleColor;
599 /** The text color of the titlePane when the JInternalFrame is selected. */
600 protected Color selectedTextColor;
603 * The background color of the TitlePane when the JInternalFrame is
604 * selected.
606 protected Color selectedTitleColor;
608 /** The Property Change listener that listens to the JInternalFrame. */
609 protected PropertyChangeListener propertyChangeListener;
612 * The label used to display the title. This label is not added to the
613 * TitlePane.
614 * This is package-private to avoid an accessor method.
616 transient JLabel title;
619 * Creates a new BasicInternalFrameTitlePane object that is used in the
620 * given JInternalFrame.
622 * @param f The JInternalFrame this BasicInternalFrameTitlePane will be used
623 * in.
625 public BasicInternalFrameTitlePane(JInternalFrame f)
627 frame = f;
628 setLayout(createLayout());
629 title = new JLabel();
630 title.setHorizontalAlignment(SwingConstants.LEFT);
631 title.setHorizontalTextPosition(SwingConstants.LEFT);
632 title.setOpaque(false);
633 setOpaque(true);
635 setBackground(Color.LIGHT_GRAY);
636 setOpaque(true);
638 installTitlePane();
642 * This method installs the TitlePane onto the JInternalFrameTitlePane. It
643 * also creates any children components that need to be created and adds
644 * listeners to the appropriate components.
646 protected void installTitlePane()
648 installDefaults();
649 installListeners();
650 createActions();
652 assembleSystemMenu();
654 createButtons();
655 setButtonIcons();
656 addSubComponents();
657 enableActions();
661 * This method adds the sub components to the TitlePane.
663 protected void addSubComponents()
665 add(menuBar);
667 add(closeButton);
668 add(iconButton);
669 add(maxButton);
673 * This method creates the actions that are used to manipulate the
674 * JInternalFrame.
676 protected void createActions()
678 closeAction = new CloseAction();
679 closeAction.putValue(AbstractAction.ACTION_COMMAND_KEY, CLOSE_CMD);
681 iconifyAction = new IconifyAction();
682 iconifyAction.putValue(AbstractAction.ACTION_COMMAND_KEY, ICONIFY_CMD);
684 maximizeAction = new MaximizeAction();
685 maximizeAction.putValue(AbstractAction.ACTION_COMMAND_KEY, MAXIMIZE_CMD);
687 sizeAction = new SizeAction();
688 sizeAction.putValue(AbstractAction.ACTION_COMMAND_KEY, SIZE_CMD);
690 restoreAction = new RestoreAction();
691 restoreAction.putValue(AbstractAction.ACTION_COMMAND_KEY, RESTORE_CMD);
693 moveAction = new MoveAction();
694 moveAction.putValue(AbstractAction.ACTION_COMMAND_KEY, MOVE_CMD);
698 * This method is used to install the listeners.
700 protected void installListeners()
702 propertyChangeListener = createPropertyChangeListener();
703 frame.addPropertyChangeListener(propertyChangeListener);
707 * This method is used to uninstall the listeners.
709 protected void uninstallListeners()
711 frame.removePropertyChangeListener(propertyChangeListener);
712 propertyChangeListener = null;
716 * This method installs the defaults determined by the look and feel.
718 protected void installDefaults()
720 title.setFont(UIManager.getFont("InternalFrame.titleFont"));
721 selectedTextColor = UIManager.getColor("InternalFrame.activeTitleForeground");
722 selectedTitleColor = UIManager.getColor("InternalFrame.activeTitleBackground");
723 notSelectedTextColor = UIManager.getColor("InternalFrame.inactiveTitleForeground");
724 notSelectedTitleColor = UIManager.getColor("InternalFrame.inactiveTitleBackground");
726 closeIcon = UIManager.getIcon("InternalFrame.closeIcon");
727 iconIcon = UIManager.getIcon("InternalFrame.iconifyIcon");
728 maxIcon = UIManager.getIcon("InternalFrame.maximizeIcon");
732 * This method uninstalls the defaults.
734 protected void uninstallDefaults()
736 setFont(null);
737 selectedTextColor = null;
738 selectedTitleColor = null;
739 notSelectedTextColor = null;
740 notSelectedTitleColor = null;
742 closeIcon = null;
743 iconIcon = null;
744 maxIcon = null;
748 * This method creates the buttons used in the TitlePane.
750 protected void createButtons()
752 closeButton = new PaneButton(closeAction);
753 closeButton.setText(null);
754 if (!frame.isClosable())
755 closeButton.setVisible(false);
756 iconButton = new PaneButton(iconifyAction);
757 iconButton.setText(null);
758 if (!frame.isIconifiable())
759 iconButton.setVisible(false);
760 maxButton = new PaneButton(maximizeAction);
761 maxButton.setText(null);
762 if (!frame.isMaximizable())
763 maxButton.setVisible(false);
767 * Set icons for the minimize-, maximize- and close-buttons.
769 protected void setButtonIcons()
771 if (closeIcon != null && closeButton != null)
772 closeButton.setIcon(closeIcon);
773 if (iconIcon != null && iconButton != null)
774 iconButton.setIcon(iconIcon);
775 if (maxIcon != null && maxButton != null)
776 maxButton.setIcon(maxIcon);
780 * This method creates the MenuBar used in the TitlePane.
782 protected void assembleSystemMenu()
784 menuBar = createSystemMenuBar();
785 windowMenu = createSystemMenu();
787 menuBar.add(windowMenu);
789 addSystemMenuItems(windowMenu);
790 enableActions();
794 * This method adds the MenuItems to the given JMenu.
796 * @param systemMenu The JMenu to add MenuItems to.
798 protected void addSystemMenuItems(JMenu systemMenu)
800 JMenuItem tmp;
802 tmp = new JMenuItem(RESTORE_CMD);
803 tmp.addActionListener(restoreAction);
804 tmp.setMnemonic(KeyEvent.VK_R);
805 systemMenu.add(tmp);
807 tmp = new JMenuItem(MOVE_CMD);
808 tmp.addActionListener(moveAction);
809 tmp.setMnemonic(KeyEvent.VK_M);
810 systemMenu.add(tmp);
812 tmp = new JMenuItem(SIZE_CMD);
813 tmp.addActionListener(sizeAction);
814 tmp.setMnemonic(KeyEvent.VK_S);
815 systemMenu.add(tmp);
817 tmp = new JMenuItem(ICONIFY_CMD);
818 tmp.addActionListener(iconifyAction);
819 tmp.setMnemonic(KeyEvent.VK_N);
820 systemMenu.add(tmp);
822 tmp = new JMenuItem(MAXIMIZE_CMD);
823 tmp.addActionListener(maximizeAction);
824 tmp.setMnemonic(KeyEvent.VK_X);
825 systemMenu.add(tmp);
827 systemMenu.addSeparator();
829 tmp = new JMenuItem(CLOSE_CMD);
830 tmp.addActionListener(closeAction);
831 tmp.setMnemonic(KeyEvent.VK_C);
832 systemMenu.add(tmp);
836 * This method creates a new JMenubar.
838 * @return A new JMenuBar.
840 protected JMenuBar createSystemMenuBar()
842 if (menuBar == null)
843 menuBar = new SystemMenuBar();
844 menuBar.removeAll();
845 return menuBar;
849 * This method creates a new JMenu.
851 * @return A new JMenu.
853 protected JMenu createSystemMenu()
855 if (windowMenu == null)
856 windowMenu = new JMenu();
857 windowMenu.removeAll();
858 return windowMenu;
862 * This method programmatically shows the JMenu.
864 protected void showSystemMenu()
866 // FIXME: Untested as KeyEvents are not hooked up.
867 menuBar.getMenu(1).getPopupMenu().show();
871 * This method paints the TitlePane.
873 * @param g The Graphics object to paint with.
875 public void paintComponent(Graphics g)
877 paintTitleBackground(g);
878 if (frame.getTitle() != null && title != null)
880 Color saved = g.getColor();
881 Font f = title.getFont();
882 g.setFont(f);
883 FontMetrics fm = g.getFontMetrics(f);
884 if (frame.isSelected())
885 g.setColor(selectedTextColor);
886 else
887 g.setColor(notSelectedTextColor);
888 title.setText(getTitle(frame.getTitle(), fm, title.getBounds().width));
889 SwingUtilities.paintComponent(g, title, null, title.getBounds());
890 g.setColor(saved);
895 * This method paints the TitlePane's background.
897 * @param g The Graphics object to paint with.
899 protected void paintTitleBackground(Graphics g)
901 if (!isOpaque())
902 return;
904 Color saved = g.getColor();
905 Dimension dims = getSize();
907 Color bg = getBackground();
908 if (frame.isSelected())
909 bg = selectedTitleColor;
910 else
911 bg = notSelectedTitleColor;
912 g.setColor(bg);
913 g.fillRect(0, 0, dims.width, dims.height);
914 g.setColor(saved);
918 * This method returns the title string based on the available width and the
919 * font metrics.
921 * @param text The desired title.
922 * @param fm The FontMetrics of the font used.
923 * @param availableWidth The available width.
925 * @return The allowable string.
927 protected String getTitle(String text, FontMetrics fm, int availableWidth)
929 Rectangle vr = new Rectangle(0, 0, availableWidth, fm.getHeight());
930 Rectangle ir = new Rectangle();
931 Rectangle tr = new Rectangle();
932 String value = SwingUtilities.layoutCompoundLabel(this, fm, text, null,
933 SwingConstants.CENTER,
934 SwingConstants.LEFT,
935 SwingConstants.CENTER,
936 SwingConstants.LEFT, vr,
937 ir, tr, 0);
938 return value;
942 * This method fires something similar to a WINDOW_CLOSING event.
944 * @param frame The JInternalFrame that is being closed.
946 protected void postClosingEvent(JInternalFrame frame)
948 // FIXME: Implement postClosingEvent when I figure out what
949 // it's supposed to do.
950 // It says that this fires an WINDOW_CLOSING like event.
951 // So the closest thing is some kind of InternalFrameEvent.
952 // But none is fired.
953 // Can't see it called or anything.
957 * This method enables the actions for the TitlePane given the frame's
958 * properties.
960 protected void enableActions()
962 closeAction.setEnabled(frame.isClosable());
964 iconifyAction.setEnabled(frame.isIconifiable());
965 // The maximize action is responsible for restoring it
966 // as well, if clicked from the button
967 maximizeAction.setEnabled(frame.isMaximizable());
969 // The restoring action is only active when selected
970 // from the menu.
971 restoreAction.setEnabled(frame.isMaximum());
973 sizeAction.setEnabled(frame.isResizable());
975 // FIXME: Tie MoveAction enabled status to a variable.
976 moveAction.setEnabled(false);
980 * This method creates a new PropertyChangeListener.
982 * @return A new PropertyChangeListener.
984 protected PropertyChangeListener createPropertyChangeListener()
986 return new PropertyChangeHandler();
990 * This method creates a new LayoutManager for the TitlePane.
992 * @return A new LayoutManager.
994 protected LayoutManager createLayout()
996 return new TitlePaneLayout();