⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 f057a971a33d001d192abbead0da6110

📁 动态演绎2叉树的原理。演示二叉树的前序遍历过程。 演示二叉树的中序遍历过程。 演示二叉树的后序遍历过程。
💻
📖 第 1 页 / 共 5 页
字号:

		final Button confirmButton_1_3_1 = new Button(shell, SWT.NONE);
		
		confirmButton_1_3_1.setBounds(644, 112, 44, 22);
		confirmButton_1_3_1.setVisible(false);
		confirmButton_1_3_1.setText("Confirm");

		final Button confirmButton_1_2_1 = new Button(shell, SWT.NONE);
		
		confirmButton_1_2_1.setBounds(510, 112, 44, 22);
		confirmButton_1_2_1.setVisible(false);
		confirmButton_1_2_1.setText("Confirm");

		final Button confirmButton_1_2 = new Button(shell, SWT.NONE);
		
		confirmButton_1_2.setBounds(156, 114, 44, 22);
		confirmButton_1_2.setVisible(false);
		confirmButton_1_2.setText("Confirm");

		final Button extendTheLeftButton_3_2 = new Button(shell, SWT.NONE);
		extendTheLeftButton_3_2.setBounds(156, 114, 29, 23);
		extendTheLeftButton_3_2.setVisible(false);
		extendTheLeftButton_3_2.setText("ERS");
		

		final Button extendTheLeftButton_1 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_1.setBounds(410, 25, 128, 23);
		extendTheLeftButton_1.setText("Extend the Right Subtree");
		extendTheLeftButton_1.setVisible(false);
		
		

		final Button extendTheLeftButton_3_1 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_3_1.setBounds(576, 70, 128, 23);
		extendTheLeftButton_3_1.setVisible(false);
		extendTheLeftButton_3_1.setText("Extend the Right Subtree");

		final Button extendTheLeftButton_2_1 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2_1.setBounds(400, 70, 128, 23);
		extendTheLeftButton_2_1.setVisible(false);
		extendTheLeftButton_2_1.setText("Extend the Left Subtree");

		final Button extendTheLeftButton_2 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2.setBounds(50, 70, 128, 23);
		extendTheLeftButton_2.setText("Extend the Left Subtree");
		extendTheLeftButton_2.setVisible(false);
		

		final Button extendTheLeftButton_3 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_3.setBounds(226, 70, 128, 23);
		extendTheLeftButton_3.setText("Extend the Right Subtree");
		extendTheLeftButton_3.setVisible(false);

		final Button clickToAddButton = new Button(shell, SWT.NONE);
		final Label pleaseGiveTheLabel_1 = new Label(shell, SWT.RIGHT);
		pleaseGiveTheLabel_1.setBounds(98, 75, 85, 13);
		pleaseGiveTheLabel_1.setVisible(false);
		pleaseGiveTheLabel_1.setText("Value:");

		pleaseGiveNodeText_2 = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText_2.setBounds(184, 70, 36, 22);
		pleaseGiveNodeText_2.setVisible(false);
		
		final Button confirmButton = new Button(shell, SWT.NONE);
		confirmButton.setVisible(false);
		confirmButton.setText("Confirm");
		confirmButton.setBounds(407, 26, 44, 22);

		final Label pleaseGiveTheLabel = new Label(shell, SWT.NONE);
		pleaseGiveTheLabel.setText("Please Give the Node A Value:");
		pleaseGiveTheLabel.setBounds(217, 34, 146, 13);
		pleaseGiveTheLabel.setVisible(false);

		final Button confirmButton_1 = new Button(shell, SWT.NONE);
		
		confirmButton_1.setBounds(228, 70, 44, 22);
		confirmButton_1.setVisible(false);
		confirmButton_1.setText("Confirm");

		final Button extendTheLeftButton = new Button(shell, SWT.NONE);
		extendTheLeftButton.setText("Extend the Left Subtree");
		extendTheLeftButton.setBounds(230, 25, 128, 23);
		extendTheLeftButton.setVisible(false);
		
		extendTheLeftButton.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				pleaseGiveTheLabel_1.setVisible(true);
				pleaseGiveNodeText_2.setVisible(true);
				confirmButton_1.setVisible(true);
				extendTheLeftButton.setVisible(false);
				
				
			}
		});

		final Label pleaseGiveTheLabel_1_1 = new Label(shell, SWT.RIGHT);
		pleaseGiveTheLabel_1_1.setBounds(443, 75, 85, 13);
		pleaseGiveTheLabel_1_1.setVisible(false);
		pleaseGiveTheLabel_1_1.setText("Value:");
		pleaseGiveTheLabel_1_1.setVisible(false);

		pleaseGiveNodeText_1 = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText_1.setBounds(534, 70, 36, 22);
		pleaseGiveNodeText_1.setVisible(false);
		

		final Button confirmButton_1_1 = new Button(shell, SWT.NONE);
		confirmButton_1_1.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				confirmButton_1_1.setVisible(false);
				pleaseGiveNodeText_1.setEnabled(false);
				Color color =new Color(e.widget.getDisplay(),0,0,255);
				pleaseGiveNodeText_1.setBackground(color);
				//pleaseGiveTheLabel_1.setVisible(false);
				extendTheLeftButton_2_1.setVisible(true);
				extendTheLeftButton_3_1.setVisible(true);
				pleaseGiveNodeText_1.setEditable(false);
				pleaseGiveTheLabel_1_1.setVisible(false);
				confirmButton_1_1.addSelectionListener(new SelectionAdapter() 
				{
					public void widgetSelected(SelectionEvent e)
					{		shell.addPaintListener(new PaintListener() {
						public void paintControl(PaintEvent e)
						{
							GC gc1 = e.gc;
							gc1.drawLine(380, 48 ,552,70);
						}
					});
						
					}
				});
				shell.redraw();
				if (pleaseGiveNodeText_1.getText()=="")
				{
					pleaseGiveNodeText_1.setText(Integer.toString(TrackingNum));
					TrackingNum++;
				}
				BT.insert(pleaseGiveNodeText_1.getText(), "", true,pleaseGiveNodeText_1);
			}
		});
		confirmButton_1_1.setBounds(576, 70, 44, 22);
		confirmButton_1_1.setVisible(false);
		confirmButton_1_1.setText("Confirm");
		confirmButton_1_1.setVisible(false);
		
		extendTheLeftButton_1.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				pleaseGiveTheLabel_1_1.setVisible(true);
				pleaseGiveNodeText_1.setVisible(true);
				confirmButton_1_1.setVisible(true);
				extendTheLeftButton_1.setVisible(false);
				
			}
		});
		
		confirmButton_1.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				confirmButton_1.setVisible(false);
				pleaseGiveNodeText_2.setEnabled(false);
				Color color =new Color(e.widget.getDisplay(),0,0,255);
				pleaseGiveNodeText_2.setBackground(color);
				pleaseGiveTheLabel_1.setVisible(false);
				extendTheLeftButton_3.setVisible(true);
				extendTheLeftButton_2.setVisible(true);
				pleaseGiveNodeText_2.setEditable(false);
				confirmButton_1.addSelectionListener(new SelectionAdapter() 
				{
					public void widgetSelected(SelectionEvent e)
					{		shell.addPaintListener(new PaintListener() {
						public void paintControl(PaintEvent e)
						{
							GC gc = e.gc;
							gc.drawLine(380, 48 ,199, 70);							
						}
					});
						
					}
				});
				shell.redraw();	
				if (pleaseGiveNodeText_2.getText()=="")
				{
					pleaseGiveNodeText_2.setText(Integer.toString(TrackingNum));
					TrackingNum++;
				}
				BT.insert(pleaseGiveNodeText_2.getText(), "", false,pleaseGiveNodeText_2);
			}
		});
		
		clickToAddButton.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				clickToAddButton.setVisible(false);
				confirmButton.setVisible(true);
				pleaseGiveNodeText.setVisible(true);
				pleaseGiveTheLabel.setVisible(true);
			}
		});
		clickToAddButton.setText("Click to Add Root Node");
		clickToAddButton.setBounds(289, 26, 180, 23);
		

		pleaseGiveNodeText = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText.addMouseListener(new MouseAdapter() {
			public void mouseUp(MouseEvent e)
			{
				pleaseGiveNodeText.setText("");
			}
		});
		pleaseGiveNodeText.setBounds(365, 26, 36, 22);
		pleaseGiveNodeText.setVisible(false);

		
		

		final Button extendTheLeftButton_2_2 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2_2.setBounds(79, 114, 29, 23);
		extendTheLeftButton_2_2.setVisible(false);
		extendTheLeftButton_2_2.setText("ELS");

		pleaseGiveNodeText_3 = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText_3.setBounds(114, 116, 36, 22);
		pleaseGiveNodeText_3.setVisible(false);

		final Button extendTheLeftButton_2_3 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2_3.setBounds(213, 114, 29, 23);
		extendTheLeftButton_2_3.setVisible(false);
		extendTheLeftButton_2_3.setText("ELS");

		pleaseGiveNodeText_4 = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText_4.setBounds(248, 116, 36, 22);
		pleaseGiveNodeText_4.setVisible(false);

		final Button confirmButton_1_3 = new Button(shell, SWT.NONE);
		
		confirmButton_1_3.setBounds(290, 114, 44, 22);
		confirmButton_1_3.setVisible(false);
		confirmButton_1_3.setText("Confirm");

		final Button extendTheLeftButton_2_3_1 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2_3_1.setBounds(290, 114, 29, 23);
		extendTheLeftButton_2_3_1.setVisible(false);
		extendTheLeftButton_2_3_1.setText("ERS");

		final Button extendTheLeftButton_2_2_1 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2_2_1.setBounds(433, 112, 29, 23);
		extendTheLeftButton_2_2_1.setVisible(false);
		extendTheLeftButton_2_2_1.setText("ELS");

		pleaseGiveNodeText_5 = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText_5.setBounds(468, 114, 36, 22);
		pleaseGiveNodeText_5.setVisible(false);

		final Button extendTheLeftButton_3_2_1 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_3_2_1.setBounds(510, 112, 29, 23);
		extendTheLeftButton_3_2_1.setVisible(false);
		extendTheLeftButton_3_2_1.setText("ERS");

		final Button extendTheLeftButton_2_3_2 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2_3_2.setBounds(567, 112, 29, 23);
		extendTheLeftButton_2_3_2.setVisible(false);
		extendTheLeftButton_2_3_2.setText("ELS");

		pleaseGiveNodeText_6 = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText_6.setBounds(602, 114, 36, 22);
		pleaseGiveNodeText_6.setVisible(false);

		final Button extendTheLeftButton_2_3_1_1 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2_3_1_1.setBounds(644, 112, 29, 23);
		extendTheLeftButton_2_3_1_1.setVisible(false);
		extendTheLeftButton_2_3_1_1.setText("ERS");
	
		extendTheLeftButton_2.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				extendTheLeftButton_2.setVisible(false);
				pleaseGiveNodeText_3.setVisible(true);
				confirmButton_1_2.setVisible(true);
				
			}
		});
		
		extendTheLeftButton_3.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				extendTheLeftButton_3.setVisible(false);
				pleaseGiveNodeText_4.setVisible(true);
				confirmButton_1_3.setVisible(true);
							
			}
		});
		extendTheLeftButton_2_1.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				extendTheLeftButton_2_1.setVisible(false);
				pleaseGiveNodeText_5.setVisible(true);
				confirmButton_1_2_1.setVisible(true);
				
			}
		});

		extendTheLeftButton_3_1.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				pleaseGiveNodeText_6.setVisible(true);
				confirmButton_1_3_1.setVisible(true);
				extendTheLeftButton_3_1.setVisible(false);
				
			}
		});

		final Button extendTheLeftButton_2_2_2 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2_2_2.setBounds(55, 165, 20, 23);
		extendTheLeftButton_2_2_2.setVisible(false);
		extendTheLeftButton_2_2_2.setText("L");

		pleaseGiveNodeText_7 = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText_7.setBounds(76, 166, 36, 22);
		pleaseGiveNodeText_7.setVisible(false);

		final Button extendTheLeftButton_3_2_2 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_3_2_2.setBounds(112, 165, 20, 23);
		extendTheLeftButton_3_2_2.setVisible(false);
		extendTheLeftButton_3_2_2.setText("R");

		final Button confirmButton_1_2_2 = new Button(shell, SWT.NONE);
		confirmButton_1_2_2.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e)
			{
				extendTheLeftButton_2_2_2.setVisible(true);
				extendTheLeftButton_3_2_2.setVisible(true);
				confirmButton_1_2_2.setVisible(false);
				Color color =new Color(e.widget.getDisplay(),0,0,255);
				pleaseGiveNodeText_7.setBackground(color);
				pleaseGiveNodeText_7.setEnabled(false);
				confirmButton_1_2_2.addSelectionListener(new SelectionAdapter() 
				{
					public void widgetSelected(SelectionEvent e)
					{		shell.addPaintListener(new PaintListener() {
						public void paintControl(PaintEvent e)
						{
							GC gc = e.gc;
							gc.drawLine(132, 138 ,94, 166);
						}
					});
						
					}
				});
				shell.redraw();
				if (pleaseGiveNodeText_7.getText()=="")
				{
					pleaseGiveNodeText_7.setText(Integer.toString(TrackingNum));
					TrackingNum++;
				}
				BT.insert(pleaseGiveNodeText_7.getText(), "00", false,pleaseGiveNodeText_7);
			}
		});
		confirmButton_1_2_2.setBounds(74, 189, 43, 22);
		confirmButton_1_2_2.setVisible(false);
		confirmButton_1_2_2.setText("Confirm");

		pleaseGiveNodeText_8 = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText_8.setBounds(155, 166, 36, 22);
		pleaseGiveNodeText_8.setVisible(false);

		final Button confirmButton_1_2_2_1 = new Button(shell, SWT.NONE);
		
		confirmButton_1_2_2_1.setBounds(152, 189, 43, 22);
		confirmButton_1_2_2_1.setVisible(false);
		confirmButton_1_2_2_1.setText("Confirm");

		final Button extendTheLeftButton_2_2_2_1 = new Button(shell, SWT.NONE);
		extendTheLeftButton_2_2_2_1.setBounds(135, 165, 20, 23);
		extendTheLeftButton_2_2_2_1.setVisible(false);
		extendTheLeftButton_2_2_2_1.setText("L");
		
		final Button extendTheLeftButton_3_2_2_1 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_3_2_2_1.setBounds(191, 165, 20, 23);
		extendTheLeftButton_3_2_2_1.setVisible(false);
		extendTheLeftButton_3_2_2_1.setText("R");

		final Button extendTheLeftButton_2_2_2_1_1 = new Button(shell, SWT.NONE);
		
		extendTheLeftButton_2_2_2_1_1.setBounds(215, 165, 20, 23);
		extendTheLeftButton_2_2_2_1_1.setVisible(false);
		extendTheLeftButton_2_2_2_1_1.setText("L");

		pleaseGiveNodeText_9 = new Text(shell, SWT.CENTER | SWT.BORDER);
		pleaseGiveNodeText_9.setBounds(235, 166, 36, 22);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -