822 * Have Win32GraphicsEnvironment execute the display change code on the 823 * Event thread. 824 */ 825 static public void displayChanged() { 826 EventQueue.invokeLater(new Runnable() { 827 @Override 828 public void run() { 829 ((Win32GraphicsEnvironment)GraphicsEnvironment 830 .getLocalGraphicsEnvironment()) 831 .displayChanged(); 832 } 833 }); 834 } 835 836 /** 837 * create the peer for a DragSourceContext 838 */ 839 840 @Override 841 public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException { 842 return WDragSourceContextPeer.createDragSourceContextPeer(dge); 843 } 844 845 @Override 846 @SuppressWarnings("unchecked") 847 public <T extends DragGestureRecognizer> T 848 createDragGestureRecognizer(Class<T> abstractRecognizerClass, 849 DragSource ds, Component c, int srcActions, 850 DragGestureListener dgl) 851 { 852 if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass)) 853 return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl); 854 else 855 return null; 856 } 857 858 /** 859 * 860 */ 861 862 private static final String prefix = "DnD.Cursor."; 863 private static final String postfix = ".32x32"; 864 private static final String awtPrefix = "awt."; 865 private static final String dndPrefix = "DnD."; 866 867 @Override 868 protected Object lazilyLoadDesktopProperty(String name) { 869 if (name.startsWith(prefix)) { 870 String cursorName = name.substring(prefix.length(), name.length()) + postfix; 871 | 822 * Have Win32GraphicsEnvironment execute the display change code on the 823 * Event thread. 824 */ 825 static public void displayChanged() { 826 EventQueue.invokeLater(new Runnable() { 827 @Override 828 public void run() { 829 ((Win32GraphicsEnvironment)GraphicsEnvironment 830 .getLocalGraphicsEnvironment()) 831 .displayChanged(); 832 } 833 }); 834 } 835 836 /** 837 * create the peer for a DragSourceContext 838 */ 839 840 @Override 841 public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException { 842 final LightweightFrame f = SunToolkit.getLightweightFrame(dge.getComponent()); 843 if (f != null) { 844 return f.createDragSourceContextPeer(dge); 845 } 846 847 return WDragSourceContextPeer.createDragSourceContextPeer(dge); 848 } 849 850 @Override 851 @SuppressWarnings("unchecked") 852 public <T extends DragGestureRecognizer> T 853 createDragGestureRecognizer(Class<T> abstractRecognizerClass, 854 DragSource ds, Component c, int srcActions, 855 DragGestureListener dgl) 856 { 857 final LightweightFrame f = SunToolkit.getLightweightFrame(c); 858 if (f != null) { 859 return f.createDragGestureRecognizer(abstractRecognizerClass, ds, c, srcActions, dgl); 860 } 861 862 if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass)) 863 return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl); 864 else 865 return null; 866 } 867 868 /** 869 * 870 */ 871 872 private static final String prefix = "DnD.Cursor."; 873 private static final String postfix = ".32x32"; 874 private static final String awtPrefix = "awt."; 875 private static final String dndPrefix = "DnD."; 876 877 @Override 878 protected Object lazilyLoadDesktopProperty(String name) { 879 if (name.startsWith(prefix)) { 880 String cursorName = name.substring(prefix.length(), name.length()) + postfix; 881 |