X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2FProgress.java;h=bea57845bcefaf4a8fd336d8e284750ae8488f8c;hp=b31cde49456174ef5fd5487f2feab00324a451f6;hb=2998b78ae098aff12c0f8cfad2a6bc5303bb33e0;hpb=88b36f83bb4bb9201339432c97e6d826aa9e1903 diff --git a/src/be/nikiroo/utils/Progress.java b/src/be/nikiroo/utils/Progress.java index b31cde4..bea5784 100644 --- a/src/be/nikiroo/utils/Progress.java +++ b/src/be/nikiroo/utils/Progress.java @@ -93,6 +93,18 @@ public class Progress { return name; } + /** + * The name of this {@link Progress} step. + * + * @param name + * the new name + */ + public void setName(String name) { + this.name = name; + // will fire an action event: + setProgress(this.localProgress); + } + /** * The minimum progress value. * @@ -253,6 +265,18 @@ public class Progress { this.listeners.add(l); } + /** + * Remove a {@link ProgressListener} that would trigger on progress changes. + * + * @param l + * the listener + * + * @return TRUE if it was found (and removed) + */ + public boolean removeProgressListener(ProgressListener l) { + return this.listeners.remove(l); + } + /** * Add a child {@link Progress} of the given weight. *