Added missing project files

Updated whitespace
This commit is contained in:
Tom Lint 2014-01-10 13:58:21 +01:00
parent 309f7d2a3a
commit a1dc59f2ba
10 changed files with 236 additions and 153 deletions

17
JavaXNA Test/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>JavaXNA Test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Microsoft.Xna.Framework.Game</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Microsoft.Xna.Framework</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -30,6 +30,7 @@ public final class Album implements IEquatable<Album>, IDisposable
{ {
} }
return this.artist; return this.artist;
} }
@ -73,10 +74,12 @@ public final class Album implements IEquatable<Album>, IDisposable
{ {
this.isDisposed = true; this.isDisposed = true;
// TODO: implement // TODO: implement
if (false) if (false)
{ {
} }
songs = SongCollection.Empty; songs = SongCollection.Empty;
} }
} }
@ -118,10 +121,12 @@ public final class Album implements IEquatable<Album>, IDisposable
public int hashCode() public int hashCode()
{ {
ThrowIfDisposed(); ThrowIfDisposed();
if (this.hashcode == -1) if (this.hashcode == -1)
{ {
this.hashcode = this.name.hashCode(); this.hashcode = this.name.hashCode();
} }
return this.hashcode; return this.hashcode;
} }

View File

@ -116,8 +116,10 @@ public final class Artist implements IEquatable<Artist>, IDisposable
private void ThrowIfDisposed() private void ThrowIfDisposed()
{ {
if (this.isDisposed) if (this.isDisposed)
{
throw new ObjectDisposedException(super.toString(), "This object has already been disposed."); throw new ObjectDisposedException(super.toString(), "This object has already been disposed.");
} }
}
/** /**
* Returns a String representation of the Artist. * Returns a String representation of the Artist.

View File

@ -28,27 +28,33 @@ public class MediaPlayer
*/ */
public static void MoveNext() public static void MoveNext()
{ {
if (!ActiveSongChanged.getHandlers().isEmpty()) if (!ActiveSongChanged.hasHandlers())
{
ActiveSongChanged.raise(null, EventArgs.Empty); ActiveSongChanged.raise(null, EventArgs.Empty);
} }
}
/** /**
* *
*/ */
public static void MovePrevious() public static void MovePrevious()
{ {
if (!ActiveSongChanged.getHandlers().isEmpty()) if (!ActiveSongChanged.hasHandlers())
{
ActiveSongChanged.raise(null, EventArgs.Empty); ActiveSongChanged.raise(null, EventArgs.Empty);
} }
}
/** /**
* *
*/ */
public static void Pause() public static void Pause()
{ {
if (!MediaStateChanged.getHandlers().isEmpty()) if (!MediaStateChanged.hasHandlers())
{
MediaStateChanged.raise(null, EventArgs.Empty); MediaStateChanged.raise(null, EventArgs.Empty);
} }
}
/** /**
* *
@ -83,18 +89,22 @@ public class MediaPlayer
*/ */
public static void Resume() public static void Resume()
{ {
if (!MediaStateChanged.getHandlers().isEmpty()) if (!MediaStateChanged.hasHandlers())
{
MediaStateChanged.raise(null, EventArgs.Empty); MediaStateChanged.raise(null, EventArgs.Empty);
} }
}
/** /**
* *
*/ */
public static void Stop() public static void Stop()
{ {
if (!MediaStateChanged.getHandlers().isEmpty()) if (!MediaStateChanged.hasHandlers())
{
MediaStateChanged.raise(null, EventArgs.Empty); MediaStateChanged.raise(null, EventArgs.Empty);
} }
}
static static
{ {

View File

@ -23,17 +23,17 @@ public final class Song implements IEquatable<Song>, IDisposable
} }
private void Dispose(boolean disposing)
{
}
@Override @Override
public void Dispose() public void Dispose()
{ {
this.Dispose(true); this.Dispose(true);
} }
private void Dispose(boolean disposing)
{
}
/** /**
* *
*/ */
@ -82,8 +82,10 @@ public final class Song implements IEquatable<Song>, IDisposable
private void ThrowIfDisposed() private void ThrowIfDisposed()
{ {
if (this.isDisposed) if (this.isDisposed)
{
throw new ObjectDisposedException(this.toString(), "This object has already been disposed."); throw new ObjectDisposedException(this.toString(), "This object has already been disposed.");
} }
}
@Override @Override
public String toString() public String toString()

