Java Code Examples for org.eclipse.swt.layout.FillLayout

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project swtbot, under directory /org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/.

Source file: SashTab.java

  24 
vote

/** 
 * Creates the "Example" group.
 */
void createExampleGroup(){
  super.createExampleGroup();
  exampleGroup.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  exampleGroup.setLayout(new FillLayout());
  sashGroup=new Group(exampleGroup,SWT.NONE);
  FillLayout layout=new FillLayout();
  layout.marginHeight=layout.marginWidth=5;
  sashGroup.setLayout(layout);
  sashGroup.setText("Sash");
}
 

Example 2

From project bioclipse.speclipse, under directory /plugins/net.bioclipse.spectrum/src/net/bioclipse/spectrum/graph2d/.

Source file: Spectrum2DDisplay.java

  22 
vote

@Override public void createPartControl(Composite parent){
  Composite contChartcomposite=new Composite(parent,SWT.EMBEDDED);
  FillLayout layout=new FillLayout(SWT.VERTICAL);
  contChartcomposite.setLayout(layout);
  fileTableFrame=SWT_AWT.new_Frame(contChartcomposite);
  fileTableFrame.add(this.makeGraph());
}
 

Example 3

From project bundlemaker, under directory /main/org.bundlemaker.core.ui.view.problemview/src/org/bundlemaker/core/ui/view/problemview/.

Source file: ProblemView.java

  22 
vote

@Override public void createPartControl(Composite parent){
  FillLayout fillLayout=new FillLayout();
  fillLayout.type=SWT.VERTICAL;
  parent.setLayout(fillLayout);
  Composite tableComposite=new Composite(parent,SWT.NONE);
  tableComposite.setLayout(new TableColumnLayout());
  _viewer=new TableViewer(tableComposite,SWT.VIRTUAL | SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL| SWT.FULL_SELECTION);
  final Table table=_viewer.getTable();
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  _viewer.setContentProvider(ArrayContentProvider.getInstance());
  createColumns(tableComposite,_viewer);
}
 

Example 4

From project e4-rendering, under directory /com.toedter.e4.ui.workbench.renderers.swt/src/com/toedter/e4/ui/workbench/renderers/swt/.

Source file: PartRenderer.java

  22 
vote

@Override public void createWidget(MUIElement element,MElementContainer<MUIElement> parent){
  Composite parentWidget=(Composite)parent.getWidget();
  final MPart part=(MPart)element;
  Composite composite=new Composite(parentWidget,SWT.NONE);
  FillLayout fillLayout=new FillLayout(SWT.VERTICAL);
  composite.setLayout(fillLayout);
  IEclipseContext localContext=part.getContext();
  localContext.set(Composite.class,composite);
  IContributionFactory contributionFactory=(IContributionFactory)localContext.get(IContributionFactory.class.getName());
  Object newPart=contributionFactory.create(part.getContributionURI(),localContext);
  part.setObject(newPart);
  element.setWidget(composite);
}
 

Example 5

From project Eclipse, under directory /com.mobilesorcery.sdk.ui/src/com/mobilesorcery/sdk/ui/internal/properties/.

Source file: BuildSettingsPropertyPage.java

  22 
vote

@Override protected Control createContents(Composite parent){
  placeHolder=new Composite(parent,SWT.NONE);
  FillLayout placeHolderLayout=new FillLayout();
  placeHolderLayout.marginHeight=0;
  placeHolderLayout.marginWidth=0;
  placeHolder.setLayout(placeHolderLayout);
  fillPlaceHolder(placeHolder);
  getProject().addPropertyChangeListener(this);
  return placeHolder;
}
 

Example 6

From project hackergarten-moreunit, under directory /org.moreunit.plugin/src/org/moreunit/properties/.

Source file: UnitSourceFolderBlock.java

  22 
vote

private void createButtons(Composite composite){
  Composite buttonComposite=new Composite(composite,SWT.NONE);
  buttonComposite.setFont(composite.getFont());
  createAddButton(buttonComposite,composite.getFont());
  removeButton=createRemoveButton(buttonComposite,composite.getFont());
  mappingButton=createMappingButton(buttonComposite,composite.getFont());
  removeButton.setEnabled(false);
  mappingButton.setEnabled(false);
  FillLayout buttonBoxLayout=new FillLayout(SWT.VERTICAL);
  buttonComposite.setLayout(buttonBoxLayout);
  GridData layoutData=new GridData();
  layoutData.widthHint=100;
  buttonComposite.setLayoutData(layoutData);
}
 

Example 7

From project iee, under directory /org.eclipse.iee.sample.output/src/org/eclipse/iee/sample/output/pad/.

Source file: OutputPad.java

  22 
vote

@Override public void createPartControl(final Composite parent){
  FillLayout layout=new FillLayout(SWT.VERTICAL);
  parent.setLayout(layout);
  parent.setBackground(new Color(null,255,255,255));
  fLabel=new Label(parent,SWT.WRAP | SWT.CENTER);
  fLabel.setText("Message");
  fLabel.setSize(300,300);
  parent.pack();
  initLogic();
}
 

Example 8

From project org.openscada.orilla, under directory /org.openscada.ae.ui.views/src/org/openscada/ae/ui/views/dialog/.

Source file: FilterFreeFormComposite.java

  22 
vote

private void createComponents(){
  final FillLayout layout=new FillLayout(SWT.VERTICAL);
  layout.marginHeight=12;
  layout.marginWidth=12;
  setLayout(layout);
  final Text filterTextField=new Text(this,SWT.BORDER | SWT.MULTI | SWT.WRAP| SWT.V_SCROLL| SWT.H_SCROLL);
  filterTextField.setText(this.filter);
  filterTextField.addKeyListener(new KeyAdapter(){
    @Override public void keyReleased(    final KeyEvent e){
      verifyFilter(filterTextField.getText());
    }
  }
);
}
 

Example 9

From project radrails, under directory /plugins/com.aptana.radrails.rcp/src/com/aptana/radrails/rcp/.

Source file: CheatSheetStandbyContent.java

  22 
vote

/** 
 * @see org.eclipse.ui.intro.config.IStandbyContentPart#createPartControl(org.eclipse.swt.widgets.Composite,org.eclipse.ui.forms.widgets.FormToolkit)
 */
