- throw exception when trying to set AssetEventListener on ProjectAssetManager -> use addEventListener

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8612 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 02dc993c21
commit 3c4fa71a3c
  1. 7
      sdk/jme3-core/src/com/jme3/gde/core/assets/ProjectAssetManager.java

@ -147,8 +147,13 @@ public class ProjectAssetManager extends DesktopAssetManager {
} }
} }
@Override
public void setAssetEventListener(AssetEventListener listener) {
throw new UnsupportedOperationException("Setting the asset event listener is not allowed for ProjectAssetManager, use addAssetEventListener instead");
}
private void prepAssetEventListeners() { private void prepAssetEventListeners() {
setAssetEventListener(new AssetEventListener() { super.setAssetEventListener(new AssetEventListener() {
public void assetLoaded(AssetKey ak) { public void assetLoaded(AssetKey ak) {
for (AssetEventListener assetEventListener : assetEventListeners) { for (AssetEventListener assetEventListener : assetEventListeners) {

Loading…
Cancel
Save