adb4d68055
* AbstractSearchPanel (used in SubtitlePanel only so far) * started using GlazedLists * replaced searchtextfield with customized combobox (will be used for completion in the future) * renamed FileFormat to FileUtil and move to tuned * removed ESC shortcut
45 lines
796 B
Java
45 lines
796 B
Java
|
|
package net.sourceforge.tuned.ui;
|
|
|
|
|
|
import java.beans.PropertyChangeEvent;
|
|
import java.beans.PropertyChangeListener;
|
|
|
|
import javax.swing.SwingWorker.StateValue;
|
|
|
|
|
|
public abstract class SwingWorkerPropertyChangeAdapter implements PropertyChangeListener {
|
|
|
|
public void propertyChange(PropertyChangeEvent evt) {
|
|
if (evt.getPropertyName().equals("progress"))
|
|
progress(evt);
|
|
else if (evt.getPropertyName().equals("state"))
|
|
state(evt);
|
|
}
|
|
|
|
|
|
public void state(PropertyChangeEvent evt) {
|
|
switch ((StateValue) evt.getNewValue()) {
|
|
case STARTED:
|
|
started(evt);
|
|
break;
|
|
case DONE:
|
|
done(evt);
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
public void progress(PropertyChangeEvent evt) {
|
|
}
|
|
|
|
|
|
public void started(PropertyChangeEvent evt) {
|
|
}
|
|
|
|
|
|
public void done(PropertyChangeEvent evt) {
|
|
}
|
|
|
|
}
|