public void createPartControl(Composite parent,FormToolkit toolkit){
  container=toolkit.createComposite(parent);
  FillLayout layout=new FillLayout();
  layout.marginWidth=0;
  layout.marginHeight=0;
  container.setLayout(layout);
  viewer=new AptanaCheatSheetViewer();
  viewer.createPartControl(container);
}
 

Example 10

From project studio2-rcp, under directory /plugins/com.aptana.ide.rcp/src/com/aptana/ide/rcp/.

Source file: CheatSheetStandbyContent.java

  22 
vote

/** 
 * @see org.eclipse.ui.intro.config.IStandbyContentPart#createPartControl(org.eclipse.swt.widgets.Composite,org.eclipse.ui.forms.widgets.FormToolkit)
 */
public void createPartControl(Composite parent,FormToolkit toolkit){
  container=toolkit.createComposite(parent);
  FillLayout layout=new FillLayout();
  layout.marginWidth=0;
  layout.marginHeight=0;
  container.setLayout(layout);
  viewer=new AptanaCheatSheetViewer();
  viewer.createPartControl(container);
}
 

Example 11

From project Archimedes, under directory /br.org.archimedes.core/src/br/org/archimedes/gui/swt/preferences/.

Source file: PreferencesEditor.java

  21 
vote

/** 
 * Creates the buttons
 */
private void createButtons(){
  Composite buttonsComposite=new Composite(shell,SWT.NONE);
  buttonsComposite.setLayout(new FillLayout());
  okButton=new Button(buttonsComposite,SWT.PUSH);
  okButton.setText(Messages.OK);
  okButton.addSelectionListener(getOKSelectionAdapter());
  okButton.setVisible(true);
}
 

Example 12

From project aws-toolkit-for-eclipse, under directory /com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/explorer/sqs/.

Source file: AddMessageAction.java

  21 
vote

@Override protected Control createCustomArea(Composite parent){
  parent.setLayout(new GridLayout());
  Composite composite=new Composite(parent,SWT.BORDER);
  GridData gridData=new GridData(SWT.FILL,SWT.FILL,true,true);
  gridData.heightHint=100;
  gridData.widthHint=400;
  composite.setLayoutData(gridData);
  composite.setLayout(new FillLayout());
  text=new Text(composite,SWT.MULTI | SWT.BORDER);
  return composite;
}
 

Example 13

From project BHT-FPA, under directory /template-codebeispiele/de.bht.fpa.mail.s000000.templates.tableviewerbuilder/src/de/bht/fpa/mail/s000000/templates/tableviewerbuilder/.

Source file: Main.java

  21 
vote

public static void main(String[] args){
  Display display=new Display();
  Shell shell=new Shell(display);
  shell.setLayout(new FillLayout());
  CityStatsView navigationView=new CityStatsView();
  navigationView.createPartControl(shell);
  shell.open();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  display.dispose();
}
 

Example 14

From project bioclipse.seneca, under directory /plugins/net.bioclipse.seneca/src/net/bioclipse/seneca/views/.

Source file: BestStructureView.java

  21 
vote

public void createPartControl(Composite parent){
  SashForm sash=new SashForm(parent,SWT.VERTICAL);
  jcpwidget=new JChemPaintEditorWidget(sash,SWT.PUSH);
  Composite contChartcomposite=new Composite(sash,SWT.EMBEDDED);
  FillLayout layout=new FillLayout(SWT.VERTICAL);
  contChartcomposite.setLayout(layout);
  fileTableFrame=SWT_AWT.new_Frame(contChartcomposite);
  String xAxisLabel="Steps";
  String yAxisLabel="Temperature/Score";
  String title="Annealing progress";
  XYSeries series=new XYSeries("Signal");
  for (int i=0; i < (maxSteps != 0 ? maxSteps : temps.size()); i++) {
    if (i < temps.size())     series.add(i,temps.get(i));
 else     series.add(i,0);
  }
  XYDataset xyDataset=new XYSeriesCollection(series);
  continuousChart=ChartFactory.createXYAreaChart(title,xAxisLabel,yAxisLabel,xyDataset,PlotOrientation.VERTICAL,false,true,false);
  continuousChart.setAntiAlias(false);
  XYPlot continuousPlot=continuousChart.getXYPlot();
  continuousPlot.setRenderer(new StandardXYItemRenderer());
  ChartPanel chart=new ChartPanel(continuousChart);
  fileTableFrame.add(chart);
}
 

Example 15

From project bndtools, under directory /bndtools.release/src/bndtools/release/ui/.

Source file: BundleTree.java

  21 
vote

public void createControl(){
  sashForm=new SashForm(this,SWT.VERTICAL);
  sashForm.setLayout(new FillLayout());
  sashForm.setSashWidth(10);
  createInfoViewer(sashForm);
  createBundleTreeViewer(sashForm);
  showAll=createButtons(this);
  setLayout(new BundleTreeLayout());
  sashForm.setWeights(new int[]{30,70});
}
 

Example 16

From project bpelunit, under directory /tycho/net.bpelunit.framework.client.eclipse/src/net/bpelunit/framework/client/eclipse/preferences/.

Source file: RegisteredExtensionsPreferencePage.java

  21 
vote

private void createDataSourcesTab(){
  TabItem tabDataSources=new TabItem(tabs,SWT.NULL);
  tabDataSources.setText("Data Sources");
  Composite dataSourceComposite=new Composite(tabs,SWT.NONE);
  dataSourceComposite.setLayout(new FillLayout(SWT.VERTICAL));
  tabDataSources.setControl(dataSourceComposite);
  createDataSourcesTree(dataSourceComposite);
  createDataSourcesOptionsTree(dataSourceComposite);
}
 

Example 17

From project BPMN2-Editor-for-Eclipse, under directory /org.eclipse.bpmn2.modeler.extras/src/org/eclipse/bpmn2/modeler/ui/property/.

Source file: JbpmPropertySection.java

  21 
vote

@Override public void createControls(Composite parent,TabbedPropertySheetPage aTabbedPropertySheetPage){
  this.aTabbedPropertySheetPage=aTabbedPropertySheetPage;
  super.createControls(parent,aTabbedPropertySheetPage);
  parent.setLayout(new FillLayout());
  composite=new JbpmPropertiesComposite(parent,SWT.None);
}
 

Example 18

From project CIShell, under directory /clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/builder/components/.

Source file: LabelingComponent.java

  21 
vote

