transformed Plugin class to Interface with default methods

This commit is contained in:
2015-07-08 18:14:48 +02:00
parent afa4279547
commit ce0c3040a5
2 changed files with 9 additions and 9 deletions

View File

@@ -11,14 +11,14 @@ import ch.psi.utils.swing.SwingUtils;
/**
*
*/
public class TestPlugin extends Plugin{
public class TestPlugin implements Plugin{
MainPanel panel;
@Override
protected void onStart() {
public void onStart() {
panel = new MainPanel(){
protected void run(String name){
try {
TestPlugin.this.run(name);
TestPlugin.this.runAsync(name);
} catch (Exception ex) {
SwingUtils.showException(panel, ex);
}
@@ -29,16 +29,16 @@ public class TestPlugin extends Plugin{
}
@Override
protected void onStop() {
public void onStop() {
}
protected void onStateChange(State state, State former){
public void onStateChange(State state, State former){
panel.setState(state);
}
@Override
protected void onInitialize(int runCount){
public void onInitialize(int runCount){
panel.setDevice(getDevice("motor"));
}