DGR dgr = new DGR();
dgr.setComponent(null);
trigger = new DragGestureEvent(dgr, DnDConstants.ACTION_COPY,
new Point(), new ArrayList());
peer = Toolkit.getDefaultToolkit().createDragSourceContextPeer(trigger);
new DragSourceContext(peer, trigger, cur,
new BufferedImage(50, 50,
BufferedImage.TYPE_3BYTE_BGR),
new Point(), ss, null);
}
catch (IllegalArgumentException iae)
{
caught = true;
}
harness.check(caught);
caught = false;
try
{
DGR dgr = new DGR(null);
trigger = new DragGestureEvent(dgr, DnDConstants.ACTION_COPY,
new Point(), new ArrayList());
peer = Toolkit.getDefaultToolkit().createDragSourceContextPeer(trigger);
new DragSourceContext(peer, trigger, cur,
new BufferedImage(50, 50,
BufferedImage.TYPE_3BYTE_BGR),
new Point(), ss, null);
}
catch (IllegalArgumentException iae)
{
caught = true;
}
harness.check(caught);
caught = false;
try
{
DGR dgr = new DGR();
trigger = new DragGestureEvent(dgr, DnDConstants.ACTION_NONE,
new Point(), new ArrayList());
peer = Toolkit.getDefaultToolkit().createDragSourceContextPeer(trigger);
new DragSourceContext(peer, trigger, cur,
new BufferedImage(50, 50,
BufferedImage.TYPE_3BYTE_BGR),
new Point(), ss, null);
}
catch (IllegalArgumentException iae)