essential-actions
Clone or download
Modified Files
--- 'a/DemoCustomNormalAction/src/main/java/com/stream_pi/democustomnormalaction/DemoCustomNormalAction.java'
+++ b/DemoCustomNormalAction/src/main/java/com/stream_pi/democustomnormalaction/DemoCustomNormalAction.java
@@ -3,7 +3,9 @@ package com.stream_pi.democustomnormalac
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.action_api.externalplugin.NormalAction;
+import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.version.Version;
+import javafx.scene.control.Button;
public class DemoCustomNormalAction extends NormalAction
{
@@ -35,7 +37,34 @@ public class DemoCustomNormalAction exte
@Override
public void initAction() {
- // This is called after initProperties()
+
+ Button b1 = new Button("Test Alert");
+ b1.setOnAction(actionEvent -> {
+ new StreamPiAlert("Hi","Hello").show();
+ });
+
+ Button b2 = new Button("Modify Test");
+ b2.setOnAction(actionEvent -> {
+ try
+ {
+ System.out.println("AAAAAAAAAAAAAAAAAAAAAAA : "+getProfileID());
+ getClientProperties().getSingleProperty("ClientServerProperty1")
+ .setStringValue("This property was dynamically modified");
+
+ setDisplayText("Dynamic");
+
+ saveClientAction();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ });
+
+
+
+
+ setClientActionSettingsButtonBar(b1,b2);
}
@Override
@@ -45,10 +74,4 @@ public class DemoCustomNormalAction exte
System.out.println("Action Called!");
}
-
- @Override
- public void onShutDown() throws Exception {
- // TODO Auto-generated method stub
-
- }
}