Example #1
0
 private void  initTemplatePanel()
 {
     //UPGRADE_ISSUE: Constructor 'java.awt.GridBagLayout.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
     gridbag = new GridBagLayout();
     //UPGRADE_ISSUE: Constructor 'java.awt.GridBagConstraints.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints = new GridBagConstraints();
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weightx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.weightx = 1.0;
     templatePanel.setLayout(gridbag);
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.anchor = GridBagConstraints.WEST;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridx = 0;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridy = 0;
     templatePanel.add(new JLabel());
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridx = 1;
     templatePanel.add(new JLabel());
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridy = 2;
     templatePanel.add(new JLabel("Type:"));
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridy = 3;
     templatePanel.add(new JLabel("Name:"));
 }
        internal virtual void createFilenamePanel()
        {
            Container     contentPane   = this.getContentPane();
            GridBagLayout gridBagLayout = new GridBagLayout();

            contentPane.setLayout(gridBagLayout);
            this.filename = new JTextField(12);
            JLabel jlabel = new JLabel("Filename:");

            jlabel.setLabelFor(this.filename);
            Insets             insets             = new Insets(12, 12, 0, 0);
            GridBagConstraints gridBagConstraints = new GridBagConstraints(0, 0, 1, 1, (double)0f, (double)0f, 17, 0, insets, 0, 0);

            gridBagLayout.setConstraints(jlabel, gridBagConstraints);
            contentPane.add(jlabel);
            insets             = new Insets(12, 7, 0, 12);
            gridBagConstraints = new GridBagConstraints(1, 0, 1, 1, (double)1f, (double)1f, 17, 2, insets, 0, 0);
            gridBagLayout.setConstraints(this.filename, gridBagConstraints);
            contentPane.add(this.filename);
            JButton jbutton = new JButton("Save");

            jbutton.addActionListener(new FilenameDialog_2(this));
            insets             = new Insets(0, 12, 12, 12);
            gridBagConstraints = new GridBagConstraints(0, 2, 2, 1, (double)1f, (double)1f, 13, 0, insets, 0, 0);
            gridBagLayout.setConstraints(jbutton, gridBagConstraints);
            contentPane.add(jbutton);
            this.getRootPane().setDefaultButton(jbutton);
        }
Example #3
0
        private GridBagConstraints getConstraints(int x, int y)
        {
            GridBagConstraints c = new GridBagConstraints();

            c.anchor = GridBagConstraints.LINE_START;
            c.insets = new Insets(5, 5, 3, 5);
            c.gridx  = x;
            c.gridy  = y;
            return(c);
        }
        public virtual string ShowListSelectionDialog(IList <string> files, Point location)
        {
            Frame frame = new Frame();
            //System.out.println(location);
            //frame.setLocation(location);
            JDialog dialog = new JDialog(frame, "Jar File Chooser", true);

            dialog.SetLocation(location);
            JList fileList = new JList(new Vector <string>(files));

            fileList.SetSelectionMode(ListSelectionModelConstants.SingleSelection);
            IMouseListener mouseListener = new _MouseAdapter_68(dialog);

            // double clicked
            fileList.AddMouseListener(mouseListener);
            JScrollPane scroll = new JScrollPane(fileList);
            JButton     okay   = new JButton();

            okay.SetText("Okay");
            okay.SetToolTipText("Okay");
            okay.AddActionListener(null);
            JButton cancel = new JButton();

            cancel.SetText("Cancel");
            cancel.SetToolTipText("Cancel");
            cancel.AddActionListener(null);
            GridBagLayout      gridbag     = new GridBagLayout();
            GridBagConstraints constraints = new GridBagConstraints();

            dialog.SetLayout(gridbag);
            constraints.gridwidth = GridBagConstraints.Remainder;
            constraints.fill      = GridBagConstraints.Both;
            constraints.weightx   = 1.0;
            constraints.weighty   = 1.0;
            gridbag.SetConstraints(scroll, constraints);
            dialog.Add(scroll);
            constraints.gridwidth = GridBagConstraints.Relative;
            constraints.fill      = GridBagConstraints.None;
            constraints.weighty   = 0.0;
            gridbag.SetConstraints(okay, constraints);
            dialog.Add(okay);
            constraints.gridwidth = GridBagConstraints.Remainder;
            gridbag.SetConstraints(cancel, constraints);
            dialog.Add(cancel);
            dialog.Pack();
            dialog.SetSize(dialog.GetPreferredSize());
            dialog.SetVisible(true);
            if (fileList.IsSelectionEmpty())
            {
                return(null);
            }
            return(files[fileList.GetSelectedIndex()]);
        }
Example #5
0
 //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
 //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
 private void  addLabel(JPanel parent, JLabel label, GridBagLayout gridbag, GridBagConstraints c, int row)
 {
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 1;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridy = row;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.NONE' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.NONE;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.EAST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.anchor = GridBagConstraints.EAST;
     gridbag.setConstraints(label, c);
     parent.add(label);
 }
Example #6
0
 //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
 //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
 public virtual void addInputComponent(JPanel parent, JComponent comp, GridBagLayout gridbag, GridBagConstraints c, int row)
 {
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 1;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridy = row;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.BOTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.BOTH;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.anchor = GridBagConstraints.WEST;
     gridbag.setConstraints(comp, c);
     parent.add(comp);
 }
