formData.top = new FormAttachment(0, 5); formData.left = new FormAttachment(0, 5); formData.bottom = new FormAttachment(100, -5); formData.right = new FormAttachment(33, -5);
formData.top =  new FormAttachment(0, 100, 5); formData.left =  new FormAttachment(0, 100, 5); formData.bottom =  new FormAttachment(100, 100, -5);
	private void initTabItemDirector() {		if (tabFolder1 == null) {			initTabFolder();		}		tabItemDirector = new CTabItem(tabFolder1, SWT.NONE);		tabItemDirector.setText("Director");						{			sashFormDirector = new SashForm(tabFolder1, SWT.NONE);			FormLayout sashFormDirectorLayout = new FormLayout();			sashFormDirector.setLayout(sashFormDirectorLayout);			tabItemDirector.setControl(sashFormDirector);			{				group1Director = new Group(sashFormDirector, SWT.NONE);				group1Director.setText("Directors bersicht");				GridLayout gridLayout = new GridLayout();				gridLayout.numColumns = 6;								group1Director.setLayout(gridLayout);				FormData formData = new FormData();				formData.right = new FormAttachment(100, 100, -5);				formData.top = new FormAttachment(0, 100, 5);				formData.bottom = new FormAttachment(100, 100, -5);				group1Director.setLayoutData(formData);				{					tableDirector = new Table(group1Director, SWT.V_SCROLL							| SWT.SINGLE | SWT.FULL_SELECTION							| SWT.BORDER);					GridData griddata = new GridData(							GridData.FILL_BOTH);					griddata.horizontalSpan = 6;					griddata.heightHint = 160;					tableDirector.setLayoutData(griddata);					tableDirector.setLinesVisible(true);					tableDirector.setHeaderVisible(true);					tableDirector							.addSelectionListener(new SelectionAdapter() {								public void widgetSelected(										SelectionEvent arg0) {									int index = tableDirector											.getSelectionIndex();									System.out											.println("Table select. id: "													+ index													+ " TableItem:"													+ tableDirector															.getItem(index)													+ " id: "													+ tableDirector															.getItem(																	index)															.getText(																	0));								}							});					ColumnDirectorSelectionListener sortListener = new ColumnDirectorSelectionListener();					{						tableColumnDirectorId = new TableColumn(tableDirector,								SWT.CENTER);						tableColumnDirectorId.setText("id");						tableColumnDirectorId.setWidth(100);						tableColumnDirectorId.addSelectionListener(sortListener);											}					{						tableColumnDirectorLastname = new TableColumn(								tableDirector, SWT.CENTER);						tableColumnDirectorLastname.setText("Name");						tableColumnDirectorLastname.setWidth(100);						tableColumnDirectorLastname.addSelectionListener(sortListener);					}					{						tableColumnDirectorFirstname = new TableColumn(								tableDirector, SWT.CENTER);						tableColumnDirectorFirstname.setText("vorname");						tableColumnDirectorFirstname.setWidth(100);						tableColumnDirectorFirstname.addSelectionListener(sortListener);					}										//Filter ######					Label filterLabel = new Label(group1Director, SWT.NONE);					filterLabel.setText("Suche nach:");					employeeFilterText = new Text(group1Director, SWT.BORDER);					GridData data1 = new GridData();					data1.horizontalSpan = 2;					//data1.widthHint = 60;					filterLabel.setLayoutData(data1);					//GridData data2 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);					GridData data2 = new GridData(GridData.FILL_HORIZONTAL);					data2.horizontalSpan = 4;					//data2.widthHint = 60;					employeeFilterText.setLayoutData(data2);					employeeFilterText.addFocusListener(new FocusAdapter() {						public void focusLost(FocusEvent arg0) {							System.out.println("Enter key: " + employeeFilterText.getText());							refreshDirectorTable(employeeFilterText.getText());						}					});					employeeFilterText.addListener(SWT.DefaultSelection, new Listener() {						public void handleEvent(Event e) { //check for "enter" key							System.out.println("Enter key: " + employeeFilterText.getText());							refreshDirectorTable(employeeFilterText.getText());													}					});												}			}			{				group2Director = new Group(sashFormDirector, SWT.NONE);				group2Director.setText("Filmliste");				FormData formData = new FormData();				formData.top = new FormAttachment(0, 5);				formData.left = new FormAttachment(0, 5);				formData.bottom = new FormAttachment(100, -5);				formData.right = new FormAttachment(33, -5);				group2Director.setLayoutData(formData);				//Composite has a grid layout				GridLayout gridLayout = new GridLayout();				gridLayout.numColumns = 2;				group2Director.setLayout(gridLayout);				{					list2 = new List(group2Director, SWT.SINGLE							| SWT.H_SCROLL | SWT.V_SCROLL							| SWT.BORDER);					GridData list2LData = new GridData();					list2							.addSelectionListener(new SelectionAdapter() {								public void widgetSelected(										SelectionEvent evt) {									System.out											.println("list1.widgetSelected, event="													+ evt);									System.out											.println("Selected: "													+ list2															.getSelectionIndex());									//TODO add your code for list1.widgetSelected								}							});					list2LData.verticalAlignment = GridData.FILL;					list2LData.horizontalAlignment = GridData.FILL;					list2LData.grabExcessHorizontalSpace = true;					list2LData.grabExcessVerticalSpace = true;					list2.setLayoutData(list2LData);				}			}		}						refreshDirectorTable("");	}	