Package com.jitcaforwin.extended.api.track

Examples of com.jitcaforwin.extended.api.track.Track


  public Track addFile(File file) throws JitcaException {
    try {
      IITOperationStatus addOperationStatus = this.itLibrary.addFile(file);
      addOperationStatus.waitForCompletion();
      TrackCollectionImpl tracks = new TrackCollectionImpl(this, addOperationStatus.getTracks());
      Track newTrack = tracks.getFirst();
      this.addTrack(newTrack);
      return newTrack;
    } catch (PlaylistDeletedException e) {
      throw new ITObjectDeletedError(this);
    } catch (PlaylistReadOnlyException e) {
View Full Code Here


    if (itTrackCollection == null) {
      return; // ITTrackCollection is empty
    }
    try {
      for (int i = 1; i < itTrackCollection.getCount() + 1; i++) {
        Track track = this.trackFactory.getTrack(itTrackCollection.itemByPlayOrder(i));
        this.add(track, i - 1);
      }
    } catch (PlaylistDeletedException e) {
      throw new JitcaUnexpectedError();
    } catch (ObjectDeletedException e) {
View Full Code Here

   */
  public Track getTrack(IITTrack itTrack) {
    try {
      if (itTrack == null)
        return null;
      Track track = this.tracks.get(itTrack.getTrackDatabaseID());

      if (track == null) {
        track = this.createTrack(itTrack);
      }
      return track;
View Full Code Here

   */
  public Track getTrack(IITTrack itTrack) {
    try {
      if (itTrack == null)
        return null;
      Track track = this.tracks.get(itTrack.getTrackDatabaseID());

      if (track == null) {
        track = this.createTrack(itTrack);
      }
      return track;
View Full Code Here

  public Track addFile(File file) throws JitcaException {
    try {
      IITOperationStatus addOperationStatus = this.itLibrary.addFile(file);
      addOperationStatus.waitForCompletion();
      TrackCollectionImpl tracks = new TrackCollectionImpl(this, addOperationStatus.getTracks());
      Track newTrack = tracks.getFirst();
      this.addTrack(newTrack);
      return newTrack;
    } catch (PlaylistDeletedException e) {
      throw new ITObjectDeletedError(this);
    } catch (PlaylistReadOnlyException e) {
View Full Code Here

public class CurrentTrackDemo {
  public static void main(String args[]) {
    try {
      IJitcaITunesController iTunes = new JitcaiTunesController(true);
      Track track = iTunes.getPlayerController().currentTrack();

      if (track == null) {
        System.out.println("Currently no track played!");
      } else {
        System.out.println(track.getTitle() + " by " + track.getArtist()
            + " is currently played. \n");
        ;
      }

      iTunes.close();
View Full Code Here

    Artist memberB = ArtistImpl.create("MemberB", sourceMock);
   
    ((GroupArtist) group).addArtist(memberA);
    ((GroupArtist) group).addArtist(memberB);
   
    Track trackMockA = EasyMock.createMock(Track.class);
    group.addTrack(trackMockA);
   
    assertTrue(group.getTracks().contains(trackMockA));
    assertTrue(memberA.getTracks().contains(trackMockA));
    assertTrue(memberB.getTracks().contains(trackMockA));
   
    Track trackMockB = EasyMock.createMock(Track.class);
    group.addTrackAsComposer(trackMockB);
   
    assertTrue(group.getTracksAsComposer().contains(trackMockB));
    assertTrue(memberA.getTracksAsComposer().contains(trackMockB));
    assertTrue(memberB.getTracksAsComposer().contains(trackMockB));
View Full Code Here

import com.jitcaforwin.id3.exceptions.ID3TagException;

public class ID3Tags {
  public static void main(String args[]) {
    IJitcaITunesController iTunes = new JitcaiTunesController(true);
    Track track = iTunes.getPlayerController().currentTrack();

    if (track == null) {
      System.out.println("Currently no track played!");
    } else {
      if (track.isFileOrCDTrack()) {
        System.out.println("Content of the ID3Tags for the currently placyed track:");
        try {
          ID3Tag id3 = ((FileOrCDTrack) track).getID3Tag();
          System.out.println("Song Title: " + id3.getSongTitle());
          System.out.println("Artist Name: " + id3.getArtistName());
View Full Code Here

TOP

Related Classes of com.jitcaforwin.extended.api.track.Track

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.