Example #7
0
 //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
 //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
 public virtual void addLabel(JPanel parent, JLabel label, GridBagLayout gridbag, GridBagConstraints c, int row)
 {
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 0;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridy = row;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.VERTICAL' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.VERTICAL;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.EAST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.anchor = GridBagConstraints.EAST;
     gridbag.setConstraints(label, c);
     parent.add(label);
 }
 public InsetsChooserPanel(Insets current)
 {
   base.\u002Ector();
   InsetsChooserPanel insetsChooserPanel = this;
   current = current != null ? current : new Insets(0, 0, 0, 0);
   JTextField.__\u003Cclinit\u003E();
   this.topValueEditor = new JTextField((Document) new IntegerDocument(), new StringBuffer().append("").append((int) current.top).toString(), 0);
   JTextField.__\u003Cclinit\u003E();
   this.leftValueEditor = new JTextField((Document) new IntegerDocument(), new StringBuffer().append("").append((int) current.left).toString(), 0);
   JTextField.__\u003Cclinit\u003E();
   this.bottomValueEditor = new JTextField((Document) new IntegerDocument(), new StringBuffer().append("").append((int) current.bottom).toString(), 0);
   JTextField.__\u003Cclinit\u003E();
   this.rightValueEditor = new JTextField((Document) new IntegerDocument(), new StringBuffer().append("").append((int) current.right).toString(), 0);
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel1 = new JPanel((LayoutManager) new GridBagLayout());
   ((JComponent) jpanel1).setBorder((Border) new TitledBorder(InsetsChooserPanel.localizationResources.getString("Insets")));
   JPanel jpanel2 = jpanel1;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel1 = new JLabel(InsetsChooserPanel.localizationResources.getString("Top"));
   GridBagConstraints gridBagConstraints1 = new GridBagConstraints(1, 0, 3, 1, 0.0, 0.0, 10, 0, new Insets(0, 0, 0, 0), 0, 0);
   ((Container) jpanel2).add((Component) jlabel1, (object) gridBagConstraints1);
   ((Container) jpanel1).add((Component) new JLabel(" "), (object) new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, 10, 1, new Insets(0, 12, 0, 12), 8, 0));
   ((Container) jpanel1).add((Component) this.topValueEditor, (object) new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, 10, 2, new Insets(0, 0, 0, 0), 0, 0));
   ((Container) jpanel1).add((Component) new JLabel(" "), (object) new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, 10, 1, new Insets(0, 12, 0, 11), 8, 0));
   JPanel jpanel3 = jpanel1;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel2 = new JLabel(InsetsChooserPanel.localizationResources.getString("Left"));
   GridBagConstraints gridBagConstraints2 = new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, 10, 1, new Insets(0, 4, 0, 4), 0, 0);
   ((Container) jpanel3).add((Component) jlabel2, (object) gridBagConstraints2);
   ((Container) jpanel1).add((Component) this.leftValueEditor, (object) new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, 10, 1, new Insets(0, 0, 0, 0), 0, 0));
   ((Container) jpanel1).add((Component) new JLabel(" "), (object) new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, 10, 0, new Insets(0, 12, 0, 12), 8, 0));
   ((Container) jpanel1).add((Component) this.rightValueEditor, (object) new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0, 10, 2, new Insets(0, 0, 0, 0), 0, 0));
   JPanel jpanel4 = jpanel1;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel3 = new JLabel(InsetsChooserPanel.localizationResources.getString("Right"));
   GridBagConstraints gridBagConstraints3 = new GridBagConstraints(4, 2, 1, 1, 0.0, 0.0, 10, 0, new Insets(0, 4, 0, 4), 0, 0);
   ((Container) jpanel4).add((Component) jlabel3, (object) gridBagConstraints3);
   ((Container) jpanel1).add((Component) this.bottomValueEditor, (object) new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0, 10, 2, new Insets(0, 0, 0, 0), 0, 0));
   JPanel jpanel5 = jpanel1;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel4 = new JLabel(InsetsChooserPanel.localizationResources.getString("Bottom"));
   GridBagConstraints gridBagConstraints4 = new GridBagConstraints(1, 4, 3, 1, 0.0, 0.0, 10, 0, new Insets(0, 0, 0, 0), 0, 0);
   ((Container) jpanel5).add((Component) jlabel4, (object) gridBagConstraints4);
   ((Container) this).setLayout((LayoutManager) new BorderLayout());
   ((Container) this).add((Component) jpanel1, (object) "Center");
 }
        private void JbInit()
        {
            //pf = new PrintFile("out");
            this.AddWindowListener(new _WindowAdapter_110());
            //Set up the input/output fields and let them scroll.
            inputBox.SetLineWrap(true);
            inputBox.SetWrapStyleWord(true);
            outputBox.SetLineWrap(true);
            outputBox.SetWrapStyleWord(true);
            outputBox.SetEditable(false);
            JScrollPane scroll1 = new JScrollPane(inputBox);
            JScrollPane scroll2 = new JScrollPane(outputBox);

            scroll1.SetBorder(BorderFactory.CreateTitledBorder(BorderFactory.CreateEtchedBorder(), "Type a sentence to tag: "));
            scroll2.SetBorder(BorderFactory.CreateTitledBorder(BorderFactory.CreateEtchedBorder(), "Tagged sentence: "));
            //Set up the button for starting tagging
            JPanel buttonPanel = new JPanel();

            buttonPanel.SetBackground(Color.White);
            buttonPanel.ApplyComponentOrientation(ComponentOrientation.RightToLeft);
            FlowLayout fl = new FlowLayout();

            fl.SetAlignment(FlowLayout.Right);
            buttonPanel.SetLayout(fl);
            tagButton.SetText("Tag sentence!");
            tagButton.SetBackground(Color.White);
            buttonPanel.Add(tagButton);
            tagButton.AddActionListener(null);
            //Lay it all out
            this.SetLayout(new GridBagLayout());
            GridBagConstraints c = new GridBagConstraints();

            c.fill      = GridBagConstraints.Both;
            c.gridwidth = GridBagConstraints.Remainder;
            c.weightx   = 4.0;
            c.weighty   = 4.0;
            this.Add(scroll1, c);
            c.weighty = 1.0;
            this.Add(buttonPanel, c);
            c.weighty    = 4.0;
            c.gridheight = GridBagConstraints.Remainder;
            this.Add(scroll2, c);
        }
 //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
 //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
 public virtual void  addInputComponent(JPanel parent, JComponent comp, GridBagLayout gridbag, GridBagConstraints c, int row)
 {
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 1;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridy = row;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.BOTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.BOTH;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.anchor = GridBagConstraints.WEST;
     gridbag.setConstraints(comp, c);
     parent.add(comp);
 }