private Shell createDescriptionShell(final String descText,Button descriptionButton){
  Shell descriptionShell=new Shell(descriptionButton.getShell(),SWT.NONE);
  descriptionShell.setLayout(new FillLayout());
  descriptionShell.setSize(DESCRIPTION_SHELL_DIMENSIONS);
  Text description=new Text(descriptionShell,SWT.MULTI | SWT.V_SCROLL | SWT.WRAP| SWT.READ_ONLY);
  description.setText(descText);
  description.setBackground(DESCRIPTION_BGCOLOR);
  descriptionShell.addListener(SWT.Traverse,new DescriptionShellListener(descriptionButton));
  return descriptionShell;
}
 

Example 19

From project dawn-isenciaui, under directory /com.teaminabox.eclipse.wiki/src/com/teaminabox/eclipse/wiki/editors/.

Source file: WikiBrowserEditor.java

  21 
vote

private void createBrowserPage(){
  wikiBrowser=new WikiBrowser(editor);
  Composite composite=new Composite(getContainer(),SWT.NULL);
  composite.setLayout(new FillLayout());
  wikiBrowser.createPartControl(composite);
  browserIndex=addPage(composite);
  setPageText(browserIndex,"Browser");
}
 

Example 20

From project Diver, under directory /ca.uvic.chisel.javasketch/src/ca/uvic/chisel/javasketch/persistence/internal/.

Source file: ReanalyzeWizardPage.java

  21 
vote

@Override public void createControl(Composite parent){
  parent.setLayout(new FillLayout());
  this.filterControl=new FiltersComposite(parent);
  updateFromSketch();
  filterControl.setParentContext(this);
  filterControl.setJavaContext(sketch.getFilterSettings().getJavaProjects());
  filterControl.setLaunchType(sketch.getFilterSettings().getLaunchType());
  setControl(filterControl);
}
 

Example 21

From project droolsjbpm-tools, under directory /drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/flow/common/view/datatype/editor/impl/.

Source file: BooleanEditor.java

  21 
vote

public BooleanEditor(Composite parent){
  super(parent,SWT.NONE);
  setLayout(new FillLayout());
  combo=new Combo(this,SWT.READ_ONLY);
  combo.setItems(TF);
  combo.select(1);
}
 

Example 22

From project eclipse-instasearch, under directory /instasearch/src/it/unibz/instasearch/ui/.

Source file: SearchViewControl.java

  21 
vote

/** 
 * @param parent
 */
private void createControl(Composite parent){
  GridLayout parentLayout=new GridLayout();
  parentLayout.marginLeft=0;
  parentLayout.horizontalSpacing=0;
  parentLayout.verticalSpacing=0;
  parentLayout.marginWidth=0;
  parentLayout.marginHeight=2;
  parent.setLayout(parentLayout);
  Composite textComposite=new Composite(parent,SWT.NONE);
  GridData textCompositeGridData=new GridData(GridData.FILL,GridData.BEGINNING,true,false);
  textComposite.setLayoutData(textCompositeGridData);
  GridLayout layout=new GridLayout(2,false);
  layout.marginLeft=2;
  layout.horizontalSpacing=0;
  layout.verticalSpacing=0;
  layout.marginWidth=0;
  layout.marginHeight=0;
  textComposite.setLayout(layout);
  createSearchTextControl(textComposite);
  createFilterBar(textComposite);
  Composite viewComposite=new Composite(parent,SWT.NONE);
  viewComposite.setLayoutData(new GridData(GridData.FILL,GridData.FILL,true,true));
  FillLayout fillLayout=new FillLayout();
  fillLayout.marginHeight=0;
  fillLayout.marginWidth=0;
  fillLayout.spacing=0;
  viewComposite.setLayout(fillLayout);
  resultViewer=new TreeViewer(viewComposite,SWT.FULL_SELECTION);
}
 

Example 23

From project Foglyn, under directory /com.foglyn.ui/src/com/foglyn/ui/.

Source file: FoglynFillWidthLayout.java

  21 
vote

/** 
 * calculate the client area of the given container, accomodating for insets and margins.
 */
private int calculateWidthHint(Composite container,boolean layoutAdvisorHit){
  if (container == layoutAdvisor) {
    layoutAdvisorHit=true;
  }
  Rectangle clientArea=container.getClientArea();
  int horizontalMargin=0;
  if (clientArea.width <= 1 || !layoutAdvisorHit) {
    clientArea.width=calculateWidthHint(container.getParent(),layoutAdvisorHit);
  }
  Layout bodyLayout=container.getLayout();
  if (bodyLayout instanceof GridLayout) {
    GridLayout gridLayout=(GridLayout)bodyLayout;
    horizontalMargin=(gridLayout.marginWidth * 2) + gridLayout.marginLeft + gridLayout.marginRight;
  }
 else   if (bodyLayout instanceof FillLayout) {
    FillLayout fillLayout=(FillLayout)bodyLayout;
    horizontalMargin=fillLayout.marginWidth * 2;
  }
 else   if (container instanceof Section) {
    horizontalMargin=((Section)container).marginWidth * 2;
  }
 else   if (container instanceof CTabFolder) {
    CTabFolder folder=(CTabFolder)container;
    horizontalMargin=folder.marginWidth * 2;
  }
  if (container instanceof ScrolledComposite) {
    ScrolledComposite composite=(ScrolledComposite)container;
    ScrollBar verticalBar=composite.getVerticalBar();
    if (verticalBar != null) {
      int verticalBarWidth=verticalBar.getSize().x;
      horizontalMargin+=Math.max(15,verticalBarWidth);
    }
  }
  return clientArea.width - horizontalMargin;
}
 

Example 24

From project gda-common-rcp, under directory /uk.ac.gda.common.rcp/src/uk/ac/gda/richbeans/components/wrappers/.

Source file: LabelWrapper.java

  21 
vote

/** 
 * @param parent
 * @param style
 */
public LabelWrapper(final Composite parent,final int style){
  super(parent,SWT.NONE);
  setLayout(new FillLayout());
  label=new Label(this,style);
  mainControl=label;
  this.numberFormat=NumberFormat.getInstance();
  numberFormat.setMaximumFractionDigits(decimalPlaces);
  numberFormat.setGroupingUsed(false);
}
 

Example 25

From project GenericKnimeNodes, under directory /com.genericworkflownodes.knime.base_plugin/src/com/genericworkflownodes/knime/preferences/.

Source file: ExternalToolsPage.java

  21 
