// TODO Auto-generated method stub group_1 = new Group(shell, SWT.NO_RADIO_GROUP); final GridLayout gridLayout = new GridLayout(); group_1.setLayout(gridLayout); final Group group = new Group(group_1, SWT.NONE); final GridData gd_group = new GridData(SWT.FILL, SWT.CENTER, false, false); gd_group.heightHint = 170; gd_group.widthHint = 480; group.setLayoutData(gd_group); final GridLayout gridLayout_1 = new GridLayout(); gridLayout_1.numColumns = 4; group.setLayout(gridLayout_1); final Label label_1_1 = new Label(group, SWT.NONE); label_1_1.setLayoutData(new GridData(106, 15)); label_1_1.setText("第1步"); final Label label = new Label(group, SWT.NONE); label.setLayoutData(new GridData(106, 18)); label.setText("日期"); text_3 = new Text(group, SWT.BORDER); final GridData gd_text_2 = new GridData(SWT.FILL, SWT.CENTER, true, false); gd_text_2.widthHint = 107; text_3.setLayoutData(gd_text_2); new Label(group, SWT.NONE); final Label label_1_2 = new Label(group, SWT.NONE); label_1_2.setLayoutData(new GridData(106, 15)); label_1_2.setText("第1步"); final Label label_1 = new Label(group, SWT.NONE); label_1.setLayoutData(new GridData(106, 15)); label_1.setText("项目"); text_1 = new Text(group, SWT.BORDER); final GridData gd_text_2_1 = new GridData(SWT.FILL, SWT.CENTER, true, false); gd_text_2_1.widthHint = 105; text_1.setLayoutData(gd_text_2_1);
final Button button = new Button(group, SWT.NONE); button.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); button.setText("编辑"); final Label label_1_3 = new Label(group, SWT.NONE); label_1_3.setLayoutData(new GridData(189, 15)); label_1_3.setText("第1步"); final Label label_2 = new Label(group, SWT.NONE); label_2.setLayoutData(new GridData(115, 15)); label_2.setText("金额"); text_4 = new Text(group, SWT.BORDER); final GridData gd_text_2_2 = new GridData(SWT.FILL, SWT.CENTER, true, false); gd_text_2_2.widthHint = 106; text_4.setLayoutData(gd_text_2_2); new Label(group, SWT.NONE); final Group group_2 = new Group(group, SWT.NONE); group_2.setLayoutData(new GridData(188, 76)); group_2.setLayout(new GridLayout()); final Label label_1_3_3 = new Label(group_2, SWT.NONE); label_1_3_3.setLayoutData(new GridData(106, 15)); label_1_3_3.setText("第1步"); final Label label_1_3_1 = new Label(group_2, SWT.NONE); label_1_3_1.setLayoutData(new GridData(106, 15)); label_1_3_1.setText("第1步"); final Label label_1_3_2 = new Label(group_2, SWT.NONE); label_1_3_2.setLayoutData(new GridData(106, 15)); label_1_3_2.setText("第1步"); final SashForm sashForm_1 = new SashForm(group, SWT.NONE); sashForm_1.setLayoutData(new GridData(104, 19)); final Label label_2_1 = new Label(sashForm_1, SWT.NONE); label_2_1.setText("备注"); text_2 = new Text(group, SWT.BORDER); final GridData gd_text_1 = new GridData(SWT.FILL, SWT.CENTER, true, false); gd_text_1.heightHint = 50; gd_text_1.widthHint = 191; text_2.setLayoutData(gd_text_1); final Button button_1 = new Button(group, SWT.NONE); button_1.setText("添加"); final TableViewer tableViewer = new TableViewer(group_1, SWT.BORDER); table_1 = tableViewer.getTable(); table_1.setLinesVisible(true); table_1.setHeaderVisible(true); final GridData gd_table_1 = new GridData(SWT.FILL, SWT.FILL, true, true); gd_table_1.heightHint = 87; table_1.setLayoutData(gd_table_1); final TableColumn newColumnTableColumn = new TableColumn(table_1, SWT.NONE); newColumnTableColumn.setWidth(100); newColumnTableColumn.setText("New column"); final TableColumn newColumnTableColumn_1 = new TableColumn(table_1, SWT.NONE); newColumnTableColumn_1.setWidth(100); newColumnTableColumn_1.setText("New column"); final TableColumn newColumnTableColumn_2 = new TableColumn(table_1, SWT.NONE); newColumnTableColumn_2.setWidth(100); newColumnTableColumn_2.setText("New column"); final TableColumn newColumnTableColumn_3 = new TableColumn(table_1, SWT.NONE); newColumnTableColumn_3.setWidth(100); newColumnTableColumn_3.setText("New column"); final TableColumn newColumnTableColumn_4 = new TableColumn(table_1, SWT.NONE); newColumnTableColumn_4.setWidth(100); newColumnTableColumn_4.setText("New column"); final Group group_3 = new Group(group_1, SWT.NONE); final GridData gd_group_3 = new GridData(SWT.RIGHT, SWT.CENTER, false, false); gd_group_3.heightHint = 39; gd_group_3.widthHint = 97; group_3.setLayoutData(gd_group_3); final GridLayout gridLayout_2 = new GridLayout(); gridLayout_2.numColumns = 2; group_3.setLayout(gridLayout_2); final Button button_2 = new Button(group_3, SWT.NONE); button_2.setAlignment(SWT.RIGHT); button_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); button_2.setText("删除"); final Button button_1_1 = new Button(group_3, SWT.NONE); button_1_1.setAlignment(SWT.RIGHT); button_1_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false)); button_1_1.setText("完成");
package ddd;import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import java.util.ArrayList;
import java.util.Iterator;import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.ListViewer;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.part.ViewPart;
{ protected Shell shell;
private Table table_1;
private Text text_4;
private Text text_1;
private Text text_3;
private Text text_2;
private Table table;
private ISelection selection;
ArrayList myListeners = new ArrayList();
private Group group_1; /**
* Launch the application
* @param args
*/
public static void main(String[] args)
{
try
{
ttt window = new ttt();
window.open();
}
catch (Exception e)
{
e.printStackTrace();
}
} /**
* Open the window
*/
public void open()
{
final Display display = Display.getDefault();
createContents();
shell.open();
shell.layout();
while (!shell.isDisposed())
{
if (!display.readAndDispatch())
display.sleep();
}
} /**
* Create contents of the window
*/
protected void createContents()
{
shell = new Shell();
shell.setSize(500, 375);
shell.setText("SWT Application");
//
shell.setLayout(new FillLayout());
// TODO Auto-generated method stub
group_1 = new Group(shell, SWT.NO_RADIO_GROUP);
final GridLayout gridLayout = new GridLayout();
group_1.setLayout(gridLayout); final Group group = new Group(group_1, SWT.NONE);
group.setLayoutData(new GridData(480, 170));
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 4;
group.setLayout(gridLayout_1); final Label label_1_1 = new Label(group, SWT.NONE);
label_1_1.setLayoutData(new GridData(106, 15));
label_1_1.setText("第1步"); final Label label = new Label(group, SWT.NONE);
label.setLayoutData(new GridData(106, 18));
label.setText("日期"); text_3 = new Text(group, SWT.BORDER);
final GridData gd_text_2 = new GridData(SWT.LEFT, SWT.CENTER, true, false);
gd_text_2.widthHint = 107;
text_3.setLayoutData(gd_text_2);
new Label(group, SWT.NONE); final Label label_1_2 = new Label(group, SWT.NONE);
label_1_2.setLayoutData(new GridData(106, 15));
label_1_2.setText("第1步"); final Label label_1 = new Label(group, SWT.NONE);
label_1.setLayoutData(new GridData(106, 15));
label_1.setText("项目"); text_1 = new Text(group, SWT.BORDER);
final GridData gd_text_2_1 = new GridData(SWT.LEFT, SWT.CENTER, true, false);
gd_text_2_1.widthHint = 105;
text_1.setLayoutData(gd_text_2_1); final Button button = new Button(group, SWT.NONE);
button.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
button.setText("编辑"); final Label label_1_3 = new Label(group, SWT.NONE);
label_1_3.setLayoutData(new GridData(189, 15));
label_1_3.setText("第1步"); final Label label_2 = new Label(group, SWT.NONE);
label_2.setLayoutData(new GridData(115, 15));
label_2.setText("金额"); text_4 = new Text(group, SWT.BORDER);
final GridData gd_text_2_2 = new GridData(SWT.LEFT, SWT.CENTER, true, false);
gd_text_2_2.widthHint = 106;
text_4.setLayoutData(gd_text_2_2);
new Label(group, SWT.NONE); final Group group_2 = new Group(group, SWT.NONE);
group_2.setLayoutData(new GridData(188, 76));
group_2.setLayout(new GridLayout()); final Label label_1_3_3 = new Label(group_2, SWT.NONE);
label_1_3_3.setLayoutData(new GridData(106, 15));
label_1_3_3.setText("第1步"); final Label label_1_3_1 = new Label(group_2, SWT.NONE);
label_1_3_1.setLayoutData(new GridData(106, 15));
label_1_3_1.setText("第1步"); final Label label_1_3_2 = new Label(group_2, SWT.NONE);
label_1_3_2.setLayoutData(new GridData(106, 15));
label_1_3_2.setText("第1步"); final SashForm sashForm_1 = new SashForm(group, SWT.NONE);
sashForm_1.setLayoutData(new GridData(104, 19)); final Label label_2_1 = new Label(sashForm_1, SWT.NONE);
label_2_1.setText("备注");
text_2 = new Text(group, SWT.BORDER);
final GridData gd_text_1 = new GridData(SWT.LEFT, SWT.CENTER, true, false);
gd_text_1.heightHint = 50;
gd_text_1.widthHint = 191;
text_2.setLayoutData(gd_text_1); final Button button_1 = new Button(group, SWT.NONE);
button_1.setText("添加"); final TableViewer tableViewer = new TableViewer(group_1, SWT.BORDER);
table_1 = tableViewer.getTable();
table_1.setLinesVisible(true);
table_1.setHeaderVisible(true);
final GridData gd_table_1 = new GridData(SWT.FILL, SWT.FILL, true, true);
gd_table_1.heightHint = 87;
table_1.setLayoutData(gd_table_1); final TableColumn newColumnTableColumn = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn.setWidth(100);
newColumnTableColumn.setText("New column"); final TableColumn newColumnTableColumn_1 = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn_1.setWidth(100);
newColumnTableColumn_1.setText("New column"); final TableColumn newColumnTableColumn_2 = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn_2.setWidth(100);
newColumnTableColumn_2.setText("New column"); final TableColumn newColumnTableColumn_3 = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn_3.setWidth(100);
newColumnTableColumn_3.setText("New column"); final TableColumn newColumnTableColumn_4 = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn_4.setWidth(100);
newColumnTableColumn_4.setText("New column"); final Group group_3 = new Group(group_1, SWT.NONE);
final GridData gd_group_3 = new GridData(SWT.RIGHT, SWT.CENTER, false, false);
gd_group_3.heightHint = 39;
gd_group_3.widthHint = 97;
group_3.setLayoutData(gd_group_3);
final GridLayout gridLayout_2 = new GridLayout();
gridLayout_2.numColumns = 2;
group_3.setLayout(gridLayout_2); final Button button_2 = new Button(group_3, SWT.NONE);
button_2.setAlignment(SWT.RIGHT);
button_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
button_2.setText("删除"); final Button button_1_1 = new Button(group_3, SWT.NONE);
button_1_1.setAlignment(SWT.RIGHT);
button_1_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
button_1_1.setText("完成");
}}
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import java.util.ArrayList;
import java.util.Iterator;import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.ListViewer;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.part.ViewPart;public class ttt
{ protected Shell shell;
private Table table_1;
private Text text_4;
private Text text_1;
private Text text_3;
private Text text_2;
private Table table;
private ISelection selection;
ArrayList myListeners = new ArrayList();
private Group group_1; /**
* Launch the application
* @param args
*/
public static void main(String[] args)
{
try
{
ttt window = new ttt();
window.open();
}
catch (Exception e)
{
e.printStackTrace();
}
} /**
* Open the window
*/
public void open()
{
final Display display = Display.getDefault();
createContents();
shell.open();
shell.layout();
while (!shell.isDisposed())
{
if (!display.readAndDispatch())
display.sleep();
}
} /**
* Create contents of the window
*/
protected void createContents()
{
shell = new Shell();
shell.setSize(500, 375);
shell.setText("SWT Application");
//
shell.setLayout(new FillLayout());
// TODO Auto-generated method stub
group_1 = new Group(shell, SWT.NO_RADIO_GROUP);
final GridLayout gridLayout = new GridLayout();
group_1.setLayout(gridLayout); final Group group = new Group(group_1, SWT.NONE);
final GridData gd_group = new GridData(SWT.FILL, SWT.CENTER, false, false);
gd_group.heightHint = 170;
gd_group.widthHint = 480;
group.setLayoutData(gd_group);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 4;
group.setLayout(gridLayout_1); final Label label_1_1 = new Label(group, SWT.NONE);
label_1_1.setLayoutData(new GridData(106, 15));
label_1_1.setText("第1步"); final Label label = new Label(group, SWT.NONE);
label.setLayoutData(new GridData(106, 18));
label.setText("日期"); text_3 = new Text(group, SWT.BORDER);
final GridData gd_text_2 = new GridData(SWT.FILL, SWT.CENTER, true, false);
gd_text_2.widthHint = 107;
text_3.setLayoutData(gd_text_2);
new Label(group, SWT.NONE); final Label label_1_2 = new Label(group, SWT.NONE);
label_1_2.setLayoutData(new GridData(106, 15));
label_1_2.setText("第1步"); final Label label_1 = new Label(group, SWT.NONE);
label_1.setLayoutData(new GridData(106, 15));
label_1.setText("项目"); text_1 = new Text(group, SWT.BORDER);
final GridData gd_text_2_1 = new GridData(SWT.FILL, SWT.CENTER, true, false);
gd_text_2_1.widthHint = 105;
text_1.setLayoutData(gd_text_2_1);
button.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
button.setText("编辑"); final Label label_1_3 = new Label(group, SWT.NONE);
label_1_3.setLayoutData(new GridData(189, 15));
label_1_3.setText("第1步"); final Label label_2 = new Label(group, SWT.NONE);
label_2.setLayoutData(new GridData(115, 15));
label_2.setText("金额"); text_4 = new Text(group, SWT.BORDER);
final GridData gd_text_2_2 = new GridData(SWT.FILL, SWT.CENTER, true, false);
gd_text_2_2.widthHint = 106;
text_4.setLayoutData(gd_text_2_2);
new Label(group, SWT.NONE); final Group group_2 = new Group(group, SWT.NONE);
group_2.setLayoutData(new GridData(188, 76));
group_2.setLayout(new GridLayout()); final Label label_1_3_3 = new Label(group_2, SWT.NONE);
label_1_3_3.setLayoutData(new GridData(106, 15));
label_1_3_3.setText("第1步"); final Label label_1_3_1 = new Label(group_2, SWT.NONE);
label_1_3_1.setLayoutData(new GridData(106, 15));
label_1_3_1.setText("第1步"); final Label label_1_3_2 = new Label(group_2, SWT.NONE);
label_1_3_2.setLayoutData(new GridData(106, 15));
label_1_3_2.setText("第1步"); final SashForm sashForm_1 = new SashForm(group, SWT.NONE);
sashForm_1.setLayoutData(new GridData(104, 19)); final Label label_2_1 = new Label(sashForm_1, SWT.NONE);
label_2_1.setText("备注");
text_2 = new Text(group, SWT.BORDER);
final GridData gd_text_1 = new GridData(SWT.FILL, SWT.CENTER, true, false);
gd_text_1.heightHint = 50;
gd_text_1.widthHint = 191;
text_2.setLayoutData(gd_text_1); final Button button_1 = new Button(group, SWT.NONE);
button_1.setText("添加"); final TableViewer tableViewer = new TableViewer(group_1, SWT.BORDER);
table_1 = tableViewer.getTable();
table_1.setLinesVisible(true);
table_1.setHeaderVisible(true);
final GridData gd_table_1 = new GridData(SWT.FILL, SWT.FILL, true, true);
gd_table_1.heightHint = 87;
table_1.setLayoutData(gd_table_1); final TableColumn newColumnTableColumn = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn.setWidth(100);
newColumnTableColumn.setText("New column"); final TableColumn newColumnTableColumn_1 = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn_1.setWidth(100);
newColumnTableColumn_1.setText("New column"); final TableColumn newColumnTableColumn_2 = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn_2.setWidth(100);
newColumnTableColumn_2.setText("New column"); final TableColumn newColumnTableColumn_3 = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn_3.setWidth(100);
newColumnTableColumn_3.setText("New column"); final TableColumn newColumnTableColumn_4 = new TableColumn(table_1, SWT.NONE);
newColumnTableColumn_4.setWidth(100);
newColumnTableColumn_4.setText("New column"); final Group group_3 = new Group(group_1, SWT.NONE);
final GridData gd_group_3 = new GridData(SWT.RIGHT, SWT.CENTER, false, false);
gd_group_3.heightHint = 39;
gd_group_3.widthHint = 97;
group_3.setLayoutData(gd_group_3);
final GridLayout gridLayout_2 = new GridLayout();
gridLayout_2.numColumns = 2;
group_3.setLayout(gridLayout_2); final Button button_2 = new Button(group_3, SWT.NONE);
button_2.setAlignment(SWT.RIGHT);
button_2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
button_2.setText("删除"); final Button button_1_1 = new Button(group_3, SWT.NONE);
button_1_1.setAlignment(SWT.RIGHT);
button_1_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
button_1_1.setText("完成");
}}