Example #11
0
 private void initPreselectionPanel()
 {
     //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();
     JPanel preselectionPanel = new JPanel(gridbag);
     preselectionPanel.setBorder(BorderFactory.createTitledBorder("Module and Template Selection"));
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.BOTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.BOTH;
     moduleList = new JList(moduleListModel);
     moduleList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     moduleList.SelectionModel.addListSelectionListener(this);
     Collection modules = engine.WorkingMemory.Modules;
     Iterator itr = modules.iterator();
     while (itr.hasNext())
     {
         Module mod = (Module) itr.next();
         moduleListModel.addElement(mod.ModuleName);
     }
     JPanel modulePanel = new JPanel();
     modulePanel.setLayout(new BoxLayout(modulePanel, BoxLayout.Y_AXIS));
     modulePanel.add(new JLabel("Select a Module:"));
     modulePanel.add(new JScrollPane(moduleList));
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weightx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.weightx = 0.5;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = c.gridy = 0;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weighty' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.weighty = 1.0;
     // c.gridwidth = GridBagConstraints.RELATIVE;
     gridbag.setConstraints(modulePanel, c);
     preselectionPanel.add(modulePanel);
     templateList = new JList(templateListModel);
     templateList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     templateList.SelectionModel.addListSelectionListener(this);
     initTemplateList();
     JPanel templatePanel = new JPanel();
     templatePanel.setLayout(new BoxLayout(templatePanel, BoxLayout.Y_AXIS));
     templatePanel.add(new JLabel("Select a Template:"));
     templatePanel.add(new JScrollPane(templateList));
     // c.gridwidth = GridBagConstraints.REMAINDER;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 1;
     gridbag.setConstraints(templatePanel, c);
     preselectionPanel.add(templatePanel);
     JPanel dumpAreaPanel = new JPanel();
     dumpAreaPanel.setLayout(new BoxLayout(dumpAreaPanel, BoxLayout.Y_AXIS));
     dumpAreaPanel.add(new JLabel("Template Definition:"));
     dumpAreaPanel.add(new JScrollPane(dumpAreaTemplate));
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weightx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.weightx = 0.0;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridwidth' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridwidth = 2;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridy = 1;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 0;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.BOTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.BOTH;
     gridbag.setConstraints(dumpAreaPanel, c);
     preselectionPanel.add(dumpAreaPanel);
     contentPanel.add(preselectionPanel, "preselection");
 }
Example #12
0
        private void initFactEditPanel()
        {
            factComponents.clear();
            //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: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            JPanel factEditPanel = new JPanel(new BorderLayout());
            JPanel innerPanel = new JPanel(gridbag);
            factEditPanel.setBorder(BorderFactory.createTitledBorder("Set the Slots for the Fact"));
            if (templateList.SelectedIndex > - 1)
            {
                Module module = engine.WorkingMemory.findModule(System.String.valueOf(moduleList.SelectedValue));

                Template tmp = module.getTemplate(System.String.valueOf(templateList.SelectedValue));

                //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;
                Slot[] slots = tmp.AllSlots;
                for (int i = 0; i < slots.Length; ++i)
                {
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    c.gridx = 0;
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    c.gridy = i;
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.VERTICAL' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    c.fill = GridBagConstraints.VERTICAL;
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.EAST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    c.anchor = GridBagConstraints.EAST;
                    JLabel label = new JLabel(slots[i].Name + ": ");
                    gridbag.setConstraints(label, c);
                    innerPanel.add(label);
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    c.gridx = 1;
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.BOTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    c.fill = GridBagConstraints.BOTH;
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
                    c.anchor = GridBagConstraints.WEST;
                    if (slots[i] is MultiSlot)
                    {
                        MultiSlotEditor multislotEditor = new MultiSlotEditor(this);
                        JScrollPane scrollPane = new JScrollPane(multislotEditor.List);
                        gridbag.setConstraints(scrollPane, c);
                        innerPanel.add(scrollPane);
                        factComponents.put(slots[i], multislotEditor.List);
                    }
                    else if (slots[i].ValueType == Constants.FACT_TYPE)
                    {
                        // TODO Fact-Selector

                        JComboBox factBox = new JComboBox();
                        factComponents.put(slots[i], factBox);
                    }
                    else
                    {
                        JTextField textField = new JTextField();
                        gridbag.setConstraints(textField, c);
                        innerPanel.add(textField);
                        factComponents.put(slots[i], textField);
                    }
                }
            }
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            factEditPanel.add(new JScrollPane(innerPanel), BorderLayout.CENTER);
            JPanel dumpAreaPanel = new JPanel();
            dumpAreaPanel.setLayout(new BoxLayout(dumpAreaPanel, BoxLayout.Y_AXIS));
            dumpAreaPanel.add(new JLabel("Fact Preview:"));
            dumpAreaPanel.add(new JScrollPane(dumpAreaFact));
            reloadButtondumpAreaFact = new JButton("Reload Fact Preview", IconLoader.getImageIcon("arrow_refresh"));
            reloadButtondumpAreaFact.addActionListener(this);
            dumpAreaPanel.add(reloadButtondumpAreaFact);
            //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weightx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
            c.weightx = 0.0;
            //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridwidth' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
            c.gridwidth = 2;
            //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
            c.gridy = 1;
            //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
            c.gridx = 0;
            //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
            //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.BOTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
            c.fill = GridBagConstraints.BOTH;
            gridbag.setConstraints(dumpAreaPanel, c);
            //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.SOUTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"'
            factEditPanel.add(dumpAreaPanel, BorderLayout.SOUTH);
            contentPanel.add("factEdit", factEditPanel);
        }
Example #13
0
 //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
 //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
 private void addRemoveButton(JPanel parent, JButton button, GridBagLayout gridbag, GridBagConstraints c, int row)
 {
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 0;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridy = row;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.NONE' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.NONE;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.EAST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.anchor = GridBagConstraints.EAST;
     gridbag.setConstraints(button, c);
     parent.add(button);
 }
 public NewPreferenceEntryDialog([In] RobotPreferences obj0)
 {
   base.\u002Ector();
   RobotPreferences.NewPreferenceEntryDialog preferenceEntryDialog1 = this;
   this.canceled = true;
   ((Dialog) this).setTitle("New Preference Entry");
   ((Dialog) this).setModal(true);
   ((Dialog) this).setResizable(false);
   ((JComponent) this.getContentPane()).setBorder(BorderFactory.createEmptyBorder(7, 7, 7, 7));
   this.setLayout((LayoutManager) new GridBagLayout());
   GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
   ((Container) this).add((Component) new JLabel("Key: "), (object) gridBagConstraints1);
   gridBagConstraints1.gridx = (__Null) 1;
   RobotPreferences.NewPreferenceEntryDialog preferenceEntryDialog2 = this;
   JTextField jtextField1 = new JTextField(10);
   JTextField jtextField2 = jtextField1;
   this.keyField = jtextField1;
   GridBagConstraints gridBagConstraints2 = gridBagConstraints1;
   ((Container) this).add((Component) jtextField2, (object) gridBagConstraints2);
   gridBagConstraints1.gridx = (__Null) 0;
   gridBagConstraints1.gridy = (__Null) 1;
   ((Container) this).add((Component) new JLabel("Value: "), (object) gridBagConstraints1);
   gridBagConstraints1.gridx = (__Null) 1;
   RobotPreferences.NewPreferenceEntryDialog preferenceEntryDialog3 = this;
   JTextField jtextField3 = new JTextField(10);
   JTextField jtextField4 = jtextField3;
   this.valueField = jtextField3;
   GridBagConstraints gridBagConstraints3 = gridBagConstraints1;
   ((Container) this).add((Component) jtextField4, (object) gridBagConstraints3);
   JPanel jpanel1 = new JPanel();
   ((Container) jpanel1).setLayout((LayoutManager) new GridLayout(0, 2));
   JPanel jpanel2 = jpanel1;
   RobotPreferences.NewPreferenceEntryDialog preferenceEntryDialog4 = this;
   JButton jbutton1 = new JButton("Add");
   JButton jbutton2 = jbutton1;
   this.addButton = jbutton1;
   GridBagConstraints gridBagConstraints4 = gridBagConstraints1;
   ((Container) jpanel2).add((Component) jbutton2, (object) gridBagConstraints4);
   ((AbstractButton) this.addButton).addActionListener((ActionListener) new RobotPreferences\u0024NewPreferenceEntryDialog\u00241(this, obj0));
   this.getRootPane().setDefaultButton(this.addButton);
   JPanel jpanel3 = jpanel1;
   RobotPreferences.NewPreferenceEntryDialog preferenceEntryDialog5 = this;
   JButton jbutton3 = new JButton("Cancel");
   JButton jbutton4 = jbutton3;
   this.cancelButton = jbutton3;
   GridBagConstraints gridBagConstraints5 = gridBagConstraints1;
   ((Container) jpanel3).add((Component) jbutton4, (object) gridBagConstraints5);
   ((AbstractButton) this.cancelButton).addActionListener((ActionListener) new RobotPreferences\u0024NewPreferenceEntryDialog\u00242(this, obj0));
   gridBagConstraints1.gridx = (__Null) 0;
   gridBagConstraints1.gridy = (__Null) 2;
   gridBagConstraints1.gridwidth = (__Null) 2;
   ((Container) this).add((Component) jpanel1, (object) gridBagConstraints1);
   ((Window) this).pack();
 }
Example #15
0
 //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
 //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
 private void addTypesCombo(JPanel parent, JComboBox combo, GridBagLayout gridbag, GridBagConstraints c, int row)
 {
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 2;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridy = row;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.NONE' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.NONE;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.anchor = GridBagConstraints.WEST;
     gridbag.setConstraints(combo, c);
     parent.add(combo);
 }
Example #16
0
 private void initTemplatePanel()
 {
     //UPGRADE_ISSUE: Constructor 'java.awt.GridBagLayout.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
     gridbag = new GridBagLayout();
     //UPGRADE_ISSUE: Constructor 'java.awt.GridBagConstraints.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints = new GridBagConstraints();
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weightx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.weightx = 1.0;
     templatePanel.setLayout(gridbag);
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.anchor = GridBagConstraints.WEST;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridx = 0;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridy = 0;
     templatePanel.add(new JLabel());
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridx = 1;
     templatePanel.add(new JLabel());
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridy = 2;
     templatePanel.add(new JLabel("Type:"));
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     gridbagConstraints.gridy = 3;
     templatePanel.add(new JLabel("Name:"));
 }
Example #17
0
 //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
 //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
 private void addNameField(JPanel parent, JTextField field, GridBagLayout gridbag, GridBagConstraints c, int row)
 {
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 3;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridy = row;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.HORIZONTAL' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.HORIZONTAL;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.anchor = GridBagConstraints.WEST;
     field.setColumns(30);
     gridbag.setConstraints(field, c);
     parent.add(field);
 }
Example #18
0
 public override void init()
 {
   ((Container) this).setLayout((LayoutManager) new GridBagLayout());
   GridBagConstraints gridBagConstraints = new GridBagConstraints();
   gridBagConstraints.fill = (__Null) 1;
   GyroDisplay gyroDisplay = this;
   NameTag.__\u003Cclinit\u003E();
   this.nameTag = new NameTag(this.getFieldName());
   string key = "Value";
   NumberBindable[] numberBindableArray = new NumberBindable[2];
   int index1 = 0;
   Widget.UneditableNumberField uneditableNumberField = this.feedback;
   numberBindableArray[index1] = (NumberBindable) uneditableNumberField;
   int index2 = 1;
   Compass compass = this.compass;
   numberBindableArray[index2] = (NumberBindable) compass;
   Widget.NumberMultiBindable numberMultiBindable = new Widget.NumberMultiBindable(numberBindableArray);
   this.setNumberBinding(key, (NumberBindable) numberMultiBindable);
   this.compass.init();
   this.menu.addActionListener((ActionListener) new GyroDisplay\u00241(this, gyroDisplay, gridBagConstraints));
   gridBagConstraints.gridx = (__Null) 0;
   ((Container) this).add((Component) this.nameTag, (object) gridBagConstraints);
   gridBagConstraints.gridy = (__Null) 1;
   ((Container) this).add((Component) this.menu, (object) gridBagConstraints);
   gridBagConstraints.gridy = (__Null) 2;
   gridBagConstraints.weightx = (__Null) 2.0;
   ((Container) this).add((Component) this.feedback, (object) gridBagConstraints);
 }
        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 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);
        }
 public override void init()
 {
   Widget.BindableBooleanCheckBox.__\u003Cclinit\u003E();
   this.reversed = new Widget.BindableBooleanCheckBox(BooleanBindable.NULL);
   NameTag.__\u003Cclinit\u003E();
   this.nameTag = new NameTag(this.getFieldName());
   this.setBooleanBinding("Reversed", (BooleanBindable) this.reversed);
   ((AbstractButton) this.zero).addActionListener((ActionListener) new EncoderDisplay\u00241(this));
   this.setNumberBinding("Speed", (NumberBindable) this.speed);
   this.setNumberBinding("Distance", (NumberBindable) this.distance);
   this.setNumberBinding("Distance per Tick", (NumberBindable) this.DPT);
   ((Container) this).setLayout((LayoutManager) new GridBagLayout());
   GridBagConstraints gridBagConstraints = new GridBagConstraints();
   gridBagConstraints.fill = (__Null) 1;
   gridBagConstraints.gridx = (__Null) 0;
   gridBagConstraints.weightx = (__Null) 1.0;
   ((Container) this).add((Component) this.nameTag, (object) gridBagConstraints);
   gridBagConstraints.weightx = (__Null) 0.0;
   ((Container) this).add((Component) this.speedTag, (object) gridBagConstraints);
   gridBagConstraints.weightx = (__Null) 1.0;
   ((Container) this).add((Component) this.distanceTag, (object) gridBagConstraints);
   gridBagConstraints.weightx = (__Null) 2.0;
   ((Container) this).add((Component) this.DPTTag, (object) gridBagConstraints);
   gridBagConstraints.weightx = (__Null) 2.0;
   gridBagConstraints.gridx = (__Null) 2;
   gridBagConstraints.gridy = (__Null) 1;
   ((Container) this).add((Component) this.speed, (object) gridBagConstraints);
   gridBagConstraints.gridy = (__Null) 2;
   ((Container) this).add((Component) this.distance, (object) gridBagConstraints);
   gridBagConstraints.gridy = (__Null) 3;
   ((Container) this).add((Component) this.DPT, (object) gridBagConstraints);
   gridBagConstraints.gridy = (__Null) 4;
   ((Container) this).add((Component) this.zero, (object) gridBagConstraints);
   gridBagConstraints.gridx = (__Null) 0;
   gridBagConstraints.weightx = (__Null) 0.0;
   ((Container) this).add((Component) new JLabel("Reversed"), (object) gridBagConstraints);
   gridBagConstraints.gridx = (__Null) 1;
   gridBagConstraints.weightx = (__Null) 10000.0;
   ((JComponent) this.reversed).setAlignmentX(0.0f);
   ((Container) this).add((Component) this.reversed, (object) gridBagConstraints);
 }
 public override void init()
 {
   NameTag.__\u003Cclinit\u003E();
   this.nameTag = new NameTag(this.getFieldName());
   Widget.NumberSlider.__\u003Cclinit\u003E();
   this.controller = new Widget.NumberSlider(this.valueEntry);
   this.controller.setMin(0.0);
   this.controller.setMax(1.0);
   this.controller.setBindableValue(0.0);
   this.controller.setSnapToTicks(false);
   this.controller.setMajorTickSpacing(50);
   this.controller.setPaintTicks(true);
   this.feedback.setText("0.0");
   this.feedback.setColumns(4);
   string key = "Value";
   NumberBindable[] numberBindableArray = new NumberBindable[1];
   int index = 0;
   Widget.UneditableNumberField uneditableNumberField = this.feedback;
   numberBindableArray[index] = (NumberBindable) uneditableNumberField;
   Widget.NumberMultiBindable numberMultiBindable = new Widget.NumberMultiBindable(numberBindableArray);
   this.setNumberBinding(key, (NumberBindable) numberMultiBindable);
   ((Component) this.controller).addKeyListener((KeyListener) new ServoController\u00241(this));
   ((JTextComponent) this.feedback).setEditable(false);
   ((AbstractButton) this.zeroButton).addActionListener((ActionListener) new ServoController\u00242(this));
   ((Container) this).setLayout((LayoutManager) new GridBagLayout());
   GridBagConstraints gridBagConstraints = new GridBagConstraints();
   gridBagConstraints.fill = (__Null) 1;
   gridBagConstraints.gridx = (__Null) 0;
   ((Container) this).add((Component) this.nameTag, (object) gridBagConstraints);
   gridBagConstraints.gridy = (__Null) 1;
   gridBagConstraints.weightx = (__Null) 1.0;
   ((Container) this).add((Component) this.controller, (object) gridBagConstraints);
   gridBagConstraints.weightx = (__Null) 0.0;
   gridBagConstraints.gridx = (__Null) 2;
   ((Container) this).add((Component) this.feedback, (object) gridBagConstraints);
   gridBagConstraints.gridx = (__Null) 3;
   ((Container) this).add((Component) this.zeroButton, (object) gridBagConstraints);
   gridBagConstraints.gridx = (__Null) 4;
 }
