43
44 private XKeyboardFocusManagerPeer() {
45 }
46
47 @Override
48 public void setCurrentFocusOwner(Component comp) {
49 synchronized (this) {
50 currentFocusOwner = comp;
51 }
52 }
53
54 @Override
55 public Component getCurrentFocusOwner() {
56 synchronized(this) {
57 return currentFocusOwner;
58 }
59 }
60
61 @Override
62 public void setCurrentFocusedWindow(Window win) {
63 if (focusLog.isLoggable(PlatformLogger.FINER)) {
64 focusLog.finer("Setting current focused window " + win);
65 }
66
67 XWindowPeer from = null, to = null;
68
69 synchronized(this) {
70 if (currentFocusedWindow != null) {
71 from = (XWindowPeer)currentFocusedWindow.getPeer();
72 }
73
74 currentFocusedWindow = win;
75
76 if (currentFocusedWindow != null) {
77 to = (XWindowPeer)currentFocusedWindow.getPeer();
78 }
79 }
80
81 if (from != null) {
82 from.updateSecurityWarningVisibility();
83 }
|
43
44 private XKeyboardFocusManagerPeer() {
45 }
46
47 @Override
48 public void setCurrentFocusOwner(Component comp) {
49 synchronized (this) {
50 currentFocusOwner = comp;
51 }
52 }
53
54 @Override
55 public Component getCurrentFocusOwner() {
56 synchronized(this) {
57 return currentFocusOwner;
58 }
59 }
60
61 @Override
62 public void setCurrentFocusedWindow(Window win) {
63 if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
64 focusLog.finer("Setting current focused window " + win);
65 }
66
67 XWindowPeer from = null, to = null;
68
69 synchronized(this) {
70 if (currentFocusedWindow != null) {
71 from = (XWindowPeer)currentFocusedWindow.getPeer();
72 }
73
74 currentFocusedWindow = win;
75
76 if (currentFocusedWindow != null) {
77 to = (XWindowPeer)currentFocusedWindow.getPeer();
78 }
79 }
80
81 if (from != null) {
82 from.updateSecurityWarningVisibility();
83 }
|