vote

@Override protected Control createContents(Composite parent){
  ScrolledComposite sc=new ScrolledComposite(parent,SWT.V_SCROLL);
  sc.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  Composite c=new Composite(sc,SWT.NONE);
  FillLayout fillLayout=new FillLayout();
  fillLayout.type=SWT.VERTICAL;
  c.setLayout(fillLayout);
  sc.setContent(c);
  sc.setExpandHorizontal(true);
  sc.setExpandVertical(true);
  IToolLocatorService toolLocator=(IToolLocatorService)PlatformUI.getWorkbench().getService(IToolLocatorService.class);
  if (toolLocator != null) {
    Map<String,List<ExternalTool>> plugin2tools=toolLocator.getToolsByPlugin();
    for (    String pluginname : plugin2tools.keySet()) {
      Group group=new Group(c,SWT.SHADOW_ETCHED_IN);
      group.setText(pluginname);
      List<ExternalTool> tools=plugin2tools.get(pluginname);
      Collections.sort(tools,new Comparator<ExternalTool>(){
        @Override public int compare(        final ExternalTool o1,        final ExternalTool o2){
          return o1.getToolName().compareToIgnoreCase(o2.getToolName());
        }
      }
);
      for (      ExternalTool tool : tools) {
        ToolFieldEditor gToolEditor=new ToolFieldEditor(tool,group);
        gToolEditor.load();
        toolPathes.add(gToolEditor);
      }
    }
  }
  return sc;
}
 

Example 26

From project gmc, under directory /src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/.

Source file: MigrateBrickPage1.java

  21 
vote

private Composite createTableViewerComposite(Composite parent){
  Composite tableViewerComposite=new Composite(parent,SWT.NONE);
  tableViewerComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
  tableViewerComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  return tableViewerComposite;
}
 

Example 27

From project incubator, under directory /net.karlmartens.ui/src/net/karlmartens/ui/widget/.

Source file: TableColumnManager.java

  21 
vote

private void showColumnMoveEffect(){
  _table.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_HAND));
  _shell=new Shell(getDisplay(),SWT.NO_TRIM);
  _shell.setLayout(new FillLayout());
  _shell.setBounds(_image.getBounds());
  final Label l=new Label(_shell,SWT.NONE);
  l.setImage(_image);
  l.setBackground(getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
  _shell.open();
}
 

Example 28

From project ivyde, under directory /org.apache.ivyde.eclipse.resolvevisualizer/src/org/apache/ivyde/eclipse/resolvevisualizer/.

Source file: ResolveVisualizerForm.java

  21 
vote

public ResolveVisualizerForm(Composite parent,FormToolkit toolkit,ResolveVisualizerView view){
  this.toolkit=toolkit;
  this.view=view;
  form=this.toolkit.createScrolledForm(parent);
  managedForm=new ManagedForm(this.toolkit,this.form);
  createHeaderRegion(form);
  FillLayout layout=new FillLayout();
  layout.marginHeight=10;
  layout.marginWidth=4;
  form.getBody().setLayout(layout);
  this.toolkit.decorateFormHeading(this.form.getForm());
  createSash(form.getBody());
  view.getContentProvider().addFilter(depthFilter);
  view.getContentProvider().addFilter(evictionFilter);
}
 

Example 29

From project Mura-Tools-for-Eclipse-Core, under directory /src/com/muratools/eclipse/wizard/newPlugin/.

Source file: LicensePage.java

  21 
vote

public void createControl(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  setControl(composite);
  composite.setLayout(new FillLayout(SWT.VERTICAL));
  text=new Text(composite,SWT.BORDER | SWT.WRAP | SWT.MULTI);
}
 

Example 30

From project mylyn.builds, under directory /org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/editor/.

Source file: BuildDetailsPage.java

  21 
vote

@Override protected void createFormContent(IManagedForm managedForm){
  super.createFormContent(managedForm);
  form=managedForm.getForm().getForm();
  toolkit=managedForm.getToolkit();
  Composite body=form.getBody();
  body.setLayout(GridLayoutFactory.fillDefaults().create());
  body.setBackgroundMode(SWT.INHERIT_FORCE);
  boolean fillBottomPart=parts.size() > 0 && parts.get(parts.size() - 1).span == 2 && parts.get(parts.size() - 1).expandVertically;
  if (parts.size() > 1) {
    Composite bodyTop=new Composite(body,SWT.NONE);
    GridDataFactory.fillDefaults().grab(true,false).applyTo(bodyTop);
    TableWrapLayout layout=new TableWrapLayout();
    layout.numColumns=2;
    bodyTop.setLayout(layout);
    for (    AbstractBuildEditorPart part : parts.subList(0,(fillBottomPart) ? parts.size() - 1 : parts.size())) {
      createPart(bodyTop,part);
      TableWrapData data=new TableWrapData();
      data.colspan=part.getSpan();
      data.align=TableWrapData.FILL;
      data.valign=TableWrapData.FILL;
      data.grabHorizontal=true;
      data.grabVertical=part.getExpandVertically();
      part.getControl().setLayoutData(data);
    }
  }
  if (fillBottomPart) {
    Composite bodyBottom=new Composite(body,SWT.NONE);
    GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(bodyBottom);
    FillLayout fillLayout=new FillLayout();
    fillLayout.marginHeight=5;
    fillLayout.marginWidth=5;
    bodyBottom.setLayout(fillLayout);
    AbstractBuildEditorPart part=parts.get(parts.size() - 1);
    createPart(bodyBottom,part);
  }
}
 

Example 31

From project netifera, under directory /platform/com.netifera.platform.net.packets/com.netifera.platform.net.daemon.sniffing.ui/src/com/netifera/platform/net/daemon/sniffing/ui/.

Source file: ConfigPanel.java

  21 
vote

protected Control createDialogArea(Composite parent){
  final Composite composite=(Composite)super.createDialogArea(parent);
  composite.setLayout(new FillLayout());
  toolkit=new FormToolkit(composite.getDisplay());
  form=toolkit.createForm(composite);
  FormColors colors=toolkit.getColors();
  colors.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
  body=form.getBody();
  body.setLayout(new GridLayout());
  toolkit.paintBordersFor(body);
  return composite;
}
 

Example 32

From project Newsreader, under directory /bundles/org.eclipse.ecf.salvo.ui/src/org/eclipse/ecf/salvo/ui/internal/dialogs/.

