Skip to content

Instantly share code, notes, and snippets.

@hendrikstill
Created July 8, 2013 16:49
Show Gist options
  • Save hendrikstill/5950453 to your computer and use it in GitHub Desktop.
Save hendrikstill/5950453 to your computer and use it in GitHub Desktop.
package Klausurvorbereitung.parts;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
public class MainPart {
@Inject
public MainPart() {
//TODO Your code here
}
@PostConstruct
public void postConstruct(Composite parent) {
GridLayout gridLayoutParent = new GridLayout(1,false);
parent.setLayout(gridLayoutParent);
parent.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false));
Composite compositeOben = new Composite(parent, SWT.NONE);
GridLayout gridLayout = new GridLayout(4,false);
compositeOben.setLayout(gridLayout);
compositeOben.setLayoutData(new GridData(SWT.FILL,SWT.DEFAULT,true,false));
Composite compositeMitte = new Composite(parent, SWT.None);
compositeMitte.setLayout(new GridLayout(2,false));
Composite compositeUnten = new Composite(parent, SWT.NONE);
compositeUnten.setLayout(new GridLayout(2,false));
compositeUnten.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
Button checkBoxRun = new Button(compositeOben, SWT.CHECK);
checkBoxRun.setText("Run automatically,");
Button checkBoxFullBuild = new Button(compositeOben, SWT.CHECK);
checkBoxFullBuild.setText("(also on full build,");
checkBoxFullBuild.setEnabled(false);
Label labelAnalysis = new Label(compositeOben, SWT.NONE);
labelAnalysis.setText("analysis effort:");
Combo comboAnalysis = new Combo(compositeOben, SWT.END);
comboAnalysis.setLayoutData(new GridData(SWT.FILL,SWT.DEFAULT,true,false));
comboAnalysis.add("Defult");
Label labelEvaluation = new Label(compositeMitte,SWT.None);
labelEvaluation.setText("Store issue evaluation in:");
Combo comboEvaluation = new Combo(compositeMitte, SWT.NONE);
comboEvaluation.add("(cloud disabled)");
Label labelInclude = new Label(compositeUnten, SWT.None);
labelInclude.setText("Include filter files");
labelInclude.setLayoutData(new GridData(SWT.DEFAULT,SWT.DEFAULT,true,false,2,1));
Text textInclude = new Text(compositeUnten,SWT.MULTI);
textInclude.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
Composite compositeIncludeRechts = new Composite(compositeUnten, SWT.NONE);
compositeIncludeRechts.setLayout(new FillLayout(SWT.VERTICAL));
compositeIncludeRechts.setLayoutData(new GridData(SWT.LEFT,SWT.TOP,false,false));
Button buttonAdd1 = new Button(compositeIncludeRechts, SWT.PUSH);
buttonAdd1.setText("Add");
Button buttonRemove = new Button(compositeIncludeRechts, SWT.PUSH);
buttonRemove.setText("Remove");
Label labelExclude = new Label(compositeUnten,SWT.NONE);
labelExclude.setText("Exclude filter files");
labelExclude.setLayoutData(new GridData(SWT.DEFAULT,SWT.DEFAULT,true,false,2,1));
Text textExclude = new Text(compositeUnten, SWT.MULTI);
textExclude.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
Composite compositeIncludeRechts2 = new Composite(compositeUnten, SWT.NONE);
compositeIncludeRechts2.setLayout(new FillLayout(SWT.VERTICAL));
compositeIncludeRechts2.setLayoutData(new GridData(SWT.LEFT,SWT.TOP,false,false));
Button buttonAdd2 = new Button(compositeIncludeRechts2, SWT.PUSH);
buttonAdd2.setText("Add");
Button buttonLast = new Button(parent,SWT.PUSH);
buttonLast.setText("Last Button");
buttonLast.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false));
}
@Focus
public void onFocus() {
//TODO Your code here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment