Example #1
0
        /// <summary> Create a GUI-Instance for Jamocha.
        /// 
        /// </summary>
        /// <param name="">engine
        /// The Jamocha-engine that will be used in the GUI.
        /// 
        /// </param>
        public JamochaGui(Rete engine)
        {
            InitBlock();

            // set up the frame
            //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            this.ContentPane.setLayout(new BorderLayout());
            this.setTitle("Jamocha");
            setSizeAndLocation();

            // show logo
            //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            JPanel logoPanel = new JPanel(new BorderLayout());
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.EAST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            logoPanel.add(new JLabel(IconLoader.getImageIcon("jamocha")), BorderLayout.EAST);
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.NORTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            this.ContentPane.add(logoPanel, BorderLayout.NORTH);

            // create a tabbed pane
            tabbedPane = new JTabbedPane();
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            this.ContentPane.add(tabbedPane, BorderLayout.CENTER);

            // add MenuBar
            menuBar = new JamochaMenuBar(this);
            this.setJMenuBar(menuBar);

            // create a rete engine
            this.engine = engine;

            // create a shell tab and add it to the tabbed pane
            ShellPanel shellPanel = new ShellPanel(this);
            tabbedPane.addTab("Shell", IconLoader.getImageIcon("application_osx_terminal"), shellPanel, "Jamocha Shell");
            panels.add(shellPanel);
            FactsPanel factsPanel = new FactsPanel(this);
            tabbedPane.addTab("Facts", IconLoader.getImageIcon("database"), factsPanel, "View or modify Facts");
            panels.add(factsPanel);
            TemplatesPanel templatesPanel = new TemplatesPanel(this);
            tabbedPane.addTab("Templates", IconLoader.getImageIcon("brick"), templatesPanel, "View or modify Templates");
            panels.add(templatesPanel);
            FunctionsPanel functionsPanel = new FunctionsPanel(this);
            tabbedPane.addTab("Functions", IconLoader.getImageIcon("cog"), functionsPanel, "View Functions");
            panels.add(functionsPanel);
            RetePanel retePanel = new RetePanel(this);
            tabbedPane.addTab("Rete", IconLoader.getImageIcon("eye"), retePanel, "View the Rete-network");
            panels.add(retePanel);
            LogPanel logPanel = new LogPanel(this);
            tabbedPane.addTab("Log", IconLoader.getImageIcon("monitor"), logPanel, "View alle messages from or to the Rete-engine");
            panels.add(logPanel);
            SettingsPanel settingsPanel = new SettingsPanel(this);
            tabbedPane.addTab("Settings", IconLoader.getImageIcon("wrench"), settingsPanel, "Settings for Jamocha");
            panels.add(settingsPanel);

            // add the tab pane to the frame
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            this.ContentPane.add(tabbedPane, BorderLayout.CENTER);

            tabbedPane.addChangeListener(this);
            // add a listener to the frame to kill the engine when the GUI is closed
            addWindowListener(new AnonymousClassWindowAdapter(this));
        }
Example #2
0
 private void InitBlock(FactsPanel enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
     facts = new ArrayList();
 }
Example #3
0
 private void InitBlock(FactsPanel enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
Example #4
0
 public FactsTableModel(FactsPanel enclosingInstance)
 {
     InitBlock(enclosingInstance);
 }
Example #5
0
 public AnonymousClassMouseAdapter(FactsPanel enclosingInstance)
 {
     InitBlock(enclosingInstance);
 }