PageRenderTime 131ms CodeModel.GetById 56ms app.highlight 65ms RepoModel.GetById 1ms app.codeStats 1ms

/jEdit/tags/jedit-4-0-pre3/org/gjt/sp/jedit/gui/PanelWindowContainer.java

#
Java | 814 lines | 616 code | 94 blank | 104 comment | 102 complexity | 49ece6ebd051c2c873e2ca83f9302f61 MD5 | raw file
  1/*
  2 * PanelWindowContainer.java - holds dockable windows
  3 * :tabSize=8:indentSize=8:noTabs=false:
  4 * :folding=explicit:collapseFolds=1:
  5 *
  6 * Copyright (C) 2000, 2001 Slava Pestov
  7 *
  8 * This program is free software; you can redistribute it and/or
  9 * modify it under the terms of the GNU General Public License
 10 * as published by the Free Software Foundation; either version 2
 11 * of the License, or any later version.
 12 *
 13 * This program is distributed in the hope that it will be useful,
 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 16 * GNU General Public License for more details.
 17 *
 18 * You should have received a copy of the GNU General Public License
 19 * along with this program; if not, write to the Free Software
 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 21 */
 22
 23package org.gjt.sp.jedit.gui;
 24
 25//{{{ Imports
 26import javax.swing.border.*;
 27import javax.swing.plaf.metal.*;
 28import javax.swing.*;
 29import java.awt.event.*;
 30import java.awt.font.*;
 31import java.awt.geom.AffineTransform;
 32import java.awt.image.*;
 33import java.awt.*;
 34import java.util.Vector;
 35import org.gjt.sp.jedit.*;
 36//}}}
 37
 38/**
 39 * A container for dockable windows. This class should never be used
 40 * directly.
 41 * @author Slava Pestov
 42 * @version $Id: PanelWindowContainer.java 3936 2001-12-21 07:02:14Z spestov $
 43 * @since jEdit 4.0pre1
 44 */
 45public class PanelWindowContainer implements DockableWindowContainer
 46{
 47	//{{{ PanelWindowContainer constructor
 48	public PanelWindowContainer(DockableWindowManager wm, String position)
 49	{
 50		this.wm = wm;
 51		this.position = position;
 52
 53		//{{{ Button box setup
 54		buttons = new JPanel(new ButtonLayout());
 55
 56		// the close box must be the same size as the other buttons to look good.
 57		// there are two ways to achieve this:
 58		// a) write a custom layout manager
 59		// b) when the first button is added, give the close box the proper size
 60		// I'm lazy so I chose "b". See register() for details.
 61
 62		closeBox = new JButton(GUIUtilities.loadIcon("closebox.gif"));
 63		closeBox.setRequestFocusEnabled(false);
 64		closeBox.setToolTipText(jEdit.getProperty("view.docking.close-tooltip"));
 65		buttons.add(closeBox);
 66
 67		closeBox.addActionListener(new ActionHandler());
 68
 69		popupButton = new JButton(GUIUtilities.loadIcon("ToolbarMenu.gif"));
 70		popupButton.setRequestFocusEnabled(false);
 71		popupButton.setToolTipText(jEdit.getProperty("view.docking.menu-tooltip"));
 72		buttons.add(popupButton);
 73
 74		popupButton.addMouseListener(new MouseHandler());
 75		popup = new JPopupMenu();
 76
 77		buttonGroup = new ButtonGroup();
 78		// JDK 1.4 workaround
 79		buttonGroup.add(nullButton = new JToggleButton());
 80		//}}}
 81
 82		dockables = new Vector();
 83		dockablePanel = new DockablePanel();
 84
 85		dimension = jEdit.getIntegerProperty(
 86			"view.dock." + position + ".dimension",0);
 87	} //}}}
 88
 89	//{{{ register() method
 90	public void register(final DockableWindowManager.Entry entry)
 91	{
 92		dockables.addElement(entry);
 93
 94		//{{{ Create button
 95		int rotation;
 96		if(position.equals(DockableWindowManager.TOP)
 97			|| position.equals(DockableWindowManager.BOTTOM))
 98			rotation = RotatedTextIcon.NONE;
 99		else if(position.equals(DockableWindowManager.LEFT))
100			rotation = RotatedTextIcon.CCW;
101		else if(position.equals(DockableWindowManager.RIGHT))
102			rotation = RotatedTextIcon.CW;
103		else
104			throw new InternalError("Invalid position: " + position);
105
106		JToggleButton button = new JToggleButton();
107		button.setMargin(new Insets(0,0,0,0));
108		button.setRequestFocusEnabled(false);
109		button.setIcon(new RotatedTextIcon(rotation,button.getFont(),
110			entry.title));
111		button.addActionListener(new ActionListener()
112		{
113			public void actionPerformed(ActionEvent evt)
114			{
115				if(current == entry)
116					show(null);
117				else
118					wm.showDockableWindow(entry.name);
119			}
120		}); //}}}
121
122		buttonGroup.add(button);
123		buttons.add(button);
124
125		//{{{ Create menu items
126		JMenuItem menuItem = new JMenuItem(entry.title);
127
128		menuItem.addActionListener(new ActionListener()
129		{
130			public void actionPerformed(ActionEvent evt)
131			{
132				wm.showDockableWindow(entry.name);
133			}
134		}); //}}}
135
136		popup.add(menuItem);
137
138		wm.revalidate();
139	} //}}}
140
141	//{{{ add() method
142	public void add(DockableWindowManager.Entry entry)
143	{
144		dockablePanel.add(entry.name,entry.win);
145	} //}}}
146
147	//{{{ remove() method
148	public void remove(DockableWindowManager.Entry entry)
149	{
150		int index = dockables.indexOf(entry);
151		buttons.remove(index + 2);
152
153		dockables.removeElement(entry);
154		if(entry.win != null)
155			dockablePanel.remove(entry.win);
156
157		if(current == entry)
158		{
159			current = null;
160			show(null);
161		}
162		else
163			wm.revalidate();
164	} //}}}
165
166	//{{{ save() method
167	public void save(DockableWindowManager.Entry entry) {}
168	//}}}
169
170	//{{{ show() method
171	public void show(final DockableWindowManager.Entry entry)
172	{
173		if(current == entry)
174		{
175			if(entry != null)
176				entry.win.requestDefaultFocus();
177			return;
178		}
179
180		if(current == null)
181		{
182			// we didn't have a component previously, so create a border
183			dockablePanel.setBorder(new DockBorder(position));
184		}
185
186		if(entry != null)
187		{
188			this.current = entry;
189
190			dockablePanel.showDockable(entry.name);
191
192			int index = dockables.indexOf(entry);
193			((JToggleButton)buttons.getComponent(index + 2)).setSelected(true);
194
195			SwingUtilities.invokeLater(new Runnable()
196			{
197				public void run()
198				{
199					entry.win.requestDefaultFocus();
200				}
201			});
202		}
203		else
204		{
205			current = null;
206			nullButton.setSelected(true);
207			// removing last component, so remove border
208			dockablePanel.setBorder(null);
209
210			wm.getView().getTextArea().requestFocus();
211		}
212
213		wm.revalidate();
214		dockablePanel.repaint();
215	} //}}}
216
217	//{{{ isVisible() method
218	public boolean isVisible(DockableWindowManager.Entry entry)
219	{
220		return current == entry;
221	} //}}}
222
223	//{{{ getCurrent() method
224	public DockableWindowManager.Entry getCurrent()
225	{
226		return current;
227	} //}}}
228
229	//{{{ Package-private members
230
231	//{{{ save() method
232	void save()
233	{
234		jEdit.setIntegerProperty("view.dock." + position + ".dimension",
235			dimension);
236		if(current == null)
237			jEdit.unsetProperty("view.dock." + position + ".last");
238		else
239		{
240			jEdit.setProperty("view.dock." + position + ".last",
241				current.name);
242		}
243	} //}}}
244
245	//{{{ getButtonBox() method
246	JPanel getButtonBox()
247	{
248		return buttons;
249	} //}}}
250
251	//{{{ getDockablePanel() method
252	DockablePanel getDockablePanel()
253	{
254		return dockablePanel;
255	} //}}}
256
257	//}}}
258
259	//{{{ Private members
260	private static final int SPLITTER_WIDTH = 10;
261
262	private DockableWindowManager wm;
263	private String position;
264	private JPanel buttons;
265	private JButton closeBox;
266	private JButton popupButton;
267	private ButtonGroup buttonGroup;
268	private JToggleButton nullButton;
269	private int dimension;
270	private Vector dockables;
271	private DockablePanel dockablePanel;
272	private DockableWindowManager.Entry current;
273	private JPopupMenu popup;
274	//}}}
275
276	//{{{ Inner classes
277
278	//{{{ ActionHandler class
279	class ActionHandler implements ActionListener
280	{
281		public void actionPerformed(ActionEvent evt)
282		{
283			show(null);
284		}
285	} //}}}
286
287	//{{{ MouseHandler class
288	class MouseHandler extends MouseAdapter
289	{
290		public void mousePressed(MouseEvent evt)
291		{
292			if(evt.getSource() == popupButton)
293			{
294				if(popup.isVisible())
295					popup.setVisible(false);
296				else
297				{
298					GUIUtilities.showPopupMenu(popup,
299						popupButton,evt.getX(),evt.getY());
300				}
301			}
302		}
303	} //}}}
304
305	//{{{ DockBorder class
306	static class DockBorder implements Border
307	{
308		String position;
309		Insets insets;
310		Color color1;
311		Color color2;
312		Color color3;
313
314		//{{{ DockBorder constructor
315		DockBorder(String position)
316		{
317			if(UIManager.getLookAndFeel() instanceof MetalLookAndFeel)
318			{
319				color1 = MetalLookAndFeel.getControlHighlight();
320				color2 = MetalLookAndFeel.getControlDarkShadow();
321				color3 = MetalLookAndFeel.getControl();
322			}
323
324			this.position = position;
325			insets = new Insets(
326				position.equals(DockableWindowManager.BOTTOM)
327					? SPLITTER_WIDTH : 0,
328				position.equals(DockableWindowManager.RIGHT)
329					? SPLITTER_WIDTH : 0,
330				position.equals(DockableWindowManager.TOP)
331					? SPLITTER_WIDTH : 0,
332				position.equals(DockableWindowManager.LEFT)
333					? SPLITTER_WIDTH : 0);
334		} //}}}
335
336		//{{{ paintBorder() method
337		public void paintBorder(Component c, Graphics g,
338			int x, int y, int width, int height)
339		{
340			if(color1 == null || color2 == null || color3 == null)
341				return;
342
343			if(position.equals(DockableWindowManager.BOTTOM))
344				paintHorizBorder(g,x,y,width);
345			else if(position.equals(DockableWindowManager.RIGHT))
346				paintVertBorder(g,x,y,height);
347			else if(position.equals(DockableWindowManager.TOP))
348			{
349				paintHorizBorder(g,x,y + height
350					- SPLITTER_WIDTH,width);
351			}
352			else if(position.equals(DockableWindowManager.LEFT))
353			{
354				paintVertBorder(g,x + width
355					- SPLITTER_WIDTH,y,height);
356			}
357		} //}}}
358
359		//{{{ getBorderInsets() method
360		public Insets getBorderInsets(Component c)
361		{
362			return insets;
363		} //}}}
364
365		//{{{ isBorderOpaque() method
366		public boolean isBorderOpaque()
367		{
368			return false;
369		} //}}}
370
371		//{{{ paintHorizBorder() method
372		private void paintHorizBorder(Graphics g, int x, int y, int width)
373		{
374			g.setColor(color3);
375			g.fillRect(x,y,width,SPLITTER_WIDTH);
376
377			for(int i = 0; i < width / 4 - 1; i++)
378			{
379				g.setColor(color1);
380				g.drawLine(x + i * 4 + 2,y + 3,
381					x + i * 4 + 2,y + 3);
382				g.setColor(color2);
383				g.drawLine(x + i * 4 + 3,y + 4,
384					x + i * 4 + 3,y + 4);
385				g.setColor(color1);
386				g.drawLine(x + i * 4 + 4,y + 5,
387					x + i * 4 + 4,y + 5);
388				g.setColor(color2);
389				g.drawLine(x + i * 4 + 5,y + 6,
390					x + i * 4 + 5,y + 6);
391			}
392		} //}}}
393
394		//{{{ paintVertBorder() method
395		private void paintVertBorder(Graphics g, int x, int y, int height)
396		{
397			g.setColor(color3);
398			g.fillRect(x,y,SPLITTER_WIDTH,height);
399
400			for(int i = 0; i < height / 4 - 1; i++)
401			{
402				g.setColor(color1);
403				g.drawLine(x + 3,y + i * 4 + 2,
404					x + 3,y + i * 4 + 2);
405				g.setColor(color2);
406				g.drawLine(x + 4,y + i * 4 + 3,
407					x + 4,y + i * 4 + 3);
408				g.setColor(color1);
409				g.drawLine(x + 5,y + i * 4 + 4,
410					x + 5,y + i * 4 + 4);
411				g.setColor(color2);
412				g.drawLine(x + 6,y + i * 4 + 5,
413					x + 6,y + i * 4 + 5);
414			}
415		} //}}}
416	} //}}}
417
418	//{{{ RotatedTextIcon class
419	class RotatedTextIcon implements Icon
420	{
421		static final int NONE = 0;
422		static final int CW = 1;
423		static final int CCW = 2;
424
425		int rotate;
426		Font font;
427		String text;
428		int width;
429		int height;
430		RenderingHints renderHints;
431
432		//{{{ RotatedTextIcon constructor
433		RotatedTextIcon(int rotate, Font font, String text)
434		{
435			this.rotate = rotate;
436			this.font = font;
437			this.text = text;
438
439			FontRenderContext fontRenderContext
440				= new FontRenderContext(null,true,
441				true);
442			GlyphVector glyphs = font.createGlyphVector(
443				fontRenderContext,text);
444			width = (int)glyphs.getLogicalBounds().getWidth();
445			height = (int)glyphs.getLogicalBounds().getHeight();
446
447			renderHints = new RenderingHints(
448				RenderingHints.KEY_ANTIALIASING,
449				RenderingHints.VALUE_ANTIALIAS_ON);
450			renderHints.put(RenderingHints.KEY_FRACTIONALMETRICS,
451				RenderingHints.VALUE_FRACTIONALMETRICS_ON);
452			renderHints.put(RenderingHints.KEY_RENDERING,
453				RenderingHints.VALUE_RENDER_QUALITY);
454		} //}}}
455
456		//{{{ getIconWidth() method
457		public int getIconWidth()
458		{
459			return (rotate == RotatedTextIcon.CW
460				|| rotate == RotatedTextIcon.CCW
461				? height : width);
462		} //}}}
463
464		//{{{ getIconHeight() method
465		public int getIconHeight()
466		{
467			return (rotate == RotatedTextIcon.CW
468				|| rotate == RotatedTextIcon.CCW
469				? width : height);
470		} //}}}
471
472		//{{{ paintIcon() method
473		public void paintIcon(Component c, Graphics g, int x, int y)
474		{
475			FontMetrics fm = c.getFontMetrics(font);
476
477			Graphics2D g2d = (Graphics2D)g;
478			g2d.setFont(font);
479			AffineTransform oldTransform = g2d.getTransform();
480			RenderingHints oldHints = g2d.getRenderingHints();
481
482			g2d.setRenderingHints(renderHints);
483			g2d.setColor(c.getForeground());
484
485			//{{{ No rotation
486			if(rotate == RotatedTextIcon.NONE)
487			{
488				g2d.drawString(text,x,y + fm.getAscent());
489			} //}}}
490			//{{{ Clockwise rotation
491			else if(rotate == RotatedTextIcon.CW)
492			{
493				AffineTransform trans = new AffineTransform();
494				trans.concatenate(oldTransform);
495				trans.translate(x,y);
496				trans.rotate(Math.PI / 2,
497					height / 2, width / 2);
498				g2d.setTransform(trans);
499				g2d.drawString(text,(height - width) / 2,
500					(width - height) / 2
501					+ fm.getAscent());
502			} //}}}
503			//{{{ Counterclockwise rotation
504			else if(rotate == RotatedTextIcon.CCW)
505			{
506				AffineTransform trans = new AffineTransform();
507				trans.concatenate(oldTransform);
508				trans.translate(x,y);
509				trans.rotate(Math.PI * 3 / 2,
510					height / 2, width / 2);
511				g2d.setTransform(trans);
512				g2d.drawString(text,(height - width) / 2,
513					(width - height) / 2
514					+ fm.getAscent());
515			} //}}}
516
517			g2d.setTransform(oldTransform);
518			g2d.setRenderingHints(oldHints);
519		} //}}}
520	} //}}}
521
522	//{{{ ButtonLayout class
523	class ButtonLayout implements LayoutManager
524	{
525		//{{{ addLayoutComponent() method
526		public void addLayoutComponent(String name, Component comp) {} //}}}
527
528		//{{{ removeLayoutComponent() method
529		public void removeLayoutComponent(Component comp) {} //}}}
530
531		//{{{ preferredLayoutSize() method
532		public Dimension preferredLayoutSize(Container parent)
533		{
534			Component[] comp = parent.getComponents();
535			if(comp.length == 2)
536			{
537				// nothing 'cept close box and popup button
538				return new Dimension(0,0);
539			}
540			else
541			{
542				if(position.equals(DockableWindowManager.TOP)
543					|| position.equals(DockableWindowManager.BOTTOM))
544				{
545					return new Dimension(0,comp[2].getPreferredSize().height);
546				}
547				else
548				{
549					return new Dimension(comp[2].getPreferredSize().width,0);
550				}
551			}
552		} //}}}
553
554		//{{{ minimumLayoutSize() method
555		public Dimension minimumLayoutSize(Container parent)
556		{
557			Component[] comp = parent.getComponents();
558			if(comp.length == 2)
559			{
560				// nothing 'cept close box and popup button
561				return new Dimension(0,0);
562			}
563			else
564			{
565				if(position.equals(DockableWindowManager.TOP)
566					|| position.equals(DockableWindowManager.BOTTOM))
567				{
568					return new Dimension(0,comp[2].getMinimumSize().height);
569				}
570				else
571				{
572					return new Dimension(comp[2].getMinimumSize().width,0);
573				}
574			}
575		} //}}}
576
577		//{{{ layoutContainer() method
578		public void layoutContainer(Container parent)
579		{
580			Component[] comp = parent.getComponents();
581			if(comp.length != 2)
582			{
583				Dimension buttonSize = comp[2].getPreferredSize();
584				int closeBoxDimension;
585				if(position.equals(DockableWindowManager.TOP)
586					|| position.equals(DockableWindowManager.BOTTOM))
587				{
588					closeBoxDimension = comp[2].getMinimumSize().height;
589				}
590				else
591				{
592					closeBoxDimension = comp[2].getMinimumSize().width;
593				}
594				closeBox.setBounds(0,0,closeBoxDimension,closeBoxDimension);
595				popupButton.setVisible(false);
596
597				Dimension parentSize = parent.getSize();
598				int pos = closeBoxDimension;
599				for(int i = 2; i < comp.length; i++)
600				{
601					Dimension size = comp[i].getPreferredSize();
602					if(position.equals(DockableWindowManager.TOP)
603						|| position.equals(DockableWindowManager.BOTTOM))
604					{
605						if(pos + size.width > parentSize.width)
606						{
607							popupButton.setBounds(
608								parentSize.width - closeBoxDimension,
609								0,closeBoxDimension,closeBoxDimension);
610							popupButton.setVisible(true);
611							comp[i].setVisible(false);
612						}
613						else
614						{
615							comp[i].setBounds(pos,0,size.width,size.height);
616							comp[i].setVisible(true);
617						}
618
619						pos += size.width;
620					}
621					else
622					{
623						if(pos + size.height > parentSize.height)
624						{
625							popupButton.setBounds(
626								0,parentSize.height - closeBoxDimension,
627								closeBoxDimension,closeBoxDimension);
628							popupButton.setVisible(true);
629							comp[i].setVisible(false);
630						}
631						else
632						{
633							comp[i].setBounds(0,pos,size.width,size.height);
634							comp[i].setVisible(true);
635						}
636
637						pos += size.height;
638					}
639				}
640			}
641		} //}}}
642	} //}}}
643
644	//{{{ DockablePanel class
645	class DockablePanel extends JPanel
646	{
647		//{{{ DockablePanel constructor
648		DockablePanel()
649		{
650			super(new CardLayout());
651
652			ResizeMouseHandler resizeMouseHandler = new ResizeMouseHandler();
653			addMouseListener(resizeMouseHandler);
654			addMouseMotionListener(resizeMouseHandler);
655		} //}}}
656
657		//{{{ showDockable() method
658		void showDockable(String name)
659		{
660			((CardLayout)getLayout()).show(this,name);
661		} //}}}
662
663		//{{{ getMinimumSize() method
664		public Dimension getMinimumSize()
665		{
666			return new Dimension(0,0);
667		} //}}}
668
669		//{{{ getPreferredSize() method
670		public Dimension getPreferredSize()
671		{
672			if(current == null)
673				return new Dimension(0,0);
674			else
675			{
676				if(dimension <= 0)
677				{
678					int width = super.getPreferredSize().width;
679					dimension = width - SPLITTER_WIDTH - 3;
680				}
681
682				if(position.equals(DockableWindowManager.TOP)
683					|| position.equals(DockableWindowManager.BOTTOM))
684				{
685					return new Dimension(0,
686						dimension + SPLITTER_WIDTH + 3);
687				}
688				else
689				{
690					return new Dimension(dimension + SPLITTER_WIDTH + 3,
691						0);
692				}
693			}
694		} //}}}
695
696		//{{{ ResizeMouseHandler class
697		class ResizeMouseHandler extends MouseAdapter implements MouseMotionListener
698		{
699			boolean canDrag;
700			int dragStartDimension;
701			Point dragStart;
702
703			//{{{ mousePressed() method
704			public void mousePressed(MouseEvent evt)
705			{
706				dragStartDimension = dimension;
707				dragStart = evt.getPoint();
708			} //}}}
709
710			//{{{ mouseMoved() method
711			public void mouseMoved(MouseEvent evt)
712			{
713				Border border = getBorder();
714				if(border == null)
715				{
716					// collapsed
717					return;
718				}
719
720				Insets insets = border.getBorderInsets(DockablePanel.this);
721				int cursor = Cursor.DEFAULT_CURSOR;
722				canDrag = false;
723				//{{{ Top...
724				if(position.equals(DockableWindowManager.TOP))
725				{
726					if(evt.getY() >= getHeight() - insets.bottom)
727					{
728						cursor = Cursor.N_RESIZE_CURSOR;
729						canDrag = true;
730					}
731				} //}}}
732				//{{{ Left...
733				else if(position.equals(DockableWindowManager.LEFT))
734				{
735					if(evt.getX() >= getWidth() - insets.right)
736					{
737						cursor = Cursor.W_RESIZE_CURSOR;
738						canDrag = true;
739					}
740				} //}}}
741				//{{{ Bottom...
742				else if(position.equals(DockableWindowManager.BOTTOM))
743				{
744					if(evt.getY() <= insets.top)
745					{
746						cursor = Cursor.S_RESIZE_CURSOR;
747						canDrag = true;
748					}
749				} //}}}
750				//{{{ Right...
751				else if(position.equals(DockableWindowManager.RIGHT))
752				{
753					if(evt.getX() <= insets.left)
754					{
755						cursor = Cursor.E_RESIZE_CURSOR;
756						canDrag = true;
757					}
758				} //}}}
759
760				setCursor(Cursor.getPredefinedCursor(cursor));
761			} //}}}
762
763			//{{{ mouseDragged() method
764			public void mouseDragged(MouseEvent evt)
765			{
766				if(!canDrag)
767					return;
768
769				if(dragStart == null) // can't happen?
770					return;
771
772				//{{{ Top...
773				if(position.equals(DockableWindowManager.TOP))
774				{
775					dimension = evt.getY()
776						+ dragStartDimension
777						- dragStart.y;
778				} //}}}
779				//{{{ Left...
780				else if(position.equals(DockableWindowManager.LEFT))
781				{
782					dimension = evt.getX()
783						+ dragStartDimension
784						- dragStart.x;
785				} //}}}
786				//{{{ Bottom...
787				else if(position.equals(DockableWindowManager.BOTTOM))
788				{
789					dimension += (dragStart.y - evt.getY());
790				} //}}}
791				//{{{ Right...
792				else if(position.equals(DockableWindowManager.RIGHT))
793				{
794					dimension += (dragStart.x - evt.getX());
795				} //}}}
796
797				if(dimension <= 0)
798					dimension = dragStartDimension;
799
800				wm.invalidate();
801				wm.validate();
802			} //}}}
803
804			//{{{ mouseExited() method
805			public void mouseExited(MouseEvent evt)
806			{
807				setCursor(Cursor.getPredefinedCursor(
808					Cursor.DEFAULT_CURSOR));
809			} //}}}
810		} //}}}
811	} //}}}
812
813	//}}}
814}