Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Created February 14, 2013 08:28
Show Gist options
  • Select an option

  • Save pedrofurla/4951336 to your computer and use it in GitHub Desktop.

Select an option

Save pedrofurla/4951336 to your computer and use it in GitHub Desktop.
private ReadOnlyObjectWrapper<Status> statusPropertyImpl() {
if (this.status == null) {
this.status = new ReadOnlyObjectWrapper() {
protected void invalidated() {
if (get() == MediaPlayer.Status.PLAYING)
MediaPlayer.this.setCurrentRate(MediaPlayer.this.getRate());
else
MediaPlayer.this.setCurrentRate(0.0D);
}
public Object getBean() {
return MediaPlayer.this;
}
public String getName() {
return "status";
}
};
}
return this.status;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment