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 |
} |