< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -768,76 +768,67 @@
 {
     // If draggingSource is nil route the message to the superclass (if responding to the selector):
     CDragSource *dragSource = self._dragSource;
     NSDragOperation dragOp = NSDragOperationNone;
     
-    if (dragSource != nil)
+    if (dragSource != nil) {
         dragOp = [dragSource draggingSourceOperationMaskForLocal:flag];
-    else if ([super respondsToSelector:@selector(draggingSourceOperationMaskForLocal:)])
-        dragOp = [super draggingSourceOperationMaskForLocal:flag];
-    
+    }
     return dragOp;
 }
 
 - (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
 {
     // If draggingSource is nil route the message to the superclass (if responding to the selector):
     CDragSource *dragSource = self._dragSource;
     NSArray* array = nil;
     
-    if (dragSource != nil)
+    if (dragSource != nil) {
         array = [dragSource namesOfPromisedFilesDroppedAtDestination:dropDestination];
-    else if ([super respondsToSelector:@selector(namesOfPromisedFilesDroppedAtDestination:)])
-        array = [super namesOfPromisedFilesDroppedAtDestination:dropDestination];
-    
+    }
     return array;
 }
 
 - (void)draggedImage:(NSImage *)image beganAt:(NSPoint)screenPoint
 {
     // If draggingSource is nil route the message to the superclass (if responding to the selector):
     CDragSource *dragSource = self._dragSource;
     
-    if (dragSource != nil)
+    if (dragSource != nil) {
         [dragSource draggedImage:image beganAt:screenPoint];
-    else if ([super respondsToSelector:@selector(draggedImage::)])
-        [super draggedImage:image beganAt:screenPoint];
+    }
 }
 
 - (void)draggedImage:(NSImage *)image endedAt:(NSPoint)screenPoint operation:(NSDragOperation)operation
 {
     // If draggingSource is nil route the message to the superclass (if responding to the selector):
     CDragSource *dragSource = self._dragSource;
     
-    if (dragSource != nil)
+    if (dragSource != nil) {
         [dragSource draggedImage:image endedAt:screenPoint operation:operation];
-    else if ([super respondsToSelector:@selector(draggedImage:::)])
-        [super draggedImage:image endedAt:screenPoint operation:operation];
+    }
 }
 
 - (void)draggedImage:(NSImage *)image movedTo:(NSPoint)screenPoint
 {
     // If draggingSource is nil route the message to the superclass (if responding to the selector):
     CDragSource *dragSource = self._dragSource;
     
-    if (dragSource != nil)
+    if (dragSource != nil) {
         [dragSource draggedImage:image movedTo:screenPoint];
-    else if ([super respondsToSelector:@selector(draggedImage::)])
-        [super draggedImage:image movedTo:screenPoint];
+    }
 }
 
 - (BOOL)ignoreModifierKeysWhileDragging
 {
     // If draggingSource is nil route the message to the superclass (if responding to the selector):
     CDragSource *dragSource = self._dragSource;
     BOOL result = FALSE;
     
-    if (dragSource != nil)
+    if (dragSource != nil) {
         result = [dragSource ignoreModifierKeysWhileDragging];
-    else if ([super respondsToSelector:@selector(ignoreModifierKeysWhileDragging)])
-        result = [super ignoreModifierKeysWhileDragging];
-    
+    }
     return result;
 }
 
 /********************************  END NSDraggingSource Interface  ********************************/
 

@@ -847,91 +838,80 @@
 {
     // If draggingDestination is nil route the message to the superclass:
     CDropTarget *dropTarget = self._dropTarget;
     NSDragOperation dragOp = NSDragOperationNone;
     
-    if (dropTarget != nil)
+    if (dropTarget != nil) {
         dragOp = [dropTarget draggingEntered:sender];
-    else if ([super respondsToSelector:@selector(draggingEntered:)])
-        dragOp = [super draggingEntered:sender];
-    
+    }
     return dragOp;
 }
 
 - (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
 {
     // If draggingDestination is nil route the message to the superclass:
     CDropTarget *dropTarget = self._dropTarget;
     NSDragOperation dragOp = NSDragOperationNone;
     
-    if (dropTarget != nil)
+    if (dropTarget != nil) {
         dragOp = [dropTarget draggingUpdated:sender];
-    else if ([super respondsToSelector:@selector(draggingUpdated:)])
-        dragOp = [super draggingUpdated:sender];
-    
+    }
     return dragOp;
 }
 
 - (void)draggingExited:(id <NSDraggingInfo>)sender
 {
     // If draggingDestination is nil route the message to the superclass:
     CDropTarget *dropTarget = self._dropTarget;
     
-    if (dropTarget != nil)
+    if (dropTarget != nil) {
         [dropTarget draggingExited:sender];
-    else if ([super respondsToSelector:@selector(draggingExited:)])
-        [super draggingExited:sender];
+    }
 }
 
 - (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
 {
     // If draggingDestination is nil route the message to the superclass:
     CDropTarget *dropTarget = self._dropTarget;
     BOOL result = FALSE;
     
-    if (dropTarget != nil)
+    if (dropTarget != nil) {
         result = [dropTarget prepareForDragOperation:sender];
-    else if ([super respondsToSelector:@selector(prepareForDragOperation:)])
-        result = [super prepareForDragOperation:sender];
-    
+    }
     return result;
 }
 
 - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
 {
     // If draggingDestination is nil route the message to the superclass:
     CDropTarget *dropTarget = self._dropTarget;
     BOOL result = FALSE;
     
-    if (dropTarget != nil)
+    if (dropTarget != nil) {
         result = [dropTarget performDragOperation:sender];
-    else if ([super respondsToSelector:@selector(performDragOperation:)])
-        result = [super performDragOperation:sender];
-    
+    }
     return result;
 }
 
 - (void)concludeDragOperation:(id <NSDraggingInfo>)sender
 {
     // If draggingDestination is nil route the message to the superclass:
     CDropTarget *dropTarget = self._dropTarget;
     
-    if (dropTarget != nil)
+    if (dropTarget != nil) {
         [dropTarget concludeDragOperation:sender];
-    else if ([super respondsToSelector:@selector(concludeDragOperation:)])
-        [super concludeDragOperation:sender];
+    }
 }
 
 - (void)draggingEnded:(id <NSDraggingInfo>)sender
 {
     // If draggingDestination is nil route the message to the superclass:
     CDropTarget *dropTarget = self._dropTarget;
     
-    if (dropTarget != nil)
+    if (dropTarget != nil) {
         [dropTarget draggingEnded:sender];
-    else if ([super respondsToSelector:@selector(draggingEnded:)])
-        [super draggingEnded:sender];
+    }
 }
 
 /********************************  END NSDraggingDestination Interface  ********************************/
 
 /********************************  BEGIN NSTextInputClient Protocol  ********************************/
< prev index next >