Source file: ThisUserArticlesComposite.java

  21 
vote

public static void showArticles(Shell parentShell,INewsgroup newsgroup){
  Shell shell=new Shell(parentShell,SWT.SHELL_TRIM);
  shell.setText("Articles by " + newsgroup.getServer().getServerConnection().getUser() + " in "+ newsgroup.getNewsgroupName());
  new ThisUserArticlesComposite(shell,newsgroup,SWT.NULL);
  if (shell.getChildren().length != 0) {
    shell.setLayout(new FillLayout());
    shell.open();
  }
}
 

Example 33

From project PSP-NetParty, under directory /src/pspnetparty/client/test/.

Source file: TestJfacePreference.java

  21 
vote

public static void main1(String[] args){
  final Display display=new Display();
  Shell shell0=new Shell();
  final Shell shell=new Shell(shell0,SWT.SHELL_TRIM | SWT.TOOL);
  shell.setLayout(new FillLayout());
  shell0.open();
  shell.open();
  while (!shell0.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  display.dispose();
}
 

Example 34

From project rap-osgi-tutorial-ece2011, under directory /com.codeaffine.example.rwt.osgi.configurationadmin/src/com/codeaffine/example/rwt/osgi/configurationadmin/console/.

Source file: OSGiConsole.java

  21 
vote

public void create(Composite parent){
  composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new FillLayout());
  UICallBack.activate(String.valueOf(composite.hashCode()));
  consoleWidget=new Text(composite,SWT.MULTI);
  consoleWidget.setData(WidgetUtil.CUSTOM_VARIANT,"osgi_console");
  File consoleIn=createTempFile("consoleIn");
  File consoleOut=createTempFile("consoleOut");
  registerInputProcessor(consoleWidget,consoleIn);
  registerOutputProcessor(consoleWidget,consoleOut);
  registerConsoleSession(consoleIn,consoleOut);
  ConsoleCloser consoleCloser=new ConsoleCloser(this);
  RWT.getSessionStore().addSessionStoreListener(consoleCloser);
}
 

Example 35

From project recommenders, under directory /plugins/org.eclipse.recommenders.completion.rcp.calls/src/org/eclipse/recommenders/internal/completion/rcp/calls/preferences/.

Source file: CallPreferencePage.java

  21 
vote

private void createModelInformationBlock(final Composite composite){
  new Label(composite,SWT.NONE).setText("Lists all known class-path dependencies and their associated recommendation models if any. " + "Select\nmodels to view detail information.");
  computeMappings();
  final SashForm form=new SashForm(composite,SWT.HORIZONTAL);
  form.setLayout(new FillLayout());
  createTable(form);
  createDetails(form);
  bindValues();
  form.setWeights(new int[]{50,50});
}
 

Example 36

From project scisoft-ui, under directory /uk.ac.diamond.scisoft.analysis.rcp/src/uk/ac/diamond/scisoft/analysis/rcp/plotting/.

Source file: PlotWindow.java

  21 
vote

private void createDatasetPlotter(PlottingMode mode){
  parentComp.setLayout(new FillLayout());
  mainPlotterComposite=new Composite(parentComp,SWT.NONE);
  mainPlotterComposite.setLayout(new FillLayout());
  mainPlotter=new DataSetPlotter(mode,mainPlotterComposite,true);
  mainPlotter.setAxisModes(AxisMode.LINEAR,AxisMode.LINEAR,AxisMode.LINEAR);
  mainPlotter.setXAxisLabel("X-Axis");
  mainPlotter.setYAxisLabel("Y-Axis");
  mainPlotter.setZAxisLabel("Z-Axis");
}
 

Example 37

From project tabris-demos, under directory /com.eclipsesource.tabris.demos/src/com/eclipsesource/tabris/demos/entrypoints/.

Source file: ButtonControlsDemo.java

  21 
vote

public int createUI(){
  Display display=new Display();
  Shell shell=new Shell(display,SWT.NO_TRIM);
  shell.setMaximized(true);
  shell.setLayout(new FillLayout());
  shell.setBackground(display.getSystemColor(SWT.COLOR_BLACK));
  createContent(display,shell);
  shell.open();
  shell.setVisible(true);
  return 0;
}
 

Example 38

From project Bio-PEPA, under directory /uk.ac.ed.inf.common.ui.plotview/src/uk/ac/ed/inf/common/ui/plotview/views/.

Source file: PlotView.java

  20 
vote

public synchronized void reveal(IChart chart,String name){
  if (name == null || chart == null)   throw new NullPointerException();
  TabItem item=new TabItem(folder,SWT.NULL);
  item.setText(name);
  Composite composite=new Composite(folder,SWT.NONE);
  composite.setLayout(new FillLayout());
  Canvas paintCanvas=new Canvas(composite,SWT.BORDER);
  paintCanvas.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
  ChartPreview preview=new ChartPreview(chart);
  paintCanvas.addPaintListener(preview);
  paintCanvas.addControlListener(preview);
  preview.setPreview(paintCanvas);
  preview.renderModel();
  item.setControl(composite);
  charts.put(item,chart);
  folder.setSelection(item);
  notify(new StructuredSelection(chart));
}
 

Example 39

From project ceylon-ide-eclipse, under directory /plugins/com.redhat.ceylon.eclipse.ui/src/com/redhat/ceylon/eclipse/code/hover/.

Source file: AbstractInformationControl.java

  20 
vote

/** 
 * Creates an abstract information control with the given shell as parent. The given shell style is used for the shell (NO_TRIM will be removed to make sure there's a border). <p> The control will optionally show either a status line or a tool bar. At most one of <code>toolBarManager</code> or <code>statusFieldText</code> can be non-null. </p> <p> <strong>Important:</strong>: Subclasses are required to call  {@link #create()} at the end of their constructor.</p>
 * @param parentShell the parent of this control's shell
 * @param shellStyle style of this control's shell
 * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field
 * @param toolBarManager the manager or <code>null</code> if toolbar is not desired
 */
