public SettingsPanel(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()); tabbedPane = new JTabbedPane(); EngineSettingsPanel engineSettingsPanel = new EngineSettingsPanel(gui); tabbedPane.addTab("Engine", null, engineSettingsPanel, "Engine Settings"); panels.add(engineSettingsPanel); ShellSettingsPanel shellSettingsPanel = new ShellSettingsPanel(gui); tabbedPane.addTab("Shell", null, shellSettingsPanel, "Shell Settings"); panels.add(shellSettingsPanel); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' add(tabbedPane, BorderLayout.CENTER); //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"' JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 1)); saveButton = new JButton("Save Changes", IconLoader.getImageIcon("disk")); saveButton.addActionListener(this); buttonPanel.add(saveButton); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.SOUTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' add(buttonPanel, BorderLayout.SOUTH); }
public virtual void startGui() { if (jamochaGui == null) { jamochaGui = new JamochaGui(engine); SupportClass.ThreadClass guiThread = new AnonymousClassThread1(this); guiThread.Start(); } }
/// <summary> The main constructor for a RetePanel. /// /// </summary> /// <param name="">engine /// The Jamocha engine that should be used with this GUI. /// /// </param> public RetePanel(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()); visualiserPanel = new JPanel(); //UPGRADE_ISSUE: Constructor 'java.awt.CardLayout.CardLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtCardLayout"' visualiserPanel.setLayout(new CardLayout()); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' add(visualiserPanel, BorderLayout.CENTER); initVisualiser(); }
public EngineSettingsPanel(JamochaGui gui) : base(gui) { //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"' //UPGRADE_ISSUE: Constructor 'java.awt.GridBagLayout.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"' GridBagLayout gridbag = new GridBagLayout(); //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' //UPGRADE_ISSUE: Constructor 'java.awt.GridBagConstraints.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' GridBagConstraints c = new GridBagConstraints(); //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weightx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.weightx = 1.0; setLayout(gridbag); // Evaluation addLabel(this, new JLabel("Evaluation"), gridbag, c, 0); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel evaluationPanel = new JPanel(new BorderLayout()); evaluationCheckBox = new JCheckBox(); evaluationCheckBox.setEnabled(true); evaluationCheckBox.addActionListener(this); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' evaluationPanel.add(evaluationCheckBox, BorderLayout.WEST); addInputComponent(this, evaluationPanel, gridbag, c, 0); // Profile Assert addLabel(this, new JLabel("Profile Assert:"), gridbag, c, 1); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel profileAssertPanel = new JPanel(new BorderLayout()); profileAssertCheckBox = new JCheckBox(); profileAssertCheckBox.setEnabled(true); profileAssertCheckBox.addActionListener(this); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' profileAssertPanel.add(profileAssertCheckBox, BorderLayout.WEST); addInputComponent(this, profileAssertPanel, gridbag, c, 1); // Profile Retract addLabel(this, new JLabel("Profile Retract:"), gridbag, c, 2); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel profileRetractPanel = new JPanel(new BorderLayout()); profileRetractCheckBox = new JCheckBox(); profileRetractCheckBox.setEnabled(true); profileRetractCheckBox.addActionListener(this); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' profileRetractPanel.add(profileRetractCheckBox, BorderLayout.WEST); addInputComponent(this, profileRetractPanel, gridbag, c, 2); // Profile Fire addLabel(this, new JLabel("Profile Fire:"), gridbag, c, 3); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel profileFirePanel = new JPanel(new BorderLayout()); profileFireCheckBox = new JCheckBox(); profileFireCheckBox.setEnabled(true); profileFireCheckBox.addActionListener(this); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' profileFirePanel.add(profileFireCheckBox, BorderLayout.WEST); addInputComponent(this, profileFirePanel, gridbag, c, 3); // Profile Add Activation addLabel(this, new JLabel("Profile Add Activation:"), gridbag, c, 4); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel profileAddActivationPanel = new JPanel(new BorderLayout()); profileAddActivationCheckBox = new JCheckBox(); profileAddActivationCheckBox.setEnabled(true); profileAddActivationCheckBox.addActionListener(this); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' profileAddActivationPanel.add(profileAddActivationCheckBox, BorderLayout.WEST); addInputComponent(this, profileAddActivationPanel, gridbag, c, 4); // Profile Remove Activation addLabel(this, new JLabel("Profile Remove Activation:"), gridbag, c, 5); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel profileRemoveActivationPanel = new JPanel(new BorderLayout()); profileRemoveActivationCheckBox = new JCheckBox(); profileRemoveActivationCheckBox.setEnabled(true); profileRemoveActivationCheckBox.addActionListener(this); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' profileRemoveActivationPanel.add(profileRemoveActivationCheckBox, BorderLayout.WEST); addInputComponent(this, profileRemoveActivationPanel, gridbag, c, 5); // Activations addLabel(this, new JLabel(" Watch Activations:"), gridbag, c, 6); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel watchActivationsPanel = new JPanel(new BorderLayout()); watchActivationsCheckBox = new JCheckBox(); watchActivationsCheckBox.setEnabled(true); watchActivationsCheckBox.addActionListener(this); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' watchActivationsPanel.add(watchActivationsCheckBox, BorderLayout.WEST); addInputComponent(this, watchActivationsPanel, gridbag, c, 6); // Facts addLabel(this, new JLabel("Watch Facts:"), gridbag, c, 7); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel watchFactsPanel = new JPanel(new BorderLayout()); watchFactsCheckBox = new JCheckBox(); watchFactsCheckBox.setEnabled(true); watchFactsCheckBox.addActionListener(this); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' watchFactsPanel.add(watchFactsCheckBox, BorderLayout.WEST); addInputComponent(this, watchFactsPanel, gridbag, c, 7); // Rules addLabel(this, new JLabel("Watch Rules:"), gridbag, c, 8); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel watchRulesPanel = new JPanel(new BorderLayout()); watchRulesCheckBox = new JCheckBox(); watchRulesCheckBox.setEnabled(true); watchRulesCheckBox.addActionListener(this); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' watchRulesPanel.add(watchRulesCheckBox, BorderLayout.WEST); addInputComponent(this, watchRulesPanel, gridbag, c, 8); }
public AbstractSettingsPanel(JamochaGui gui) { this.gui = gui; }
/// <summary> The constructor expecting a JamochaGui as argument. /// /// </summary> /// <param name="">gui /// The active JamocheGui. /// /// </param> public AbstractJamochaPanel(JamochaGui gui) { this.gui = gui; }
public ShellSettingsPanel(JamochaGui gui) : base(gui) { //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"' //UPGRADE_ISSUE: Constructor 'java.awt.GridBagLayout.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"' GridBagLayout gridbag = new GridBagLayout(); //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' //UPGRADE_ISSUE: Constructor 'java.awt.GridBagConstraints.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' GridBagConstraints c = new GridBagConstraints(); //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weightx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.weightx = 1.0; setLayout(gridbag); // Font addLabel(this, new JLabel("Font:"), gridbag, c, 0); GraphicsEnvironment ge = GraphicsEnvironment.LocalGraphicsEnvironment; System.Drawing.Font[] allFonts = ge.AllFonts; fonts = new JComboBox(allFonts); System.Drawing.Font selFont = null; System.String selFontName = gui.Preferences.get("shell.font", "Courier"); for (int idx = 0; idx < allFonts.Length; idx++) { System.Drawing.Font curFont = allFonts[idx]; if (curFont.FontName.equals(selFontName)) { selFont = curFont; break; } } if (selFont != null) { fonts.setSelectedItem(selFont); } fonts.setRenderer(new FontListCellRenderer(this)); addInputComponent(this, fonts, gridbag, c, 0); // Fontsize addLabel(this, new JLabel("Fontsize:"), gridbag, c, 1); System.Int32[] sizes = new System.Int32[17]; for (int i = 0; i < sizes.Length; ++i) { sizes[i] = 8 + i; } fontsizes = new JComboBox(sizes); //fontsizes.setSelectedItem(gui.getPreferences().getInt("shell.fontsize", // 12)); addInputComponent(this, fontsizes, gridbag, c, 1); // Fontcolor addLabel(this, new JLabel("Fontcolor:"), gridbag, c, 2); //UPGRADE_ISSUE: Constructor 'java.awt.FlowLayout.FlowLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtFlowLayout"' JPanel fontColorChooserPanel = new JPanel(new FlowLayout()); fontColorChooserPreview = new JTextField(5); fontColorChooserPreview.setEditable(false); fontColorChooserPreview.setBackground(new Color(gui.Preferences.getInt("shell.fontcolor", System.Drawing.Color.WHITE.RGB))); fontColorChooserButton = new JButton("Choose Color", IconLoader.getImageIcon("color_swatch")); fontColorChooserButton.addActionListener(this); fontColorChooserPanel.add(fontColorChooserPreview); fontColorChooserPanel.add(fontColorChooserButton); addInputComponent(this, fontColorChooserPanel, gridbag, c, 2); // Backgroundcolor addLabel(this, new JLabel("Backgroundcolor:"), gridbag, c, 3); //UPGRADE_ISSUE: Constructor 'java.awt.FlowLayout.FlowLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtFlowLayout"' JPanel backgroundColorChooserPanel = new JPanel(new FlowLayout()); backgroundColorChooserPreview = new JTextField(5); backgroundColorChooserPreview.setEditable(false); backgroundColorChooserPreview.setBackground(new Color(gui.Preferences.getInt("shell.backgroundcolor", System.Drawing.Color.BLACK.RGB))); backgroundColorChooserButton = new JButton("Choose Color", IconLoader.getImageIcon("color_swatch")); backgroundColorChooserButton.addActionListener(this); backgroundColorChooserPanel.add(backgroundColorChooserPreview); backgroundColorChooserPanel.add(backgroundColorChooserButton); addInputComponent(this, backgroundColorChooserPanel, gridbag, c, 3); }
/// <summary> The main constructor for a ShellPanel. /// /// </summary> /// <param name="">engine /// The Jamocha engine that should be used with this GUI. /// /// </param> public ShellPanel(JamochaGui gui) : base(gui) { InitBlock(); // GUI construction // create the output area outputArea = new JTextArea(); outputArea.setEditable(false); outputArea.setLineWrap(true); outputArea.setWrapStyleWord(true); outputArea.addFocusListener(this); // set the font and the colors settingsChanged(); this.addFocusListener(this); // create a scroll pane to embedd the output area scrollPane = new JScrollPane(outputArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.VerticalScrollBar.addAdjustmentListener(this); // Assemble the 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()); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' add(scrollPane, BorderLayout.CENTER); // create the button that clears the output area clearButton = new JButton("Clear Shell", IconLoader.getImageIcon("application_osx_terminal")); clearButton.addActionListener(this); JPanel clearButtonPanel = 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"' clearButtonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 1)); clearButtonPanel.add(clearButton); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000"' add(clearButtonPanel, BorderLayout.PAGE_END); // initialize the channel to the engine //UPGRADE_ISSUE: Constructor 'java.io.PipedOutputStream.PipedOutputStream' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaioPipedOutputStreamPipedOutputStream"' System.IO.StreamWriter outStream = new PipedOutputStream(); //UPGRADE_ISSUE: Constructor 'java.io.PipedInputStream.PipedInputStream' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaioPipedInputStreamPipedInputStream"' System.IO.StreamReader inStream = new PipedInputStream(); outWriter = new System.IO.StreamWriter(outStream); try { //UPGRADE_ISSUE: Method 'java.io.PipedInputStream.connect' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaioPipedInputStreamconnect_javaioPipedOutputStream"' inStream.connect(outStream); } catch (System.IO.IOException e) { SupportClass.WriteStackTrace(e, Console.Error); System.Environment.Exit(1); } channel = gui.Engine.MessageRouter.openChannel("JamochaGui", inStream); printPrompt(); moveCursorToEnd(); startTimer(); // initialize the channellistener for outputs from the engine initChannelListener(); // initialize the keylistener for key events initKeyListener(); // initialize the mouselistener for the context menu initPopupMenu(); }