Package uk.co.caprica.vlcj.medialist
Class MediaListEventAdapter
- java.lang.Object
-
- uk.co.caprica.vlcj.medialist.MediaListEventAdapter
-
- All Implemented Interfaces:
MediaListEventListener
public class MediaListEventAdapter extends Object implements MediaListEventListener
Default implementation of the media list event listener.Simply override the methods you're interested in.
Events are not raised on the Swing Event Dispatch thread so if updating user interface components in response to these events care must be taken to use
SwingUtilities.invokeLater(Runnable)
.Equally, care must be taken not to call back into LibVLC from the event handling thread - if an event handler needs to call back into LibVLC it should use the
MediaPlayerFactory.submit(Runnable)
method to submit a task for asynchronous execution.
-
-
Constructor Summary
Constructors Constructor Description MediaListEventAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
mediaListEndReached(MediaList mediaList)
The end of the media list was reached.void
mediaListItemAdded(MediaList mediaList, MediaRef item, int index)
A new media item was added to the list.void
mediaListItemDeleted(MediaList mediaList, MediaRef item, int index)
A new media item was deleted from the list.void
mediaListWillAddItem(MediaList mediaList, MediaRef item, int index)
A new media item will be added to the list.void
mediaListWillDeleteItem(MediaList mediaList, MediaRef item, int index)
A new media item will be deleted from the list.
-
-
-
Method Detail
-
mediaListWillAddItem
public void mediaListWillAddItem(MediaList mediaList, MediaRef item, int index)
Description copied from interface:MediaListEventListener
A new media item will be added to the list.- Specified by:
mediaListWillAddItem
in interfaceMediaListEventListener
- Parameters:
mediaList
- listitem
- media instance that will be addedindex
- index in the list at which the media instance will be added
-
mediaListItemAdded
public void mediaListItemAdded(MediaList mediaList, MediaRef item, int index)
Description copied from interface:MediaListEventListener
A new media item was added to the list.- Specified by:
mediaListItemAdded
in interfaceMediaListEventListener
- Parameters:
mediaList
- listitem
- media instance that was addedindex
- index in the list at which the media instance was added
-
mediaListWillDeleteItem
public void mediaListWillDeleteItem(MediaList mediaList, MediaRef item, int index)
Description copied from interface:MediaListEventListener
A new media item will be deleted from the list.- Specified by:
mediaListWillDeleteItem
in interfaceMediaListEventListener
- Parameters:
mediaList
- listitem
- media instance that will be deletedindex
- index in the list at which the media instance will be deleted
-
mediaListItemDeleted
public void mediaListItemDeleted(MediaList mediaList, MediaRef item, int index)
Description copied from interface:MediaListEventListener
A new media item was deleted from the list.- Specified by:
mediaListItemDeleted
in interfaceMediaListEventListener
- Parameters:
mediaList
- listitem
- media instance that was deletedindex
- index in the list at which the media instance was deleted
-
mediaListEndReached
public void mediaListEndReached(MediaList mediaList)
Description copied from interface:MediaListEventListener
The end of the media list was reached.The corresponding native event may in fact never fire.
- Specified by:
mediaListEndReached
in interfaceMediaListEventListener
- Parameters:
mediaList
- list
-
-