View File

@ -191,6 +191,7 @@ public abstract class KeyedCollection<TKey, TItem> extends Collection<TItem>
} }
} }
} }
return false; return false;
} }
@ -198,10 +199,12 @@ public abstract class KeyedCollection<TKey, TItem> extends Collection<TItem>
{ {
TKey local; TKey local;
TItem local2; TItem local2;
if ((this.dict != null) || ((local = this.GetKeyForItem(item)) != null)) if ((this.dict != null) || ((local = this.GetKeyForItem(item)) != null))
{ {
return super.getItems().contains(item); return super.getItems().contains(item);
} }
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -216,10 +219,12 @@ public abstract class KeyedCollection<TKey, TItem> extends Collection<TItem>
protected void InsertItem(int index, TItem item) protected void InsertItem(int index, TItem item)
{ {
TKey keyForItem = this.GetKeyForItem(item); TKey keyForItem = this.GetKeyForItem(item);
if (keyForItem != null) if (keyForItem != null)
{ {
this.AddKey(keyForItem, item); this.AddKey(keyForItem, item);
} }
super.InsertItem(index, item); super.InsertItem(index, item);
} }
@ -229,10 +234,12 @@ public abstract class KeyedCollection<TKey, TItem> extends Collection<TItem>
{ {
throw new ArgumentNullException("key"); throw new ArgumentNullException("key");
} }
if (this.dict != null) if (this.dict != null)
{ {
return (this.dict.containsKey(key) && super.Remove(this.dict.get(key))); return (this.dict.containsKey(key) && super.Remove(this.dict.get(key)));
} }
if (key != null) if (key != null)
{ {
for (int i = 0; i < super.getItems().size(); i++) for (int i = 0; i < super.getItems().size(); i++)
@ -244,6 +251,7 @@ public abstract class KeyedCollection<TKey, TItem> extends Collection<TItem>
} }
} }
} }
return false; return false;
} }
@ -251,10 +259,12 @@ public abstract class KeyedCollection<TKey, TItem> extends Collection<TItem>
protected void RemoveItem(int index) protected void RemoveItem(int index)
{ {
TKey keyForItem = this.GetKeyForItem(super.getItems().get(index)); TKey keyForItem = this.GetKeyForItem(super.getItems().get(index));
if (keyForItem != null) if (keyForItem != null)
{ {
this.RemoveKey(keyForItem); this.RemoveKey(keyForItem);
} }
super.RemoveItem(index); super.RemoveItem(index);
} }
@ -275,6 +285,7 @@ public abstract class KeyedCollection<TKey, TItem> extends Collection<TItem>
{ {
TKey keyForItem = this.GetKeyForItem(item); TKey keyForItem = this.GetKeyForItem(item);
TKey x = this.GetKeyForItem(super.getItems().get(index)); TKey x = this.GetKeyForItem(super.getItems().get(index));
if (this.comparer.equals(x, keyForItem)) if (this.comparer.equals(x, keyForItem))
{ {
if ((keyForItem != null) && (this.dict != null)) if ((keyForItem != null) && (this.dict != null))
@ -288,11 +299,13 @@ public abstract class KeyedCollection<TKey, TItem> extends Collection<TItem>
{ {
this.AddKey(keyForItem, item); this.AddKey(keyForItem, item);
} }
if (x != null) if (x != null)
{ {
this.RemoveKey(x); this.RemoveKey(x);
} }
} }
super.SetItem(index, item); super.SetItem(index, item);
} }
} }