public static Molecule ReadNative(System.IO.StreamReader in_Renamed) { Molecule mol = new Molecule(); //UPGRADE_NOTE: Final was removed from the declaration of 'GENERIC_ERROR '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'" System.String GENERIC_ERROR = "Invalid SketchEl file."; try { System.String line = in_Renamed.ReadLine(); if (!line.StartsWith("SketchEl!")) throw new System.IO.IOException("Not a SketchEl file."); int p1 = line.IndexOf('('), p2 = line.IndexOf(','), p3 = line.IndexOf(')'); if (p1 == 0 || p2 == 0 || p3 == 0) throw new System.IO.IOException(GENERIC_ERROR); int numAtoms = System.Int32.Parse(line.Substring(p1 + 1, (p2) - (p1 + 1)).Trim()); int numBonds = System.Int32.Parse(line.Substring(p2 + 1, (p3) - (p2 + 1)).Trim()); for (int n = 0; n < numAtoms; n++) { line = in_Renamed.ReadLine(); // TODO: verify java's split method syntax: "[\\=\\,\\;]" System.String[] bits = line.Split('=', ',', ';'); if (bits.Length < 5) throw new System.IO.IOException(GENERIC_ERROR); int num = mol.AddAtom(bits[0], System.Double.Parse(bits[1].Trim()), System.Double.Parse(bits[2].Trim()), System.Int32.Parse(bits[3].Trim()), System.Int32.Parse(bits[4].Trim())); if (bits.Length >= 6 && bits[5].Length > 0 && bits[5][0] == 'e') mol.SetAtomHExplicit(num, System.Int32.Parse(bits[5].Substring(1))); } for (int n = 0; n < numBonds; n++) { line = in_Renamed.ReadLine(); System.String[] bits = line.Split('-', '=', ','); // "[\\-\\=\\,]"); if (bits.Length < 4) throw new System.IO.IOException(GENERIC_ERROR); mol.AddBond(System.Int32.Parse(bits[0].Trim()), System.Int32.Parse(bits[1].Trim()), System.Int32.Parse(bits[2].Trim()), System.Int32.Parse(bits[3].Trim())); } line = in_Renamed.ReadLine(); if (String.CompareOrdinal(line, "!End") != 0) throw new System.IO.IOException(GENERIC_ERROR); } catch (System.Exception) { throw new System.IO.IOException(GENERIC_ERROR); } return mol; }
public virtual void propertyChange(System.Object event_sender, SupportClass.PropertyChangingEventArgs ev) { bool update = false; System.String prop = ev.PropertyName; if ("directoryChanged".Equals(prop)) // changed directory, do nothing much { file = null; update = true; } else if ("SelectedFilesChangedProperty".Equals(prop)) // file just got selected { file = (System.IO.FileInfo) ev.NewValue; update = true; } if (update) { thumbnail = null; Molecule mol = null; if (file != null && System.IO.File.Exists(file.FullName)) { try { //UPGRADE_TODO: Constructor 'java.io.FileInputStream.FileInputStream' was converted to 'System.IO.FileStream.FileStream' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioFileInputStreamFileInputStream_javaioFile'" System.IO.FileStream istr = new System.IO.FileStream(file.FullName, System.IO.FileMode.Open, System.IO.FileAccess.Read); mol = MoleculeStream.ReadUnknown(istr); istr.Close(); } catch (System.IO.IOException) { mol = null; } } if (mol == null) mol = new Molecule(); Replace(mol); ScaleToFit(); if (Visible) { //UPGRADE_TODO: Method 'java.awt.Component.repaint' was converted to 'System.Windows.Forms.Control.Refresh' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtComponentrepaint'" Refresh(); } } }
public virtual void AddTemplate(Molecule Mol) { templ.Add(Mol); }
// compare to another molecule instance; null is equivalent to empty; return values: // -1 if Mol < Other // 0 if Mol == Other // 1 if Mol > Other // can be used to sort molecules, albeit crudely; does not do any kind of canonical preprocessing public virtual int CompareTo(Molecule Other) { if (Other == null) return NumAtoms() == 0?0:1; // null is equivalent to empty if (NumAtoms() < Other.NumAtoms()) return - 1; if (NumAtoms() > Other.NumAtoms()) return 1; if (NumBonds() < Other.NumBonds()) return - 1; if (NumBonds() > Other.NumBonds()) return 1; for (int n = 1; n <= NumAtoms(); n++) { int c = String.CompareOrdinal(AtomElement(n), Other.AtomElement(n)); if (c != 0) return c; if (AtomX(n) < Other.AtomX(n)) return - 1; if (AtomX(n) > Other.AtomX(n)) return 1; if (AtomY(n) < Other.AtomY(n)) return - 1; if (AtomY(n) > Other.AtomY(n)) return 1; if (AtomCharge(n) < Other.AtomCharge(n)) return - 1; if (AtomCharge(n) > Other.AtomCharge(n)) return 1; if (AtomUnpaired(n) < Other.AtomUnpaired(n)) return - 1; if (AtomUnpaired(n) > Other.AtomUnpaired(n)) return 1; if (AtomHExplicit(n) < Other.AtomHExplicit(n)) return - 1; if (AtomHExplicit(n) > Other.AtomHExplicit(n)) return 1; } for (int n = 1; n <= NumBonds(); n++) { if (BondFrom(n) < Other.BondFrom(n)) return - 1; if (BondFrom(n) > Other.BondFrom(n)) return 1; if (BondTo(n) < Other.BondTo(n)) return - 1; if (BondTo(n) > Other.BondTo(n)) return 1; if (BondOrder(n) < Other.BondOrder(n)) return - 1; if (BondOrder(n) > Other.BondOrder(n)) return 1; if (BondType(n) < Other.BondType(n)) return - 1; if (BondType(n) > Other.BondType(n)) return 1; } return 0; }
// returns an equivalent replica of the molecule public virtual Molecule Clone() { Molecule mol = new Molecule(); for (int n = 1; n <= NumAtoms(); n++) { Atom a = atoms[n - 1]; int num = mol.AddAtom(a.Element, a.X, a.Y, a.Charge, a.Unpaired); mol.SetAtomHExplicit(num, AtomHExplicit(n)); } for (int n = 1; n <= NumBonds(); n++) { Bond b = bonds[n - 1]; mol.AddBond(b.From, b.To, b.Order, b.Type); } return mol; }
private void InitBlock(Molecule enclosingInstance) { this.enclosingInstance = enclosingInstance; }
public static void WriteNative(System.IO.StreamWriter output, Molecule mol) { //UPGRADE_ISSUE: Class 'java.text.DecimalFormat' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javatextDecimalFormat'" //UPGRADE_ISSUE: Constructor 'java.text.DecimalFormat.DecimalFormat' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javatextDecimalFormat'" // DecimalFormat fmt = new DecimalFormat("0.0000"); string fmtStr = "N4"; output.Write("SketchEl!(" + mol.NumAtoms() + "," + mol.NumBonds() + ")\n"); for (int n = 1; n <= mol.NumAtoms(); n++) { System.String hy = mol.AtomHExplicit(n) != Molecule.HEXPLICIT_UNKNOWN?("e" + mol.AtomHExplicit(n)):("i" + mol.AtomHydrogens(n)); output.Write(mol.AtomElement(n) + "=" + mol.AtomX(n).ToString(fmtStr) + "," + mol.AtomY(n).ToString(fmtStr) + ";" + mol.AtomCharge(n) + "," + mol.AtomUnpaired(n) + "," + hy + "\n"); } for (int n = 1; n <= mol.NumBonds(); n++) { output.Write(mol.BondFrom(n) + "-" + mol.BondTo(n) + "=" + mol.BondOrder(n) + "," + mol.BondType(n) + "\n"); } output.Write("!End\n"); output.Flush(); }
internal virtual void TestMol() { Molecule mol = new Molecule(); mol.AddAtom("N", 0, 0); mol.AddAtom("C", 1.2, 0); mol.AddAtom("O", 2, 0.8); mol.AddAtom("H", 3, - 0.8); mol.AddAtom("H", 4, 0); mol.AddBond(1, 2, 1); mol.AddBond(2, 3, 2); mol.AddBond(3, 4, 1); mol.AddBond(4, 5, 0); editor.Replace(mol); }
public static void WriteCMLXML(System.IO.Stream ostr, Molecule mol) { //UPGRADE_WARNING: At least one expression was used more than once in the target code. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1181'" using (StreamWriter writer = new System.IO.StreamWriter(ostr, System.Text.Encoding.Default)) { WriteCMLXML(writer, mol); } }
public static void WriteCMLXML(System.IO.StreamWriter output, Molecule mol) { output.Write("<cml>\n"); output.Write(" <molecule xmlns=\"http://www.xml-cml.org/schema/cml2/core\">\n"); output.Write(" <atomArray>\n"); for (int n = 1; n <= mol.NumAtoms(); n++) { output.Write(" <atom id=\"a" + n + "\" elementType=\"" + mol.AtomElement(n) + "\"" + " x2=\"" + mol.AtomX(n) + "\" y2=\"" + mol.AtomY(n) + "\" hydrogenCount=\"" + mol.AtomHydrogens(n) + "\"/>\n"); } output.Write(" </atomArray>\n"); output.Write(" <bondArray>\n"); for (int n = 1; n <= mol.NumBonds(); n++) { output.Write(" <bond id=\"b" + n + "\" atomRefs2=\"a" + mol.BondFrom(n) + " a" + mol.BondTo(n) + "\" order=\"" + mol.BondOrder(n) + "\"/>\n"); } output.Write(" </bondArray>\n"); output.Write(" </molecule>\n"); output.Write("</cml>\n"); output.Flush(); }
public static void WriteMDLMOL(System.IO.StreamWriter output, Molecule mol) { //UPGRADE_ISSUE: Class 'java.text.DecimalFormat' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javatextDecimalFormat'" //UPGRADE_ISSUE: Constructor 'java.text.DecimalFormat.DecimalFormat' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javatextDecimalFormat'" // DecimalFormat fmt = new DecimalFormat("0.0000"); string fmtStr = "N4"; output.Write("\nNuGenChem MOLfile\n\n"); output.Write(intrpad(mol.NumAtoms(), 3) + intrpad(mol.NumBonds(), 3) + " 0 0 0 0 0 0 0 0999 V2000\n"); System.String line; for (int n = 1; n <= mol.NumAtoms(); n++) { string str = mol.AtomX(n).ToString(fmtStr); line = rep(" ", 10 - str.Length) + str; str = mol.AtomY(n).ToString(fmtStr); line += (rep(" ", 10 - str.Length) + str); line += " 0.0000 "; str = mol.AtomElement(n); line += (str + rep(" ", 4 - str.Length) + "0"); int chg = mol.AtomCharge(n), spin = mol.AtomUnpaired(n); if (chg >= - 3 && chg <= - 1) chg = 4 - chg; else if (chg == 0 && spin == 2) chg = 4; else if (chg < 1 || chg > 3) chg = 0; line += (intrpad(chg, 3) + " 0 0 0 0 0 0 0 0 0 0"); output.Write(line + "\n"); } for (int n = 1; n <= mol.NumBonds(); n++) { int type = mol.BondOrder(n); if (type < 1 || type > 3) type = 1; int stereo = mol.BondType(n); if (stereo == Molecule.BONDTYPE_NORMAL) { } else if (stereo == Molecule.BONDTYPE_INCLINED) { stereo = 1; type = 1; } else if (stereo == Molecule.BONDTYPE_DECLINED) { stereo = 6; type = 1; } else if (stereo == Molecule.BONDTYPE_UNKNOWN) { stereo = 4; type = 1; } else stereo = 0; output.Write(intrpad(mol.BondFrom(n), 3) + intrpad(mol.BondTo(n), 3) + intrpad(type, 3) + intrpad(stereo, 3) + " 0 0 0\n"); } int count = 0; line = ""; for (int n = 1; n <= mol.NumAtoms(); n++) if (mol.AtomCharge(n) != 0) { line += (intrpad(n, 4) + intrpad(mol.AtomCharge(n), 4)); count++; if (count == 8) { output.Write("M CHG" + intrpad(count, 3) + line + "\n"); count = 0; line = ""; } } if (count > 0) output.Write("M CHG" + intrpad(count, 3) + line + "\n"); count = 0; line = ""; for (int n = 1; n <= mol.NumAtoms(); n++) if (mol.AtomUnpaired(n) != 0) { line += (intrpad(n, 4) + intrpad(mol.AtomUnpaired(n), 4)); count++; if (count == 8) { output.Write("M RAD" + intrpad(count, 3) + line + "\n"); count = 0; line = ""; } } if (count > 0) output.Write("M RAD" + intrpad(count, 3) + line + "\n"); output.Write("M END\n"); output.Flush(); }
internal static Molecule ReadXML(FileStream istr) { Molecule mol = new Molecule(); const string NAMESPACE = "http://www.xml-cml.org/schema/cml2/core"; const string ATTRIBUTENS = ""; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(istr); XPathNavigator navigator = xmlDoc.CreateNavigator(); if (navigator.MoveToFirstChild()) { navigator.MoveToChild("molecule", NAMESPACE); //navigator.MoveToFirstChild(); if (navigator.MoveToChild("atomArray", NAMESPACE)) { if (navigator.MoveToChild("atom", NAMESPACE)) { do { string elementType= navigator.GetAttribute("elementType", ATTRIBUTENS); string x2String = navigator.GetAttribute("x2", ATTRIBUTENS); if (!string.IsNullOrEmpty(x2String)) { double x2 = Utility.SafeDouble(x2String); double y2 = Utility.SafeDouble(navigator.GetAttribute("y2", ATTRIBUTENS)); int hydrogenCount = Utility.SafeInt(navigator.GetAttribute("hydrogenCount", ATTRIBUTENS)); // TODO: How do we handle hydrogen count? mol.AddAtom(elementType, x2, y2); } else { double x3 = Utility.SafeDouble(navigator.GetAttribute("x3", ATTRIBUTENS)); double y3 = Utility.SafeDouble(navigator.GetAttribute("y3", ATTRIBUTENS)); int hydrogenCount = Utility.SafeInt(navigator.GetAttribute("hydrogenCount", ATTRIBUTENS)); // TODO: How do we handle hydrogen count? mol.AddAtom(elementType, x3, y3); } } while (navigator.MoveToNext("atom", NAMESPACE)); navigator.MoveToParent(); } navigator.MoveToParent(); } if (navigator.MoveToChild("bondArray", NAMESPACE)) { if (navigator.MoveToChild("bond", NAMESPACE)) { do { string atomRefs = navigator.GetAttribute("atomRefs2", ATTRIBUTENS); string[] parts = atomRefs.Split(' '); if (parts.Length == 2) { int from = Utility.SafeInt(parts[0].Substring(1)); int to = Utility.SafeInt(parts[1].Substring(1)); int order = Utility.SafeInt(navigator.GetAttribute("order", ATTRIBUTENS)); int type = 0; // Where or is type stored? // TODO: How do we handle hydrogen count? mol.AddBond(from, to, order, type); } } while (navigator.MoveToNext("bond", NAMESPACE)); navigator.MoveToParent(); } navigator.MoveToParent(); } } return mol; }
public static Molecule ReadMDLMOL(StreamReader in_Renamed) { Molecule mol = new Molecule(); //UPGRADE_NOTE: Final was removed from the declaration of 'GENERIC_ERROR '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'" System.String GENERIC_ERROR = "Invalid MDL MOL file."; try { System.String line = null; for (int n = 0; n < 4; n++) line = in_Renamed.ReadLine(); if (line == null || !line.Substring(34, (39) - (34)).Equals("V2000")) throw new System.IO.IOException(GENERIC_ERROR); int numAtoms = System.Int32.Parse(line.Substring(0, (3) - (0)).Trim()); int numBonds = System.Int32.Parse(line.Substring(3, (6) - (3)).Trim()); for (int n = 0; n < numAtoms; n++) { line = in_Renamed.ReadLine(); double x = System.Double.Parse(line.Substring(0, (10) - (0)).Trim()); double y = System.Double.Parse(line.Substring(10, (20) - (10)).Trim()); System.String el = line.Substring(31, (33) - (31)).Trim(); int chg = System.Int32.Parse(line.Substring(36, (39) - (36)).Trim()), rad = 0; if (chg <= 3) { } else if (chg == 4) { chg = 0; rad = 2; } else chg = 4 - chg; mol.AddAtom(el, x, y, chg, rad); } for (int n = 0; n < numBonds; n++) { line = in_Renamed.ReadLine(); int from = System.Int32.Parse(line.Substring(0, (3) - (0)).Trim()), to = System.Int32.Parse(line.Substring(3, (6) - (3)).Trim()); int type = System.Int32.Parse(line.Substring(6, (9) - (6)).Trim()), stereo = System.Int32.Parse(line.Substring(9, (12) - (9)).Trim()); if (from == to || from < 1 || from > numAtoms || to < 1 || to > numAtoms) throw new System.IO.IOException(GENERIC_ERROR); int order = type >= 1 && type <= 3?type:1; int style = Molecule.BONDTYPE_NORMAL; if (stereo == 1) style = Molecule.BONDTYPE_INCLINED; else if (stereo == 6) style = Molecule.BONDTYPE_DECLINED; else if (stereo == 3 || stereo == 4) style = Molecule.BONDTYPE_UNKNOWN; mol.AddBond(from, to, order, style); } while (true) { line = in_Renamed.ReadLine(); if (line.StartsWith("M END")) break; int type = 0; if (line.StartsWith("M CHG")) type = 1; else if (line.StartsWith("M RAD")) type = 2; if (type > 0) { int len = System.Int32.Parse(line.Substring(6, (9) - (6)).Trim()); for (int n = 0; n < len; n++) { int apos = System.Int32.Parse(line.Substring(9 + 8 * n, (13 + 8 * n) - (9 + 8 * n)).Trim()); int aval = System.Int32.Parse(line.Substring(13 + 8 * n, (17 + 8 * n) - (13 + 8 * n)).Trim()); if (type == 1) mol.SetAtomCharge(apos, aval); else mol.SetAtomUnpaired(apos, aval); } } } } catch (System.Exception) { throw new System.IO.IOException(GENERIC_ERROR); } return mol; }
//#region ITemplSelectListener Members //void ITemplSelectListener.TemplSelected(Molecule mol, int idx) //{ //} //#endregion #region ITemplSelectListener Members void ITemplSelectListener.TemplSelected(Molecule mol, int idx) { lastTemplate = mol; templateIdx = idx; editor.SetToolTemplate(mol, idx); }
public Atom(Molecule enclosingInstance) { InitBlock(enclosingInstance); }
public virtual void SetMolecule(Molecule Mol) { editor.Replace(Mol); editor.ScaleToFit(); editor.NotifySaved(); }
public Bond(Molecule enclosingInstance) { InitBlock(enclosingInstance); }
public virtual void TemplSelected(Molecule mol, int idx) { lastTemplate = mol; templateIdx = idx; editor.SetToolTemplate(mol, idx); }
public DialogEdit(Control Parent, Molecule Mol, List<int> SelIdx) { // super(Parent, "Edit Molecule", true) mol = Mol.Clone(); aselidx = SelIdx; //UPGRADE_ISSUE: The following fragment of code could not be parsed and was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1156'" bselidx = new List<int>(); for (int n = 1; n <= mol.NumBonds(); n++) if (aselidx.IndexOf(mol.BondFrom(n)) >= 0 && aselidx.IndexOf(mol.BondTo(n)) >= 0) bselidx.Add(n); //UPGRADE_ISSUE: Method 'javax.swing.JDialog.setLayout' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJDialogsetLayout_javaawtLayoutManager'" //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaawtBorderLayout'" /* setLayout(new BorderLayout());*/ atoms = new AnonymousClassJTable(this, CompileAtomData(), new System.String[] { "#", "El", "X", "Y", "Charge", "Unpaired", "HExplicit" }); bonds = new AnonymousClassJTable1(this, CompileBondData(), new System.String[] { "#", "From", "To", "Order", "Type" }); //UPGRADE_TODO: Method 'javax.swing.table.TableColumn.setCellEditor' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1095'" //UPGRADE_TODO: The equivalent in .NET for method 'javax.swing.table.TableColumnModel.getColumn' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" // ((System.Data.DataTable)atoms.DataSource).Columns[0].setCellEditor(null); System.Windows.Forms.ComboBox bondTypes = new System.Windows.Forms.ComboBox(); for (int n = 0; n < BOND_TYPES.Length; n++) bondTypes.Items.Add(BOND_TYPES[n]); //UPGRADE_TODO: Method 'javax.swing.table.TableColumn.setCellEditor' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1095'" //UPGRADE_TODO: The equivalent in .NET for method 'javax.swing.table.TableColumnModel.getColumn' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" //UPGRADE_ISSUE: Constructor 'javax.swing.DefaultCellEditor.DefaultCellEditor' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingDefaultCellEditor'" // TODO: Have to see this in action before I can tel what they need to do. // ((System.Data.DataTable)bonds.DataSource).Columns[4].setCellEditor(new DefaultCellEditor(bondTypes)); System.Windows.Forms.Panel tabAtoms = new System.Windows.Forms.Panel(), tabBonds = new System.Windows.Forms.Panel(); //UPGRADE_ISSUE: Method 'java.awt.Container.setLayout' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaawtContainersetLayout_javaawtLayoutManager'" //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaawtBorderLayout'" /* tabAtoms.setLayout(new BorderLayout());*/ //UPGRADE_ISSUE: Method 'java.awt.Container.setLayout' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaawtContainersetLayout_javaawtLayoutManager'" //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaawtBorderLayout'" /* tabBonds.setLayout(new BorderLayout());*/ //UPGRADE_ISSUE: Method 'javax.swing.JTable.setPreferredScrollableViewportSize' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJTablesetPreferredScrollableViewportSize_javaawtDimension'" // TODO: atoms.setPreferredScrollableViewportSize(new System.Drawing.Size(350, 200)); //UPGRADE_ISSUE: Method 'javax.swing.JTable.setPreferredScrollableViewportSize' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaxswingJTablesetPreferredScrollableViewportSize_javaawtDimension'" // TODO: bonds.setPreferredScrollableViewportSize(new System.Drawing.Size(350, 200)); //UPGRADE_TODO: Constructor 'javax.swing.JScrollPane.JScrollPane' was converted to 'System.Windows.Forms.ScrollableControl.ScrollableControl' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJScrollPaneJScrollPane_javaawtComponent'" System.Windows.Forms.ScrollableControl temp_scrollablecontrol2; temp_scrollablecontrol2 = new System.Windows.Forms.ScrollableControl(); temp_scrollablecontrol2.AutoScroll = true; temp_scrollablecontrol2.Controls.Add(atoms); //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent'" System.Windows.Forms.Control temp_Control; temp_Control = temp_scrollablecontrol2; tabAtoms.Controls.Add(temp_Control); //UPGRADE_TODO: Constructor 'javax.swing.JScrollPane.JScrollPane' was converted to 'System.Windows.Forms.ScrollableControl.ScrollableControl' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJScrollPaneJScrollPane_javaawtComponent'" System.Windows.Forms.ScrollableControl temp_scrollablecontrol4; temp_scrollablecontrol4 = new System.Windows.Forms.ScrollableControl(); temp_scrollablecontrol4.AutoScroll = true; temp_scrollablecontrol4.Controls.Add(bonds); //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent'" System.Windows.Forms.Control temp_Control2; temp_Control2 = temp_scrollablecontrol4; tabBonds.Controls.Add(temp_Control2); tabs = new System.Windows.Forms.TabControl(); //UPGRADE_TODO: Method 'javax.swing.JTabbedPane.addTab' was converted to 'SupportClass.TabControlSupport.AddTab' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJTabbedPaneaddTab_javalangString_javaawtComponent'" SupportClass.TabControlSupport.AddTab(tabs, "Atoms", tabAtoms); //UPGRADE_TODO: Method 'javax.swing.JTabbedPane.addTab' was converted to 'SupportClass.TabControlSupport.AddTab' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaxswingJTabbedPaneaddTab_javalangString_javaawtComponent'" SupportClass.TabControlSupport.AddTab(tabs, "Bonds", tabBonds); //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent_javalangObject'" Controls.Add(tabs); tabs.Dock = System.Windows.Forms.DockStyle.Fill; tabs.BringToFront(); System.Windows.Forms.Panel buttons = new System.Windows.Forms.Panel(); //UPGRADE_TODO: Constructor 'java.awt.FlowLayout.FlowLayout' was converted to 'System.Object[]' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtFlowLayoutFlowLayout_int'" buttons.Tag = new System.Object[] { (int)System.Drawing.ContentAlignment.TopRight, 5, 5 }; buttons.Layout += new System.Windows.Forms.LayoutEventHandler(SupportClass.FlowLayoutResize); accept = SupportClass.ButtonSupport.CreateStandardButton("Accept"); accept.Click += new System.EventHandler(this.actionPerformed); SupportClass.CommandManager.CheckCommand(accept); reject = SupportClass.ButtonSupport.CreateStandardButton("Reject"); reject.Click += new System.EventHandler(this.actionPerformed); SupportClass.CommandManager.CheckCommand(reject); //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent'" buttons.Controls.Add(accept); //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent'" buttons.Controls.Add(reject); //UPGRADE_TODO: Method 'java.awt.Container.add' was converted to 'System.Windows.Forms.ContainerControl.Controls.Add' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaawtContaineradd_javaawtComponent_javalangObject'" Controls.Add(buttons); buttons.Dock = System.Windows.Forms.DockStyle.Bottom; buttons.SendToBack(); // TODO: What does pack do? // pack(); }