Replace tabs with spaces
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import com.dt.iTunesController.iTunes;
|
||||
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
iTunes iTunes = new iTunes();
|
||||
iTunes.connect();
|
||||
iTunes.playPause();
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
iTunes iTunes = new iTunes();
|
||||
iTunes.connect();
|
||||
iTunes.playPause();
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ public class ITArtwork extends ITObject {
|
||||
return ITArtworkFormat.values()[Dispatch.get(object, "Format").getInt()];
|
||||
}
|
||||
|
||||
// TODO: Comments
|
||||
// TODO: Comments
|
||||
|
||||
public boolean getIsDownloadedArtwork() {
|
||||
return Dispatch.get(object, "IsDownloadedArtwork").getBoolean();
|
||||
|
||||
@@ -6,8 +6,8 @@ package com.dt.iTunesController;
|
||||
* @version 0.2
|
||||
*/
|
||||
public enum ITArtworkFormat {
|
||||
ITArtworkFormatUnknown,
|
||||
ITArtworkFormatJPEG,
|
||||
ITArtworkFormatPNG,
|
||||
ITArtworkFormatBMP;
|
||||
ITArtworkFormatUnknown,
|
||||
ITArtworkFormatJPEG,
|
||||
ITArtworkFormatPNG,
|
||||
ITArtworkFormatBMP;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ITBrowserWindow extends ITWindow {
|
||||
return Dispatch.get(object, "MiniPlayer").getBoolean();
|
||||
}
|
||||
|
||||
// TODO: Comments
|
||||
// TODO: Comments
|
||||
|
||||
public ITTrackCollection getSelectedTracks() {
|
||||
Dispatch collection = Dispatch.call(object, "SelectedTracks").getDispatch();
|
||||
@@ -38,7 +38,7 @@ public class ITBrowserWindow extends ITWindow {
|
||||
}
|
||||
|
||||
public void setSelectedPlaylist(ITPlaylist playlist) {
|
||||
Dispatch dispatchRef = playlist.fetchDispatch();
|
||||
Dispatch dispatchRef = playlist.fetchDispatch();
|
||||
Dispatch.put(object, "SelectedPlaylist", dispatchRef);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ package com.dt.iTunesController;
|
||||
*/
|
||||
public class ITObjectPersistentID {
|
||||
|
||||
private long High;
|
||||
private long Low;
|
||||
private String hexString;
|
||||
private long High;
|
||||
private long Low;
|
||||
private String hexString;
|
||||
|
||||
/**
|
||||
* Create the ITObjectPersistentID. This class is not intended to be created
|
||||
@@ -21,33 +21,33 @@ public class ITObjectPersistentID {
|
||||
* @param high The High Persistent ID
|
||||
* @param low The Low Persistent ID
|
||||
*/
|
||||
public ITObjectPersistentID(long high, long low) {
|
||||
this.High=high;
|
||||
this.Low=low;
|
||||
this.hexString = String.format("%8s%8s",Long.toHexString(this.High),Long.toHexString(this.Low)).toUpperCase().replace(' ','0');
|
||||
}
|
||||
public ITObjectPersistentID(long high, long low) {
|
||||
this.High=high;
|
||||
this.Low=low;
|
||||
this.hexString = String.format("%8s%8s",Long.toHexString(this.High),Long.toHexString(this.Low)).toUpperCase().replace(' ','0');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the high persistent ID.
|
||||
* @return The high persistent ID.
|
||||
*/
|
||||
public long getHigh() {
|
||||
return this.High;
|
||||
}
|
||||
public long getHigh() {
|
||||
return this.High;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the low persistent ID.
|
||||
* @return The low persistent ID.
|
||||
*/
|
||||
public long getLow() {
|
||||
return this.Low;
|
||||
}
|
||||
public long getLow() {
|
||||
return this.Low;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a string representation (in hex) of the persistent IDs.
|
||||
* @return String representation of the persistent IDs.
|
||||
*/
|
||||
public String toString() {
|
||||
return this.hexString;
|
||||
}
|
||||
public String toString() {
|
||||
return this.hexString;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,14 +42,14 @@ public class ITTrackCollection {
|
||||
Dispatch item = Dispatch.call(object, "Item", index).toDispatch();
|
||||
ITTrack track = new ITTrack(item);
|
||||
if (track.getKind()==ITTrackKind.ITTrackKindFile) {
|
||||
return new ITFileOrCDTrack(item);
|
||||
return new ITFileOrCDTrack(item);
|
||||
} else if (track.getKind()==ITTrackKind.ITTrackKindCD) {
|
||||
return new ITFileOrCDTrack(item);
|
||||
return new ITFileOrCDTrack(item);
|
||||
} else if (track.getKind()==ITTrackKind.ITTrackKindURL ) {
|
||||
return new ITURLTrack(item);
|
||||
return new ITURLTrack(item);
|
||||
} else {
|
||||
return track;
|
||||
}
|
||||
return track;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,8 +6,8 @@ package com.dt.iTunesController;
|
||||
* @version 0.2
|
||||
*/
|
||||
public enum ITVideoKind {
|
||||
ITVideoKindNone,
|
||||
ITVideoKindMovie,
|
||||
ITVideoKindMusicVideo,
|
||||
ITVideoKindTVShow;
|
||||
ITVideoKindNone,
|
||||
ITVideoKindMovie,
|
||||
ITVideoKindMusicVideo,
|
||||
ITVideoKindTVShow;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class ITWindowCollection {
|
||||
object = d;
|
||||
}
|
||||
|
||||
// TODO: iTunes.getWindows()
|
||||
// TODO: iTunes.getWindows()
|
||||
|
||||
/**
|
||||
* Returns the number of playlists in the collection.
|
||||
|
||||
@@ -413,14 +413,14 @@ public class iTunes {
|
||||
Dispatch item = iTunes.getProperty("CurrentTrack").toDispatch();
|
||||
ITTrack track = new ITTrack(item);
|
||||
if (track.getKind()==ITTrackKind.ITTrackKindFile) {
|
||||
return new ITFileOrCDTrack(item);
|
||||
return new ITFileOrCDTrack(item);
|
||||
} else if (track.getKind()==ITTrackKind.ITTrackKindCD) {
|
||||
return new ITFileOrCDTrack(item);
|
||||
return new ITFileOrCDTrack(item);
|
||||
} else if (track.getKind()==ITTrackKind.ITTrackKindURL ) {
|
||||
return new ITURLTrack(item);
|
||||
return new ITURLTrack(item);
|
||||
} else {
|
||||
return track;
|
||||
}
|
||||
return track;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -493,12 +493,12 @@ public class iTunes {
|
||||
}
|
||||
|
||||
public ITObjectPersistentID getObjectPersistentIDs(ITObject iObject){
|
||||
return new ITObjectPersistentID(getITObjectPersistentIDHigh(iObject),getITObjectPersistentIDLow(iObject));
|
||||
return new ITObjectPersistentID(getITObjectPersistentIDHigh(iObject),getITObjectPersistentIDLow(iObject));
|
||||
}
|
||||
|
||||
public ITBrowserWindow getBrowserWindow(){
|
||||
Dispatch window = iTunes.getProperty("BrowserWindow").toDispatch();
|
||||
return new ITBrowserWindow(window);
|
||||
return new ITBrowserWindow(window);
|
||||
}
|
||||
|
||||
public void cycleSongRepeat() {
|
||||
|
||||
Reference in New Issue
Block a user