This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 211836
Collapse All | Expand All

(-)a/core.windows/src/org/netbeans/core/windows/view/EditorView.java (+5 lines)
Lines 410-415 Link Here
410
        public boolean supportsKind(TopComponentDraggable transfer) {
410
        public boolean supportsKind(TopComponentDraggable transfer) {
411
            return true;
411
            return true;
412
        }
412
        }
413
414
        @Override
415
        public int getKind() {
416
            return Constants.MODE_KIND_EDITOR;
417
        }
413
        
418
        
414
    } // End of EditorAreaComponent class.
419
    } // End of EditorAreaComponent class.
415
    
420
    
(-)a/core.windows/src/org/netbeans/core/windows/view/dnd/DropTargetGlassPane.java (-1 / +6 lines)
Lines 274-286 Link Here
274
    }
274
    }
275
275
276
    private TexturePaint texturePaint;
276
    private TexturePaint texturePaint;
277
    private int modeKind = -1;
277
    private TexturePaint getIndicationPaint() {
278
    private TexturePaint getIndicationPaint() {
278
        if( null == texturePaint ) {
279
        if (droppable != null && droppable.getKind() != modeKind) {
279
            BufferedImage image = new BufferedImage(2,2,BufferedImage.TYPE_INT_ARGB);
280
            BufferedImage image = new BufferedImage(2,2,BufferedImage.TYPE_INT_ARGB);
280
            Graphics2D g2 = image.createGraphics();
281
            Graphics2D g2 = image.createGraphics();
281
            Color c = UIManager.getColor("Panel.dropTargetGlassPane");
282
            Color c = UIManager.getColor("Panel.dropTargetGlassPane");
282
            if (c == null) {
283
            if (c == null) {
283
                c = new Color(255, 90, 0);
284
                c = new Color(255, 90, 0);
285
                if (droppable.getKind() == Constants.MODE_KIND_EDITOR) {
286
                    c = new Color(90, 255, 0);
287
                }
284
            }
288
            }
285
            g2.setColor(c);
289
            g2.setColor(c);
286
            g2.fillRect(0,0,1,1);
290
            g2.fillRect(0,0,1,1);
Lines 290-295 Link Here
290
            g2.fillRect(1,0,1,1);
294
            g2.fillRect(1,0,1,1);
291
            g2.fillRect(0,1,1,1);
295
            g2.fillRect(0,1,1,1);
292
            texturePaint = new TexturePaint(image, new Rectangle(0,0,2,2));
296
            texturePaint = new TexturePaint(image, new Rectangle(0,0,2,2));
297
            modeKind = droppable.getKind();
293
        }
298
        }
294
        return texturePaint;
299
        return texturePaint;
295
    }
300
    }
(-)a/core.windows/src/org/netbeans/core/windows/view/dnd/TopComponentDroppable.java (+6 lines)
Lines 90-93 Link Here
90
    /** Checks whether this droppable supports kind of winsys transfer.
90
    /** Checks whether this droppable supports kind of winsys transfer.
91
     * Either <code>Constants.MODE_KIND_EDITOR</code> or <code>Constants.MODE_KIND_VIEW or both. */
91
     * Either <code>Constants.MODE_KIND_EDITOR</code> or <code>Constants.MODE_KIND_VIEW or both. */
92
    public boolean supportsKind(TopComponentDraggable transfer);
92
    public boolean supportsKind(TopComponentDraggable transfer);
93
    
94
    /**
95
     * @return Mode kind of the originating mode when just a single TopComponent
96
     * is being dragged or the kind of the mode that is being dragged.
97
     */
98
    public int getKind();
93
}
99
}
(-)a/core.windows/src/org/netbeans/core/windows/view/dnd/WindowDnDManager.java (+18 lines)
Lines 1193-1198 Link Here
1193
            return transfer.getKind() == Constants.MODE_KIND_VIEW || transfer.getKind() == Constants.MODE_KIND_SLIDING;
1193
            return transfer.getKind() == Constants.MODE_KIND_VIEW || transfer.getKind() == Constants.MODE_KIND_SLIDING;
1194
        }
1194
        }
1195
1195
1196
        @Override
1197
        public int getKind() {
1198
            return Constants.MODE_KIND_VIEW;
1199
        }
1196
1200
1197
    } // End of class CenterPanelDroppable.
1201
    } // End of class CenterPanelDroppable.
1198
    
1202
    
Lines 1276-1281 Link Here
1276
            return transfer.getKind() == Constants.MODE_KIND_EDITOR;
1280
            return transfer.getKind() == Constants.MODE_KIND_EDITOR;
1277
        }
1281
        }
1278
1282
1283
        @Override
1284
        public int getKind() {
1285
            return Constants.MODE_KIND_EDITOR;
1286
        }
1279
1287
1280
    } // End of class EditorAreaDroppable.
1288
    } // End of class EditorAreaDroppable.
1281
1289
Lines 1337-1342 Link Here
1337
            return true;
1345
            return true;
1338
        }
1346
        }
1339
1347
1348
        @Override
1349
        public int getKind() {
1350
            return Constants.MODE_KIND_VIEW;
1351
        }
1352
1340
    } // End of class FreeAreaDroppable.
1353
    } // End of class FreeAreaDroppable.
1341
    
1354
    
1342
    /**
1355
    /**
Lines 1533-1538 Link Here
1533
            }
1546
            }
1534
            return rect;
1547
            return rect;
1535
        }
1548
        }
1549
1550
        @Override
1551
        public int getKind() {
1552
            return Constants.MODE_KIND_SLIDING;
1553
        }
1536
    }
1554
    }
1537
1555
1538
}
1556
}

Return to bug 211836