private AbstractInformationControl(Shell parentShell,int shellStyle,final String statusFieldText,final ToolBarManager toolBarManager,Color color){
  Assert.isTrue(statusFieldText == null || toolBarManager == null);
  fResizeHandleSize=-1;
  fToolBarManager=toolBarManager;
  if ((shellStyle & SWT.NO_TRIM) != 0)   shellStyle&=~(SWT.NO_TRIM | SWT.SHELL_TRIM);
  fResizable=(shellStyle & SWT.RESIZE) != 0;
  fShell=new Shell(parentShell,shellStyle);
  Display display=fShell.getDisplay();
  Color foreground=display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
  Color background=display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
  setColor(fShell,foreground,background);
  GridLayout layout=new GridLayout(1,false);
  layout.marginHeight=0;
  layout.marginWidth=0;
  layout.verticalSpacing=0;
  fShell.setLayout(layout);
  fContentComposite=new Composite(fShell,SWT.NONE);
  fContentComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  fContentComposite.setLayout(new FillLayout());
  setColor(fContentComposite,foreground,background);
  createStatusComposite(statusFieldText,toolBarManager,foreground,background);
  addDisposeListener(new DisposeListener(){
    public void widgetDisposed(    DisposeEvent e){
      handleDispose();
    }
  }
);
}
 

Example 40

From project dawn-tango, under directory /org.dawb.tango.extensions/src/org/dawb/tango/extensions/editors/.

Source file: MultiScanEditor.java

  20 
vote

@Override public void createPartControl(final Composite parent){
  final Composite main=new Composite(parent,SWT.NONE);
  final GridLayout gridLayout=new GridLayout(1,false);
  main.setLayout(gridLayout);
  GridUtils.removeMargins(main);
  final Composite tools=new Composite(main,SWT.RIGHT);
  tools.setLayout(new GridLayout(2,false));
  GridUtils.removeMargins(tools);
  tools.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,true,false));
  ToolBarManager toolMan=new ToolBarManager(SWT.FLAT | SWT.RIGHT);
  final ToolBar toolBar=toolMan.createControl(tools);
  toolBar.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false));
  ToolBarManager extraMan=new ToolBarManager(SWT.FLAT | SWT.RIGHT);
  final ToolBar extraBar=extraMan.createControl(tools);
  extraBar.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false));
  this.menuMan=new MenuManager();
  final IActionBars bars=this.getEditorSite().getActionBars();
  ActionBarWrapper wrapper=new ActionBarWrapper(toolMan,null,null,(IActionBars2)bars);
  createCustomMenuBarActionsRight(menuMan);
  createCustomToolbarActionsRight(extraMan);
  Action menuAction=new Action("",Activator.imageDescriptorFromPlugin("icons/DropDown.png")){
    @Override public void run(){
      final Menu mbar=menuMan.createContextMenu(extraBar);
      mbar.setVisible(true);
    }
  }
;
  extraMan.add(menuAction);
  this.plot=new Composite(main,SWT.BORDER);
  plot.setLayout(new FillLayout());
  plot.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  final String plotName=this.getEditorInput().getName();
  plottingSystem.createPlotPart(plot,plotName,wrapper,PlotType.PT1D,this);
  if (toolMan != null)   toolMan.update(true);
  if (extraMan != null)   extraMan.update(true);
}
 

Example 41

From project dawn-ui, under directory /org.dawb.workbench.plotting/src/org/dawb/workbench/plotting/tools/.

Source file: EllipseFittingTool.java

  20 
vote

@Override public void createControl(Composite parent){
  composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new FillLayout());
  viewer=new TableViewer(composite,SWT.FULL_SELECTION | SWT.SINGLE | SWT.H_SCROLL| SWT.V_SCROLL| SWT.BORDER);
  createColumns(viewer);
  Table t=viewer.getTable();
  t.setLinesVisible(true);
  t.setHeaderVisible(true);
  createActions();
  getSite().setSelectionProvider(viewer);
  viewer.setContentProvider(new IStructuredContentProvider(){
    @Override public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
    @Override public void dispose(){
    }
    @Override public Object[] getElements(    Object inputElement){
      return ellipses.toArray();
    }
  }
);
  viewer.setInput(ellipses);
  parent.layout();
}
 

Example 42

From project eik, under directory /plugins/info.evanchik.eclipse.karaf.workbench/src/main/java/info/evanchik/eclipse/karaf/workbench/ui/views/bundle/.

Source file: BundlesView.java

  20 
vote

@Override public void createMainControl(final Composite parent){
  parent.setLayout(new FillLayout());
  treeTable=new Tree(parent,SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL| SWT.V_SCROLL);
  treeTable.setLinesVisible(true);
  treeTable.setHeaderVisible(true);
  TreeColumn col=new TreeColumn(treeTable,SWT.BORDER);
  col.setWidth(colWidth[0]);
  col.setText("Runtime");
  col=new TreeColumn(treeTable,SWT.BORDER);
  col.setWidth(colWidth[1]);
  col.setText("Id");
  col=new TreeColumn(treeTable,SWT.NONE);
  col.setWidth(colWidth[2]);
  col.setText("State");
  col=new TreeColumn(treeTable,SWT.NONE);
  col.setWidth(colWidth[3]);
  col.setText("Name");
  col=new TreeColumn(treeTable,SWT.NONE);
  col.setWidth(colWidth[4]);
  col.setText("Location");
  treeTableViewer=new TreeViewer(treeTable);
  treeTableViewer.setLabelProvider(new BundleTableLabelProvider());
  nameFilter=new BundleSymbolicNameFilter();
  treeTableViewer.addFilter(nameFilter);
  contentProvider=new BundlesContentProvider();
  treeTableViewer.setContentProvider(contentProvider);
  treeTableViewer.setSorter(new BundleIdSorter());
  treeTableViewer.setInput(KarafWorkbenchActivator.getDefault().getBundle().getBundleContext());
  getViewSite().setSelectionProvider(treeTableViewer);
  createActions();
  fillMenu();
  initContextMenu();
}
 

Example 43

From project logsaw-app, under directory /net.sf.logsaw.ui/src/net/sf/logsaw/ui/views/.

Source file: ALogEntryFieldView.java

  20 
vote

