PageRenderTime 98ms CodeModel.GetById 53ms app.highlight 40ms RepoModel.GetById 1ms app.codeStats 0ms

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

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