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

📄 tablewith0sizedcolumn.java

📁 java 文件下载器。可自定义
💻 JAVA
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   TableWith0sizedColumn.java

package org.gudy.azureus2.ui.swt.snippets;

import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.*;
import org.gudy.azureus2.core3.util.AERunnable;
import org.gudy.azureus2.core3.util.AEThread;

public class TableWith0sizedColumn
{

	public TableWith0sizedColumn()
	{
	}

	public static void main(String args[])
	{
		Display display = new Display();
		Shell shell = new Shell(display, 1264);
		shell.setLayout(new FillLayout());
		Table table = new Table(shell, 0x10802);
		table.setHeaderVisible(true);
		TableColumn column0sized = new TableColumn(table, 0);
		TableColumn column1 = new TableColumn(table, 0);
		TableColumn column2 = new TableColumn(table, 0);
		column0sized.setWidth(0);
		column0sized.setResizable(false);
		column1.setWidth(200);
		column1.setText("Column 1");
		column2.setWidth(200);
		column2.setText("Column 2");
		for (int i = 0; i < 5; i++)
		{
			TableItem item = new TableItem(table, 0);
			item.setText(new String[] {
				null, (new StringBuilder()).append("col 1 row ").append(i).toString(), (new StringBuilder()).append("col 2 row ").append(i).toString()
			});
		}

		Thread tUpdateValues = new AEThread("TableWith0sizedColumn", display, table) {

			final Display val$display;
			final Table val$table;

			public void runSupport()
			{
				final int t[] = new int[1];
				t[0] = 0;
				while (!display.isDisposed()) 
				{
					t[0]++;
					display.asyncExec(new AERunnable() {

						final int val$t[];
						final 1 this$0;

						public void runSupport()
						{
							if (table.isDisposed())
								return;
							TableItem items[] = table.getItems();
							for (int i = 0; i < items.length; i++)
							{
								TableItem item = items[i];
								item.setText(new String[] {
									null, (new StringBuilder()).append("col 1 row ").append(i).append(" / ").append(t[0]).toString(), (new StringBuilder()).append("col 2 row ").append(i).append(" / ").append(t[0]).toString()
								});
							}

						}

					
					{
						this$0 = 1.this;
						t = ai;
						super();
					}
					});
					try
					{
						Thread.sleep(1000L);
					}
					catch (Exception ignore) { }
				}
			}

			
			{
				display = display1;
				table = table1;
				super(x0);
			}
		};
		tUpdateValues.start();
		shell.setSize(300, 300);
		shell.open();
		do
		{
			if (shell.isDisposed())
				break;
			if (!display.readAndDispatch())
				display.sleep();
		} while (true);
		display.dispose();
	}
}

⌨️ 快捷键说明

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