1 30 package com.genimen.djeneric.tools.scriptengine.core.nodes; 31 32 import com.genimen.djeneric.tools.scriptengine.core.DjScriptParserEngine; 33 import com.genimen.djeneric.tools.scriptengine.core.ScriptRunnerContainer; 34 import com.genimen.djeneric.tools.scriptengine.core.SimpleNode; 35 import com.genimen.djeneric.tools.scriptengine.core.util.DjScriptExecutionException; 36 import com.genimen.djeneric.tools.scriptengine.core.util.DjScriptExecutionTimeScope; 37 38 public class CustomPanelStatementNode extends SimpleNode 39 { 40 String _panelClass = null; 41 42 public CustomPanelStatementNode(int i) 43 { 44 super(i); 45 } 46 47 public CustomPanelStatementNode(DjScriptParserEngine p, int i) 48 { 49 super(p, i); 50 } 51 52 public String getName() 53 { 54 return "custom panel"; 55 } 56 57 public String toString() 58 { 59 return "custom panel " + _panelClass; 60 } 61 62 public void execute(DjScriptExecutionTimeScope context) throws DjScriptExecutionException 63 { 64 ScriptRunnerContainer container = context.getContainer(); 65 66 container.showPanel(getPanelClass(), context); 67 } 68 69 public String getPanelClass() 70 { 71 return _panelClass; 72 } 73 74 public void setPanelClass(String panelClass) 75 { 76 panelClass = panelClass.substring(1); 77 panelClass = panelClass.substring(0, panelClass.length() - 1); 78 _panelClass = panelClass; 79 } 80 81 } | Popular Tags |