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

@@ -12,7 +12,7 @@
<properties>
<exec.args>-classpath %classpath ch.psi.pshell.ui.App -p=ch.psi.plugin.TestPlugin</exec.args>
<exec.executable>java</exec.executable>
<exec.workingdir>../pshell</exec.workingdir>
<exec.workingdir>../../pshell</exec.workingdir>
</properties>
</action>
@@ -29,7 +29,7 @@
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath ch.psi.pshell.ui.App -p=ch.psi.plugin.TestPlugin</exec.args>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
<exec.workingdir>../pshell</exec.workingdir>
<exec.workingdir>../../pshell</exec.workingdir>
</properties>
</action>
@@ -45,7 +45,7 @@
<properties>
<exec.args>-classpath %classpath ch.psi.pshell.ui.App -p=ch.psi.plugin.TestPlugin</exec.args>
<exec.executable>java</exec.executable>
<exec.workingdir>../pshell</exec.workingdir>
<exec.workingdir>../../pshell</exec.workingdir>
</properties>
</action>

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"));
}