コード例 #1
0
        //UPGRADE_TODO: Interface 'javax.swing.tree.TreeModel' was converted to 'System.Windows.Forms.TreeNode' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_3"'
        //UPGRADE_TODO: Interface 'javax.swing.event.TreeSelectionListener' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1095_3"'
        public JTreeStringTemplatePanel(System.Windows.Forms.TreeNode tm, TreeSelectionListener listener)
        {
            // use a layout that will stretch tree to panel size
            //UPGRADE_ISSUE: Method 'java.awt.Container.setLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtContainersetLayout_javaawtLayoutManager_3"'
            //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout_3"'
            /*
            setLayout(new BorderLayout());*/

            // Create tree
            tree = SupportClass.TreeSupport.CreateTreeView(tm);

            // Change line style
            //UPGRADE_ISSUE: Method 'javax.swing.JComponent.putClientProperty' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaxswingJComponentputClientProperty_javalangObject_javalangObject_3"'
            tree.putClientProperty("JTree.lineStyle", "Angled");

            // Add TreeSelectionListener
            if (listener != null)
                tree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(listener.valueChanged);

            // Put tree in a scrollable pane's viewport
            //UPGRADE_TODO: Class 'javax.swing.JScrollPane' was converted to 'System.Windows.Forms.ScrollableControl' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_3"'
            //UPGRADE_TODO: Constructor 'javax.swing.JScrollPane.JScrollPane' was converted to 'System.Windows.Forms.ScrollableControl.ScrollableControl' which has a different behavior. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaxswingJScrollPaneJScrollPane_3"'
            System.Windows.Forms.ScrollableControl temp_scrollablecontrol;
            temp_scrollablecontrol = new System.Windows.Forms.ScrollableControl();
            temp_scrollablecontrol.AutoScroll = true;
            System.Windows.Forms.ScrollableControl sp = temp_scrollablecontrol;
            //UPGRADE_ISSUE: Method 'javax.swing.JScrollPane.getViewport' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaxswingJScrollPanegetViewport_3"'
            //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.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaawtContaineradd_javaawtComponent_3"'
            sp.getViewport().Controls.Add(tree);

            //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.2003/commoner/redir/redirect.htm?keyword="jlca1073_javaawtContaineradd_javaawtComponent_javalangObject_3"'
            Controls.Add(sp);
            sp.Dock = System.Windows.Forms.DockStyle.Fill;
            sp.BringToFront();
        }
コード例 #2
0
 /// <summary>
 /// Removes a <code>TreeSelection</code> listener.
 /// </summary>
 public void removeTreeSelectionListener(TreeSelectionListener @tsl)
 {
 }
コード例 #3
0
ファイル: JTree.cs プロジェクト: exaphaser/JSC-Cross-Compiler
		/// <summary>
		/// Removes a <code>TreeSelection</code> listener.
		/// </summary>
		public void removeTreeSelectionListener(TreeSelectionListener @tsl)
		{
		}
コード例 #4
0
 /// <summary>
 /// Adds a listener for <code>TreeSelection</code> events.
 /// </summary>
 public void addTreeSelectionListener(TreeSelectionListener @tsl)
 {
 }
コード例 #5
0
ファイル: JTree.cs プロジェクト: exaphaser/JSC-Cross-Compiler
		/// <summary>
		/// Adds a listener for <code>TreeSelection</code> events.
		/// </summary>
		public void addTreeSelectionListener(TreeSelectionListener @tsl)
		{
		}