@Override public void createPartControl(Composite parent){
  root=new Composite(parent,SWT.NONE);
  stackLayout=new StackLayout();
  stackLayout.marginHeight=0;
  stackLayout.marginWidth=0;
  root.setLayout(stackLayout);
  noEntryArea=new Composite(root,SWT.NONE);
  noEntryArea.setLayout(new GridLayout());
  noEntryText=new Text(noEntryArea,SWT.SINGLE);
  noEntryText.setBackground(noEntryArea.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
  noEntryText.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,false));
  noEntryText.setEditable(false);
  displayArea=new Composite(root,SWT.NONE);
  displayArea.setLayout(new FillLayout());
  displayText=new Text(displayArea,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
  displayText.setBackground(noEntryArea.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
  displayText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  displayText.setEditable(false);
  IEditorPart activeEditor=getSite().getPage().getActiveEditor();
  ILogViewEditor editor=activeEditor != null ? (ILogViewEditor)activeEditor.getAdapter(ILogViewEditor.class) : null;
  if (editor != null) {
    activeEditorChanged(editor);
  }
 else {
    activeEditorChanged(null);
  }
  getSite().getPage().addSelectionListener(selectionListener);
  getSite().getPage().getWorkbenchWindow().getPartService().addPartListener(partListener);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,IHelpContexts.MESSAGE_AND_STACKTRACE_VIEWS);
}
 

Example 44

From project marabou, under directory /src/main/java/net/launchpad/marabou/gui/.

Source file: ErrorWindow.java

  20 
vote

private ErrorWindow(){
  Display display=Display.getCurrent();
  shell=new Shell(display);
  shell.setLayout(new FillLayout());
  shell.setSize(500,300);
  shell.setText(_("Marabou - Error Occurred"));
  Image logoWM=new Image(display,"src/main/resources/graphics/marabou_16.png");
  shell.setImage(logoWM);
  errorText=new List(shell,SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
  DisposeListener listener=new DisposeListener(){
    @Override public void widgetDisposed(    DisposeEvent e){
      instance=null;
    }
  }
;
  shell.addDisposeListener(listener);
  while (!shell.isDisposed() && display.isDisposed()) {
    if (!display.readAndDispatch())     display.sleep();
  }
}
 

Example 45

From project mylyn.context, under directory /org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/editors/.

Source file: ContextEditorFormPage.java

  20 
vote

@Override protected void createFormContent(IManagedForm managedForm){
  ContextCore.getContextManager().addListener(CONTEXT_LISTENER);
  task=((TaskEditorInput)getEditorInput()).getTask();
  form=managedForm.getForm();
  toolkit=managedForm.getToolkit();
  if (isActiveTask()) {
    context=new ContextWrapper(ContextCorePlugin.getContextManager().getActiveContext(),task);
  }
 else {
    context=new ContextWrapper(ContextCorePlugin.getContextStore().loadContext(task.getHandleIdentifier()),task);
  }
  form.getBody().setLayout(new FillLayout());
  Composite composite=new Composite(form.getBody(),SWT.NONE){
    @Override public Point computeSize(    int widhtHint,    int heigtHint,    boolean changed){
      Rectangle clientArea=getClientArea();
      return super.computeSize(widhtHint,clientArea.height,changed);
    }
  }
;
  toolkit.adapt(composite);
  composite.setLayout(new GridLayout(2,false));
  createActionsSection(composite);
  createContentSection(composite);
  form.reflow(true);
}
 

Example 46

From project mylyn.docs, under directory /org.eclipse.mylyn.wikitext.tests/src/org/eclipse/mylyn/wikitext/tests/.

Source file: AbstractTestApplication.java

  20 
vote

protected void doMain() throws IOException {
  markup="";
  Display display=new Display();
  Shell shell=new Shell(display);
  shell.setLayout(new FillLayout());
  CTabFolder folder=new CTabFolder(shell,SWT.BORDER);
  createWikiTextViewer(folder);
  createBrowser(folder);
  createMarkupSourceViewer(folder);
  createHtmlSourceViewer(folder);
  createDocbookSourceViewer(folder);
  updateDependentViewers();
  folder.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent selectionevent){
      widgetSelected(selectionevent);
    }
    public void widgetSelected(    SelectionEvent selectionevent){
      if (dirty) {
        updateViewers();
      }
    }
  }
);
  shell.pack();
  shell.open();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  display.dispose();
}
 

Example 47

From project mylyn.incubator, under directory /org.eclipse.mylyn.sandbox.search.ui/src/org/eclipse/mylyn/internal/sandbox/search/ui/.

Source file: DesktopSearchResultPage.java

  20 
vote

@Override public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  container.setLayout(new FillLayout());
  viewer=new TreeViewer(container,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
  viewer.setUseHashlookup(true);
  viewer.setContentProvider(new ContentProvider());
  viewer.setLabelProvider(new DesktopSearchLabelProvider(new SearchResultLabelProvider()));
  getSite().setSelectionProvider(viewer);
  control=container;
  createMenu();
  viewer.getControl().setMenu(menu.createContextMenu(viewer.getControl()));
  getSite().registerContextMenu(getViewPart().getViewSite().getId(),menu,viewer);
  viewer.addOpenListener(new IOpenListener(){
    public void open(    OpenEvent event){
      ISelection selection=event.getSelection();
      if (selection instanceof IStructuredSelection) {
        IStructuredSelection structuredSelection=(IStructuredSelection)selection;
        OpenFileAction openFileAction=new OpenFileAction(getSite().getPage());
        openFileAction.selectionChanged(structuredSelection);
        if (openFileAction.isEnabled()) {
          openFileAction.run();
        }
      }
    }
  }
);
  getViewPart().updateLabel();
}
 

Example 48

From project org.openscada.dakara, under directory /org.openscada.vi.ui.draw2d/src/org/openscada/vi/ui/draw2d/.

Source file: VisualInterfaceViewer.java

  20 
vote

public VisualInterfaceViewer(final Composite parent,final int style,final SymbolLoader loader,final Map<String,Object> scriptObjects,final Map<String,String> properties){
  super(parent,style);
  this.initialProperties=properties == null ? Collections.<String,String>emptyMap() : properties;
  this.scriptObjects=scriptObjects;
  this.manager=new LocalResourceManager(JFaceResources.getResources());
  addDisposeListener(new DisposeListener(){
    @Override public void widgetDisposed(    final DisposeEvent e){
      internalDispose();
    }
  }
);
  setLayout(new FillLayout());
  this.canvas=createCanvas();
  setZooming(null);
  this.factory=new ViewElementFactory(this.canvas,this.manager);
  try {
    this.pane=createPane();
    this.layer=new Layer();
    this.connectionLayer=new ConnectionLayer();
    this.connectionLayer.setConnectionRouter(new ManhattanConnectionRouter());
    this.layer.setLayoutManager(new StackLayout());
    this.pane.add(this.connectionLayer);
    this.pane.add(this.layer);
    loader.load();
    this.symbol=loader.getSymbol();
    create(loader.getSymbol(),loader.getClassLoader());
    applyColor(loader.getSymbol());
  }
 catch (  final Exception e) {
    this.canvas.setContents(Helper.createErrorFigure(e));
  }
}
 

