Added public remove() method, which is now required by Updatable interface.

This commit is contained in:
hns 2002-10-01 15:53:51 +00:00
parent 52739414bd
commit 7799423ae5
2 changed files with 19 additions and 6 deletions

View file

@ -69,10 +69,7 @@ public final class SkinFile implements Updatable {
if (!file.exists ()) {
// remove skin from prototype
if (prototype != null) {
prototype.skins.remove (name);
prototype.updatables.remove (file.getName());
}
remove ();
} else {
// we only need to update if the skin has already been initialized
if (skin != null)
@ -90,10 +87,19 @@ public final class SkinFile implements Updatable {
} catch (IOException x) {
app.logEvent ("Error reading Skin "+file+": "+x);
}
lastmod = file.lastModified ();
}
public void remove () {
if (prototype != null) {
prototype.skins.remove (name);
if (file != null)
prototype.updatables.remove (file.getName());
}
}
public Skin getSkin () {
if (skin == null)
read ();
@ -103,7 +109,7 @@ public final class SkinFile implements Updatable {
public String getName () {
return name;
}
public String toString () {
return prototype.getName()+"/"+file.getName();
}

View file

@ -237,6 +237,13 @@ public final class DbMapping implements Updatable {
}
/**
* Method in interface Updatable.
*/
public void remove () {
// do nothing, removing of type properties is not implemented.
}
/**
* Get a JDBC connection for this DbMapping.
*/