Esempio n. 1
0
        public LogPanel(JamochaGui gui)
            : base(gui)
        {
            InitBlock();
            //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            setLayout(new BorderLayout());
            logChannel = gui.Engine.MessageRouter.openChannel("gui_log", InterestType.ALL);
            detailView = new JTextArea();
            detailView.setEditable(false);
            //UPGRADE_NOTE: If the given Font Name does not exist, a default Font instance is created. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1075"'
            //UPGRADE_TODO: Method 'java.awt.Font.Plain' was converted to 'System.Drawing.FontStyle.Regular' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaawtFontPLAIN_f"'
            detailView.setFont(new System.Drawing.Font("Courier", 12, (System.Drawing.FontStyle) System.Drawing.FontStyle.Regular));
            cellRenderer = new LogTableCellRenderer(this);
            logTable = new AnonymousClassJTable(this, dataModel);
            logTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            logTable.SelectionModel.addListSelectionListener(this);
            pane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, new JScrollPane(logTable), new JScrollPane(detailView));
            pane.setDividerLocation(gui.Preferences.getInt("log.dividerlocation", 300));
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            add(pane, BorderLayout.CENTER);

            SupportClass.ThreadClass logThread = new AnonymousClassThread(this);
            logThread.Start();
            clearButton = new JButton("Clear Log", IconLoader.getImageIcon("monitor"));
            clearButton.addActionListener(this);
            JPanel buttonPanel = new JPanel();
            //UPGRADE_ISSUE: Constructor 'java.awt.FlowLayout.FlowLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtFlowLayout"'
            //UPGRADE_ISSUE: Field 'java.awt.FlowLayout.RIGHT' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtFlowLayout"'
            buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 1));
            buttonPanel.add(clearButton);
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000"'
            add(buttonPanel, BorderLayout.PAGE_END);
        }
Esempio n. 2
0
 public GuiLogOutputHandler(JTextArea jtextarea)
 {
     field_998_b  = new int[1024];
     field_1001_c = 0;
     field_999_a  = new GuiLogFormatter(this);
     setFormatter(field_999_a);
     field_1000_d = jtextarea;
 }
Esempio n. 3
0
        private JComponent getLogComponent()
        {
            var jpanel    = new JPanel(new BorderLayout());
            var jtextarea = new JTextArea();

            logger.addHandler(new GuiLogOutputHandler(jtextarea));
            var jscrollpane = new JScrollPane(jtextarea, 22, 30);

            jtextarea.setEditable(false);
            var jtextfield = new JTextField();

            jtextfield.addActionListener(new ServerGuiCommandListener(this, jtextfield));
            jtextarea.addFocusListener(new ServerGuiFocusAdapter(this));
            jpanel.add(jscrollpane, "Center");
            jpanel.add(jtextfield, "South");
            jpanel.setBorder(new TitledBorder(new EtchedBorder(), "Log and chat"));
            return(jpanel);
        }
        private JPanel getDatabaseFailureUpdateFrame(System.Collections.IList paramList)
        {
            StringWriter stringWriter = new StringWriter();
            PrintWriter  printWriter  = new PrintWriter(stringWriter);

            paramList.ForEach(paramObject =>
            {
                Exception exception = (Exception)paramObject;
                paramPrintWriter.println("====================================");
                paramPrintWriter.println(exception.GetType() + " : " + exception.Message);
                exception.printStackTrace(paramPrintWriter);
                paramPrintWriter.println();
            });
            JPanel jPanel = new JPanel();

            jPanel.Layout = new BorderLayout();
            JTextArea   jTextArea   = new JTextArea(stringWriter.ToString(), 100, 80);
            JScrollPane jScrollPane = new JScrollPane(jTextArea, 22, 32);

            jPanel.add(jScrollPane, "Center");
            return(jPanel);
        }
Esempio n. 5
0
 private void InitBlock()
 {
     dumpAreaTemplate = new JTextArea();
     dumpAreaFact = new JTextArea();
     moduleListModel = new DefaultListModel();
     templateListModel = new DefaultListModel();
     factComponents = new HashMap();
 }
Esempio n. 6
0
        public FactsPanel(JamochaGui gui)
            : base(gui)
        {
            //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            setLayout(new BorderLayout());

            dataModel = new FactsTableModel(this);
            TableSorter sorter = new TableSorter(new TableMap());
            ((TableMap) sorter.Model).setModel(dataModel);
            factsTable = new JTable(sorter);
            sorter.addMouseListenerToHeaderInTable(factsTable);

            factsTable.setShowHorizontalLines(true);
            factsTable.setRowSelectionAllowed(true);
            factsTable.TableHeader.setReorderingAllowed(false);
            factsTable.TableHeader.setToolTipText("Click to sort ascending. Click while pressing the shift-key down to sort descending");
            factsTable.SelectionModel.addListSelectionListener(this);
            dumpArea = new JTextArea();
            dumpArea.setLineWrap(true);
            dumpArea.setWrapStyleWord(true);
            dumpArea.setEditable(false);
            //UPGRADE_NOTE: If the given Font Name does not exist, a default Font instance is created. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1075"'
            //UPGRADE_TODO: Method 'java.awt.Font.Plain' was converted to 'System.Drawing.FontStyle.Regular' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaawtFontPLAIN_f"'
            dumpArea.setFont(new System.Drawing.Font("Courier", 12, (System.Drawing.FontStyle) System.Drawing.FontStyle.Regular));

            pane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, new JScrollPane(factsTable), new JScrollPane(dumpArea));
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            add(pane, BorderLayout.CENTER);
            pane.setDividerLocation(gui.Preferences.getInt("facts.dividerlocation", 300));
            reloadButton = new JButton("Reload Facts", IconLoader.getImageIcon("database_refresh"));
            reloadButton.addActionListener(this);
            assertButton = new JButton("Assert Fact", IconLoader.getImageIcon("database_add"));
            assertButton.addActionListener(this);
            JPanel buttonPanel = new JPanel();
            //UPGRADE_ISSUE: Constructor 'java.awt.FlowLayout.FlowLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtFlowLayout"'
            //UPGRADE_ISSUE: Field 'java.awt.FlowLayout.RIGHT' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtFlowLayout"'
            buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 1));
            buttonPanel.add(reloadButton);
            buttonPanel.add(assertButton);
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000"'
            add(buttonPanel, BorderLayout.PAGE_END);

            initPopupMenu();
        }