boolean consumed;
if (listeners.length > 0)
{
VideoEvent event
= new VideoEvent(this, type, visualComponent, origin);
for (VideoListener listener : listeners)
switch (type)
{
case VideoEvent.VIDEO_ADDED:
listener.videoAdded(event);
break;
case VideoEvent.VIDEO_REMOVED:
listener.videoRemoved(event);
break;
default:
throw new IllegalArgumentException("type");
}
consumed = event.isConsumed();
}
else
consumed = false;
return consumed;
}