01: package org.zilonis.tool.ui;
02:
03: import java.awt.BorderLayout;
04: import java.awt.FlowLayout;
05: import java.io.DataInputStream;
06: import java.io.IOException;
07: import java.io.PrintStream;
08:
09: import javax.swing.Box;
10: import javax.swing.JPanel;
11: import javax.swing.JScrollPane;
12: import javax.swing.JSplitPane;
13: import javax.swing.JTabbedPane;
14:
15: import org.zilonis.network.Rete;
16: import org.zilonis.parser.gen.ZilonisLexer;
17: import org.zilonis.parser.gen.ZilonisParser;
18: import org.zilonis.scope.Scope;
19: import org.zilonis.shell.GenericEventHandler;
20:
21: public class RuleAnalysisPanel extends JPanel {
22:
23: private final AnalysisToolParserEventHandler analysisToolParserEventHandler;
24: private final JTabbedPane rulesGraphPanel;
25:
26: public RuleAnalysisPanel(
27: AnalysisToolParserEventHandler analysisToolParserEventHandler) {
28: rulesGraphPanel = new JTabbedPane();
29: this .analysisToolParserEventHandler = analysisToolParserEventHandler;
30: this .analysisToolParserEventHandler
31: .setRulesPanel(rulesGraphPanel);
32: initComponents();
33: }
34:
35: public void setScope(Scope scope) {
36: analysisToolParserEventHandler.setScope(scope);
37: }
38:
39: public void initComponents() {
40: setOpaque(false);
41: setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 2, 2,
42: 2));
43: setLayout(new BorderLayout());
44: JPanel buttonPanel = new JPanel();
45: buttonPanel.setOpaque(false);
46: buttonPanel.setLayout(new FlowLayout());
47: ActionButton addRuleButton = new ActionButton("Execute");
48: addRuleButton.setMain(true);
49: add(BorderLayout.CENTER, rulesGraphPanel);
50: }
51:
52: public static JSplitPane getSplitPane(int i) {
53: JSplitPane splitPane = new JSplitPane(i);
54: splitPane.setOpaque(false);
55: splitPane.setBorder(javax.swing.BorderFactory
56: .createEmptyBorder(2, 2, 2, 2));
57: splitPane.setDividerSize(3);
58: return splitPane;
59: }
60:
61: }
|