881 // layout is active.
882 if (Toolkit.getDefaultToolkit().isDynamicLayoutActive()) {
883 w.validate();
884 getRootPane().repaint();
885 }
886 }
887 }
888 }
889
890 public void mouseEntered(MouseEvent ev) {
891 Window w = (Window)ev.getSource();
892 lastCursor = w.getCursor();
893 mouseMoved(ev);
894 }
895
896 public void mouseExited(MouseEvent ev) {
897 Window w = (Window)ev.getSource();
898 w.setCursor(lastCursor);
899 }
900
901 public void mouseClicked(MouseEvent ev) {
902 Window w = (Window)ev.getSource();
903 Frame f = null;
904
905 if (w instanceof Frame) {
906 f = (Frame)w;
907 } else {
908 return;
909 }
910
911 Point convertedPoint = SwingUtilities.convertPoint(
912 w, ev.getPoint(), getTitlePane());
913
914 int state = f.getExtendedState();
915 if (getTitlePane() != null &&
916 getTitlePane().contains(convertedPoint)) {
917 if ((ev.getClickCount() % 2) == 0 &&
918 ((ev.getModifiers() & InputEvent.BUTTON1_MASK) != 0)) {
919 if (f.isResizable()) {
920 if ((state & Frame.MAXIMIZED_BOTH) != 0) {
|
881 // layout is active.
882 if (Toolkit.getDefaultToolkit().isDynamicLayoutActive()) {
883 w.validate();
884 getRootPane().repaint();
885 }
886 }
887 }
888 }
889
890 public void mouseEntered(MouseEvent ev) {
891 Window w = (Window)ev.getSource();
892 lastCursor = w.getCursor();
893 mouseMoved(ev);
894 }
895
896 public void mouseExited(MouseEvent ev) {
897 Window w = (Window)ev.getSource();
898 w.setCursor(lastCursor);
899 }
900
901 @SuppressWarnings("deprecation")
902 public void mouseClicked(MouseEvent ev) {
903 Window w = (Window)ev.getSource();
904 Frame f = null;
905
906 if (w instanceof Frame) {
907 f = (Frame)w;
908 } else {
909 return;
910 }
911
912 Point convertedPoint = SwingUtilities.convertPoint(
913 w, ev.getPoint(), getTitlePane());
914
915 int state = f.getExtendedState();
916 if (getTitlePane() != null &&
917 getTitlePane().contains(convertedPoint)) {
918 if ((ev.getClickCount() % 2) == 0 &&
919 ((ev.getModifiers() & InputEvent.BUTTON1_MASK) != 0)) {
920 if (f.isResizable()) {
921 if ((state & Frame.MAXIMIZED_BOTH) != 0) {
|