Example 49

From project org.openscada.external, under directory /org.eclipse.albireo/src/org/eclipse/albireo/core/.

Source file: AwtEnvironment.java

  20 
vote

/** 
 * Creates an AWT frame suitable as a parent for AWT/Swing dialogs.  <p> This method must be called from the SWT event thread. There must be an active shell associated with the environment's display. <p> The created frame is a non-visible child of the given shell and will be disposed when that shell is disposed. <p> This method is useful for creating a frame to parent any AWT/Swing dialogs created for use inside a SWT application. A modal AWT/Swing dialogs will behave better if its parent is set to the returned frame rather than to null or to an independently created  {@link java.awt.Frame}. <p> The frame is positioned such that its child AWT dialogs are centered over the given parent shell's position <i>when this method is called</i>. If the parent frame is  later moved, the child will no longer be properly positioned. For best results, create a new frame with this method immediately before creating and displaying each child AWT/Swing dialog.  <p> As with any AWT window, the returned frame must be explicitly disposed.
 * @param parent - the SWT parent shell of the shell that will contain the returned frame  
 * @return a {@link java.awt.Frame} to be used for parenting dialogs
 * @exception SWTException <ul> <li>ERROR_THREAD_INVALID_ACCESS - if not called from the SWT event thread </ul>
 * @exception IllegalStateException if the current display has no shells
 */
public Frame createDialogParentFrame(final Shell parent){
  if (parent == null) {
    SWT.error(SWT.ERROR_NULL_ARGUMENT);
  }
  if (!this.display.equals(Display.getCurrent())) {
    SWT.error(SWT.ERROR_THREAD_INVALID_ACCESS);
  }
  final Shell shell=new Shell(parent,SWT.NO_TRIM | SWT.APPLICATION_MODAL);
  final Composite composite=new Composite(shell,SWT.EMBEDDED);
  final Frame frame=SWT_AWT.new_Frame(composite);
  shell.setLocation(parent.getLocation());
  if (Platform.isGtk()) {
    shell.setSize(0,0);
    shell.setVisible(true);
    shell.setVisible(false);
  }
  shell.setSize(parent.getSize());
  shell.setLayout(new FillLayout());
  shell.layout();
  frame.addWindowListener(new WindowAdapter(){
    @Override public void windowClosed(    final WindowEvent e){
      if (!AwtEnvironment.this.display.isDisposed()) {
        ThreadingHandler.getInstance().asyncExec(AwtEnvironment.this.display,new Runnable(){
          public void run(){
            shell.dispose();
          }
        }
);
      }
    }
  }
);
  return frame;
}
 

Example 50

From project p2-browser, under directory /com.ifedorenko.p2browser/src/com/ifedorenko/p2browser/views/.

Source file: InstallableUnitView.java

  20 
vote

/** 
 * Create contents of the view part.
 * @param parent
 */
@Override public void createPartControl(Composite parent){
  Composite container=toolkit.createComposite(parent,SWT.NONE);
  toolkit.paintBordersFor(container);
  container.setLayout(new FillLayout(SWT.HORIZONTAL));
  CTabFolder tabFolder=new CTabFolder(container,SWT.BORDER | SWT.BOTTOM);
  toolkit.adapt(tabFolder);
  toolkit.paintBordersFor(tabFolder);
  tabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
  CTabItem tbtmXml=new CTabItem(tabFolder,SWT.NONE);
  tbtmXml.setText("XML");
  Composite composite=new Composite(tabFolder,SWT.NONE);
  tbtmXml.setControl(composite);
  toolkit.paintBordersFor(composite);
  composite.setLayout(new FillLayout(SWT.HORIZONTAL));
  xmlText=new Text(composite,SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL| SWT.CANCEL| SWT.MULTI);
  xmlText.setEditable(false);
  toolkit.adapt(xmlText,true,true);
  tabFolder.setSelection(tbtmXml);
  createActions();
  initializeToolBar();
  initializeMenu();
}
 

Example 51

From project rj-servi, under directory /de.walware.rj.servi.demo/src/de/walware/rj/servi/demo/.

Source file: DemoApp.java

  20 
vote

public static void main(String[] args){
  Display display=new Display();
  Shell shell=new Shell(display);
  shell.setText("(RJ) - RServi Demo/Test");
  shell.setLayout(new FillLayout());
  new DemoApp(shell);
  shell.pack();
  shell.open();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  display.dispose();
}
 

Example 52

From project sandbox, under directory /xeclipse/org.xwiki.eclipse.ui/src/main/java/org/xwiki/eclipse/ui/editors/.

Source file: PageEditor.java

  20 
vote

@Override public void createPartControl(Composite parent){
  FormToolkit toolkit=new FormToolkit(parent.getDisplay());
  form=toolkit.createForm(parent);
  toolkit.decorateFormHeading(form);
  editConflictAction=new EditConflictAction();
  GridLayoutFactory.fillDefaults().spacing(0,0).applyTo(form.getBody());
  Composite editorComposite=new Composite(form.getBody(),SWT.NONE);
  editorComposite.setLayout(new FillLayout());
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,true).applyTo(editorComposite);
  super.createPartControl(editorComposite);
  PageEditorInput pageEditorInput=(PageEditorInput)getEditorInput();
  if (pageEditorInput.isReadOnly()) {
    getSourceViewer().getTextWidget().setBackground(new Color(Display.getDefault(),248,248,248));
  }
  installCNFDrop();
  updateInfo();
}
 

Example 53

From project savara-tools-eclipse, under directory /plugins/org.savara.tools.scenario/src/main/java/org/savara/tools/scenario/designer/editor/.

Source file: AbstractEditorPage.java

  20 
vote

public final void createPartControl(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginHeight=0;
  layout.marginWidth=0;
  layout.verticalSpacing=5;
  layout.horizontalSpacing=5;
  layout.numColumns=1;
  composite.setLayout(layout);
  composite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
  composite.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND));
  createBannerControl(composite);
  composite=new Composite(composite,SWT.NONE);
  composite.setLayout(new FillLayout());
  composite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
  composite.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND));
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  createPageControl(composite);
}