Example #23
0
 //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"'
 //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
 private void  addNameField(JPanel parent, JTextField field, GridBagLayout gridbag, GridBagConstraints c, int row)
 {
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridx = 3;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.gridy = row;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.HORIZONTAL' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.fill = GridBagConstraints.HORIZONTAL;
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"'
     c.anchor = GridBagConstraints.WEST;
     field.setColumns(30);
     gridbag.setConstraints(field, c);
     parent.add(field);
 }
Example #24
0
 public PIDEditor()
 {
   PIDEditor pidEditor1 = this;
   ((Container) this).setLayout((LayoutManager) new GridBagLayout());
   this.pLabel = new JLabel("P:");
   this.iLabel = new JLabel("I:");
   this.dLabel = new JLabel("D:");
   this.fLabel = new JLabel("F:");
   this.sLabel = new JLabel("Setpoint:");
   this.eLabel = new JLabel("Enabled:");
   this.pLabel.setHorizontalAlignment(4);
   this.iLabel.setHorizontalAlignment(4);
   this.dLabel.setHorizontalAlignment(4);
   this.fLabel.setHorizontalAlignment(4);
   this.sLabel.setHorizontalAlignment(4);
   this.eLabel.setHorizontalAlignment(4);
   this.pField = new AbstractTableWidget.NumberTableField((AbstractTableWidget) this, "p");
   this.iField = new AbstractTableWidget.NumberTableField((AbstractTableWidget) this, "i");
   this.dField = new AbstractTableWidget.NumberTableField((AbstractTableWidget) this, "d");
   this.fField = new AbstractTableWidget.NumberTableField((AbstractTableWidget) this, "f");
   this.sField = new AbstractTableWidget.NumberTableField((AbstractTableWidget) this, "setpoint");
   this.eBox = new AbstractTableWidget.BooleanTableCheckBox((AbstractTableWidget) this, "enabled");
   int num = 10;
   this.pField.setColumns(num);
   this.iField.setColumns(num);
   this.dField.setColumns(num);
   this.fField.setColumns(num);
   this.sField.setColumns(num);
   GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
   gridBagConstraints1.gridy = (__Null) 1;
   ((Container) this).add((Component) this.pLabel, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 2;
   ((Container) this).add((Component) this.iLabel, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 3;
   ((Container) this).add((Component) this.dLabel, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 4;
   ((Container) this).add((Component) this.fLabel, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 5;
   ((Container) this).add((Component) this.sLabel, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 6;
   ((Container) this).add((Component) this.eLabel, (object) gridBagConstraints1);
   gridBagConstraints1.gridx = (__Null) 1;
   gridBagConstraints1.weightx = (__Null) 1.0;
   gridBagConstraints1.gridy = (__Null) 0;
   gridBagConstraints1.fill = (__Null) 2;
   PIDEditor pidEditor2 = this;
   NameTag nameTag1 = new NameTag("");
   NameTag nameTag2 = nameTag1;
   this.nameTag = nameTag1;
   GridBagConstraints gridBagConstraints2 = gridBagConstraints1;
   ((Container) this).add((Component) nameTag2, (object) gridBagConstraints2);
   this.nameTag.setHorizontalAlignment(2);
   gridBagConstraints1.gridy = (__Null) 1;
   ((Container) this).add((Component) this.pField, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 2;
   ((Container) this).add((Component) this.iField, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 3;
   ((Container) this).add((Component) this.dField, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 4;
   ((Container) this).add((Component) this.fField, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 5;
   ((Container) this).add((Component) this.sField, (object) gridBagConstraints1);
   gridBagConstraints1.gridy = (__Null) 6;
   ((Container) this).add((Component) this.eBox, (object) gridBagConstraints1);
   Dimension.__\u003Cclinit\u003E();
   ((JComponent) this).setMaximumSize(new Dimension(int.MaxValue, (int) ((JComponent) this).getPreferredSize().height));
   ((JComponent) this).revalidate();
   ((Component) this).repaint();
 }
Example #25
0
        private void InitComponents()
        {
            JComponent.SetDefaultLocale(Locale.US);
            java.awt.GridBagConstraints gridBagConstraints;
            choosePanel  = new JPanel();
            statusPanel  = new JPanel();
            status       = new JLabel("initializing Q2Sharp...");
            jTextField1  = new JTextField();
            changeButton = new JButton();
            cancelButton = new JButton();
            exitButton   = new JButton();
            okButton     = new JButton();
            SetDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
            SetTitle("Jake2 - Bytonic Software");
            SetResizable(false);
            AddWindowListener(new AnonymousWindowAdapter(this));
            choosePanel.SetLayout(new GridBagLayout());
            choosePanel.SetMaximumSize(new Size(400, 100));
            choosePanel.SetMinimumSize(new Size(400, 100));
            choosePanel.SetPreferredSize(new Size(400, 100));
            gridBagConstraints           = new GridBagConstraints();
            gridBagConstraints.gridx     = 0;
            gridBagConstraints.gridy     = 0;
            gridBagConstraints.gridwidth = 1;
            gridBagConstraints.insets    = new Insets(5, 5, 5, 5);
            gridBagConstraints.weightx   = 0;
            gridBagConstraints.anchor    = GridBagConstraints.SOUTHWEST;
            choosePanel.Add(new JLabel("baseq2 directory"), gridBagConstraints);
            gridBagConstraints.gridx     = 1;
            gridBagConstraints.gridy     = 0;
            gridBagConstraints.gridwidth = 2;
            gridBagConstraints.fill      = java.awt.GridBagConstraints.BOTH;
            gridBagConstraints.insets    = new Insets(5, 2, 5, 2);
            gridBagConstraints.weightx   = 1;
            choosePanel.Add(jTextField1, gridBagConstraints);
            changeButton.SetText("...");
            changeButton.AddActionListener(new AnonymousActionListener(this));
            gridBagConstraints.gridx     = 3;
            gridBagConstraints.gridy     = 0;
            gridBagConstraints.gridwidth = 1;
            gridBagConstraints.weightx   = 0;
            gridBagConstraints.fill      = java.awt.GridBagConstraints.NONE;
            gridBagConstraints.insets    = new Insets(5, 2, 5, 5);
            gridBagConstraints.anchor    = java.awt.GridBagConstraints.EAST;
            choosePanel.Add(changeButton, gridBagConstraints);
            gridBagConstraints.gridx     = 0;
            gridBagConstraints.gridy     = 1;
            gridBagConstraints.gridwidth = 4;
            gridBagConstraints.weightx   = 0;
            gridBagConstraints.weighty   = 1;
            gridBagConstraints.fill      = java.awt.GridBagConstraints.VERTICAL;
            choosePanel.Add(new JPanel(), gridBagConstraints);
            cancelButton.SetText("Cancel");
            cancelButton.AddActionListener(new AnonymousActionListener1(this));
            gridBagConstraints.gridx     = 0;
            gridBagConstraints.gridy     = 2;
            gridBagConstraints.gridwidth = 4;
            gridBagConstraints.weighty   = 0;
            gridBagConstraints.insets    = new Insets(5, 5, 5, 5);
            gridBagConstraints.anchor    = java.awt.GridBagConstraints.SOUTH;
            choosePanel.Add(cancelButton, gridBagConstraints);
            exitButton.SetText("Exit");
            exitButton.AddActionListener(new AnonymousActionListener2(this));
            gridBagConstraints.gridx     = 0;
            gridBagConstraints.gridy     = 2;
            gridBagConstraints.gridwidth = 1;
            gridBagConstraints.anchor    = java.awt.GridBagConstraints.SOUTHWEST;
            choosePanel.Add(exitButton, gridBagConstraints);
            okButton.SetText("OK");
            okButton.AddActionListener(new AnonymousActionListener3(this));
            gridBagConstraints.gridx     = 2;
            gridBagConstraints.gridy     = 2;
            gridBagConstraints.gridwidth = 2;
            gridBagConstraints.anchor    = java.awt.GridBagConstraints.SOUTHEAST;
            choosePanel.Add(okButton, gridBagConstraints);
            Jake2Canvas c = new Jake2Canvas();

            GetContentPane().Add(c, BorderLayout.CENTER);
            statusPanel.SetLayout(new GridBagLayout());
            statusPanel.SetMaximumSize(new Dimension(400, 100));
            statusPanel.SetMinimumSize(new Dimension(400, 100));
            statusPanel.SetPreferredSize(new Dimension(400, 100));
            gridBagConstraints           = new GridBagConstraints();
            gridBagConstraints.gridx     = 0;
            gridBagConstraints.gridy     = 0;
            gridBagConstraints.gridwidth = 1;
            gridBagConstraints.fill      = java.awt.GridBagConstraints.HORIZONTAL;
            gridBagConstraints.insets    = new Insets(10, 10, 10, 10);
            gridBagConstraints.weightx   = 1;
            statusPanel.Add(status, gridBagConstraints);
            GetContentPane().Add(statusPanel, java.awt.BorderLayout.SOUTH);
            progressPanel = new ProgressPanel(this);
            installPanel  = new InstallPanel(this);
            notFoundPanel = new NotFoundPanel(this);
            Pack();
        }
Example #26
0
        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);
        }
Example #27
0
        public virtual int SetMode(Size dim, int mode, bool fullscreen)
        {
            VID.Printf(Defines.PRINT_ALL, "Initializing OpenGL display\\n");
            VID.Printf(Defines.PRINT_ALL, "...setting mode " + mode + ":");
            //if (Globals.appletMode && container == null)
            //{
            //    container = (Container)Globals.applet;
            //}

            if (device == null)
            {
                GraphicsEnvironment env = GraphicsEnvironment.GetLocalGraphicsEnvironment();
                device = env.GetDefaultScreenDevice();
            }

            if (oldDisplayMode == null)
            {
                oldDisplayMode = device.GetDisplayMode();
            }

            if (!VID.GetModeInfo(out var newDim, mode))
            {
                VID.Printf(Defines.PRINT_ALL, " invalid mode\\n");
                return(Base.rserr_invalid_mode);
            }

            VID.Printf(Defines.PRINT_ALL, " " + newDim.Width + " " + newDim.Height + '\\');
            if (!Globals.appletMode)
            {
                if (window != null)
                {
                    Shutdown();
                }
                window    = new Frame("Jake2 (jsr231)");
                container = window;
                ImageIcon icon = new ImageIcon(GetType().GetResource("/icon-small.png"));
                window.SetIconImage(icon.GetImage());
                window.SetLayout(new GridBagLayout());
                window.AddWindowListener(new AnonymousWindowAdapter(this));
            }

            if (Globals.appletMode)
            {
                Shutdown();
                fullscreen = false;
                JOGLKBD.Init(container);
            }

            Display canvas = new Display(new GLCapabilities());

            canvas.SetFocusTraversalKeysEnabled(false);
            canvas.SetSize(newDim.Width, newDim.Height);
            GridBagConstraints gbc = new GridBagConstraints();

            gbc.fill    = GridBagConstraints.BOTH;
            gbc.weightx = gbc.weighty = 1;
            container.AddComponentListener(JOGLKBD.listener);
            canvas.AddKeyListener(JOGLKBD.listener);
            canvas.AddMouseListener(JOGLKBD.listener);
            canvas.AddMouseMotionListener(JOGLKBD.listener);
            canvas.AddMouseWheelListener(JOGLKBD.listener);
            if (fullscreen)
            {
                container.Add(canvas, gbc);
                VideoMode VideoMode = FindDisplayMode(newDim);
                newDim.Width  = VideoMode.GetWidth();
                newDim.Height = VideoMode.GetHeight();
                window.SetUndecorated(true);
                window.SetResizable(false);
                device.SetFullScreenWindow(window);
                if (device.IsFullScreenSupported())
                {
                    device.SetDisplayMode(VideoMode);
                }
                window.SetLocation(0, 0);
                window.SetSize(VideoMode.GetWidth(), VideoMode.GetHeight());
                canvas.SetSize(VideoMode.GetWidth(), VideoMode.GetHeight());
                VID.Printf(Defines.PRINT_ALL, "...setting fullscreen " + GetModeString(VideoMode) + '\\');
            }
            else
            {
                if (!Globals.appletMode)
                {
                    container.Add(canvas, gbc);
                    Frame f2 = window;
                    try
                    {
                        EventQueue.InvokeAndWait(new AnonymousRunnable(this));
                    }
                    catch (Exception e)
                    {
                        e.PrintStackTrace();
                    }
                }
                else
                {
                    Display fd = canvas;
                    try
                    {
                        EventQueue.InvokeAndWait(new AnonymousRunnable1(this));
                    }
                    catch (Exception e)
                    {
                        e.PrintStackTrace();
                    }
                }
            }

            if (!Globals.appletMode)
            {
                while (!canvas.IsDisplayable() || !window.IsDisplayable())
                {
                    try
                    {
                        Thread.Sleep(100);
                    }
                    catch (InterruptedException e)
                    {
                    }
                }
            }

            canvas.RequestFocus();
            this.display = canvas;
            SetGL(display.GetGL());
            Init(0, 0);
            return(Base.rserr_ok);
        }