Java Code Examples for org.eclipse.swt.widgets.Composite.setLayout()

The following are Jave code examples for showing how to use setLayout() of the org.eclipse.swt.widgets.Composite class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: neoscada   File: AbstractChartView.java   View Source Code Vote up 6 votes
@Override
public void createPartControl ( final Composite parent )
{
    parent.setLayout ( new FillLayout () );

    this.wrapper = new Composite ( parent, SWT.NONE );
    this.wrapper.setLayout ( GridLayoutFactory.slimStack () );

    this.shell = parent.getShell ();

    PlatformUI.getWorkbench ().getHelpSystem ().setHelp ( this.wrapper, "org.eclipse.scada.ui.chart.view.chartView" ); //$NON-NLS-1$

    fillMenu ( getViewSite ().getActionBars ().getMenuManager () );
    fillToolbar ( getViewSite ().getActionBars ().getToolBarManager () );

    createChartControl ( parent );
}
 
Example 2
Project: convertigo-eclipse   File: XMLTableWizardPage.java   View Source Code Vote up 6 votes
public void createControl(Composite parent) {
	Composite container = new Composite(parent, SWT.NULL);
	GridLayout layout = new GridLayout();
	container.setLayout(layout);
	layout.numColumns = numColumns;
	layout.verticalSpacing = 10;
	
	createXPath(container);
	createInfos(container);
	createTable(container);
	//createKTable(container);
	
	fillXMLTableDescription();
	
	setControl(container);
}
 
Example 3
Project: convertigo-eclipse   File: SequenceEditorPart.java   View Source Code Vote up 6 votes
/**
 * This method initializes composite	
 *
 */
private void createComposite() {
	GridData gridData7 = new org.eclipse.swt.layout.GridData();
	gridData7.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData7.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	GridData gridData4 = new org.eclipse.swt.layout.GridData();
	gridData4.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData4.grabExcessHorizontalSpace = false;
	gridData4.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	GridLayout gridLayout4 = new GridLayout();
	gridLayout4.numColumns = 2;
	compositeOutputFooter = new Composite(compositeOutput, SWT.NONE);
	compositeOutputFooter.setBackground(new Color(Display.getCurrent(), 162, 194, 250));
	compositeOutputFooter.setLayout(gridLayout4);
	compositeOutputFooter.setLayoutData(gridData4);
}
 
Example 4
Project: neoscada   File: EventQueryView.java   View Source Code Vote up 6 votes
@Override
public void createPartControl ( final Composite parent )
{
    final GridLayout layout = new GridLayout ( 1, false );
    layout.horizontalSpacing = layout.verticalSpacing = 0;
    layout.marginHeight = layout.marginWidth = 0;

    parent.setLayout ( layout );

    this.stateLabel = new Label ( parent, SWT.NONE );
    this.stateLabel.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, false ) );

    final Composite wrapper = new Composite ( parent, SWT.NONE );
    wrapper.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );

    this.viewer = EventViewHelper.createTableViewer ( wrapper, getViewSite (), this.events );

    hookContextMenu ();
    addSelectionListener ();
}
 
Example 5
Project: ide-plugins   File: PluginsSWT.java   View Source Code Vote up 6 votes
@Override
protected Composite createViewerToolTipContentArea(Event event, ViewerCell cell, Composite parent) {
    final Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    composite.setBackground(rowColorBack);
    Plugin plugin = (Plugin) cell.getElement();

    Hyperlink button = new Hyperlink(composite, SWT.FLAT);
    button.setText("\uf05A");
    button.setFont(fontAwesome);
    button.setBackground(composite.getBackground());
    button.setForeground(rowColorTitle);
    button.setUnderlined(false);
    button.addListener (SWT.MouseDown, e -> Program.launch(GLUON_PLUGIN_URL + plugin.getUrl()));
    button.setToolTipText("Click to access the service's JavaDoc");

    Label text = new Label(composite, SWT.LEFT);
    final String description = plugin.getDescription();
    text.setText(description.contains(".") ? description.substring(0, description.indexOf(".")) : description);
    text.setBackground(composite.getBackground());
    text.setForeground(rowColorTitle);
    composite.pack();
    return composite;
}
 
Example 6
Project: scanning   File: StatusQueueView.java   View Source Code Vote up 5 votes
@Override
public void createPartControl(Composite content) {

	content.setLayout(new GridLayout(1, false));
	Util.removeMargins(content);

	this.viewer   = new TableViewer(content, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
	viewer.setUseHashlookup(true);
	viewer.getTable().setHeaderVisible(true);
	viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

	createColumns();
	viewer.setContentProvider(createContentProvider());

	try {
		queueConnection = service.createSubmitter(getUri(), getSubmissionQueueName());
		queueConnection.setStatusTopicName(getTopicName());
		updateQueue();

		String name = getSecondaryIdAttribute("partName");
		if (name!=null) setPartName(name);

		createActions();

		// We just use this submitter to read the queue
		createTopicListener(getUri());

	} catch (Exception e) {
		logger.error("Cannot listen to topic of command server!", e);
	}

	selectionProvider = new DelegatingSelectionProvider(viewer);
	getViewSite().setSelectionProvider(selectionProvider);
	viewer.addSelectionChangedListener(event -> updateSelected() );
}
 
Example 7
Project: Hydrograph   File: HivePartitionKeyValueDialog.java   View Source Code Vote up 5 votes
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {

	isAnyUpdatePerformed = false;
    getShell().setText(Constants.PARTITION_KEYS_WINDOW_TITLE);
	
	container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(1, false));
	
	SashForm outterSashForm = new SashForm(container, SWT.BORDER);
	outterSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	PartKeyComposite = new Composite(outterSashForm, SWT.NONE);
	addButtonPanel(PartKeyComposite);
	SashForm srcTgtTableSashForm = new SashForm(PartKeyComposite, SWT.NONE);
	srcTgtTableSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	createSourceTable(srcTgtTableSashForm);
	createTargetTable(srcTgtTableSashForm);
	
	partkeyValueComposite = new Composite(outterSashForm, SWT.NONE);
	createKeyValueComposite(partkeyValueComposite);
	
	outterSashForm.setWeights(new int[] {451, 176});
	
	checkTargetFieldsSequence();
	
	getShell().setMinimumSize(400,500);
	return container;
}
 
Example 8
Project: convertigo-eclipse   File: KTable.java   View Source Code Vote up 5 votes
public static void main(String[] args) {
  // create a shell...
  Display display = new Display();
  Shell shell = new Shell(display);
  shell.setLayout(new FillLayout());
  shell.setText("KTable examples");

  // put a tab folder in it...
  TabFolder tabFolder = new TabFolder(shell, SWT.NONE);

  // Item 1: a Text Table
  TabItem item1 = new TabItem(tabFolder, SWT.NONE);
  item1.setText("Text Table");
  Composite comp1 = new Composite(tabFolder, SWT.NONE);
  item1.setControl(comp1);
  comp1.setLayout(new FillLayout());

  // put a table in tabItem1...
  KTable table = new KTable(comp1, SWT.V_SCROLL | SWT.H_SCROLL);
  table.setRowSelectionMode(true);
  //table.setMultiSelectionMode(true);
  table.setModel(new KTableModelExample());

  // display the shell...
  shell.setSize(600, 600);
  shell.open();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch())
      display.sleep();
  }
  display.dispose();
}
 
Example 9
Project: SimQRI   File: DiracDeltaPropertiesEditionPartForm.java   View Source Code Vote up 5 votes
/**
 * 
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
	Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
	propertiesSection.setText(MetamodelMessages.DiracDeltaPropertiesEditionPart_PropertiesGroupLabel);
	GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
	propertiesSectionData.horizontalSpan = 3;
	propertiesSection.setLayoutData(propertiesSectionData);
	Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
	GridLayout propertiesGroupLayout = new GridLayout();
	propertiesGroupLayout.numColumns = 3;
	propertiesGroup.setLayout(propertiesGroupLayout);
	propertiesSection.setClient(propertiesGroup);
	return propertiesGroup;
}
 
Example 10
Project: time4sys   File: AnalyzedSystemPropertiesEditionPartImpl.java   View Source Code Vote up 5 votes
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
 * 			createFigure(org.eclipse.swt.widgets.Composite)
 * @generated
 */
public Composite createFigure(final Composite parent) {
	view = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(view);
	return view;
}
 
Example 11
Project: SimQRI   File: GeometricPropertiesEditionPartImpl.java   View Source Code Vote up 5 votes
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
 * 			createFigure(org.eclipse.swt.widgets.Composite)
 * 
 */
public Composite createFigure(final Composite parent) {
	view = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(view);
	return view;
}
 
Example 12
Project: neoscada   File: DataItemDetailsDialog.java   View Source Code Vote up 5 votes
@Override
protected Control createDialogArea ( final Composite parent )
{
    final Composite composite = (Composite)super.createDialogArea ( parent );
    getShell ().setMinimumSize ( 100, 360 );
    composite.setLayout ( new FillLayout () );
    this.view = new DetailsViewComposite ( composite, SWT.NONE );
    this.view.setDataItem ( this.item );

    return composite;
}
 
Example 13
Project: time4sys   File: GeneralPropertiesEditionPartForm.java   View Source Code Vote up 5 votes
/**
 * 
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
	Section propertiesSection = widgetFactory.createSection(parent,
			Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
	propertiesSection.setText(HrmMessages.GeneralPropertiesEditionPart_PropertiesGroupLabel);
	GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
	propertiesSectionData.horizontalSpan = 3;
	propertiesSection.setLayoutData(propertiesSectionData);
	Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
	GridLayout propertiesGroupLayout = new GridLayout();
	propertiesGroupLayout.numColumns = 3;
	propertiesGroup.setLayout(propertiesGroupLayout);
	propertiesSection.setClient(propertiesGroup);
	return propertiesGroup;
}
 
Example 14
Project: Hydrograph   File: JoinMapDialog.java   View Source Code Vote up 4 votes
private void createInputFieldExpandBarSection(Composite composite) {
	Composite composite_1 = new Composite(composite, SWT.NONE);
	GridLayout gl_composite_1 = new GridLayout(1, false);
	gl_composite_1.horizontalSpacing = 0;
	gl_composite_1.verticalSpacing = 0;
	gl_composite_1.marginWidth = 0;
	gl_composite_1.marginHeight = 0;
	composite_1.setLayout(gl_composite_1);
	GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, false, true,
			1, 1);
	gd_composite_1.widthHint = 276;
	composite_1.setLayoutData(gd_composite_1);
	composite_1.setBounds(0, 0, 64, 64);

	final ScrolledComposite scrolledComposite_1 = new ScrolledComposite(
			composite_1, SWT.BORDER | SWT.V_SCROLL );
	scrolledComposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
			true, true, 1, 1));
	scrolledComposite_1.setExpandHorizontal(true);
	scrolledComposite_1.setExpandVertical(true);
	
	Composite composite_7 = new Composite(scrolledComposite_1, SWT.NONE);
	composite_7.setLayout(new GridLayout(1, false));

	final ExpandBar expandBar = new ExpandBar(composite_7, SWT.H_SCROLL);
	expandBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,
			1));
	
	expandBar.setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 240, 240, 240));
	populateInputFieldExpandBarSection(expandBar);

	expandBar.getItem(0).setExpanded(true);

	scrolledComposite_1.setContent(composite_7);
	scrolledComposite_1.setMinSize(composite_7.computeSize(SWT.DEFAULT,
			SWT.DEFAULT));
	
	
	composite_7.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			
			for(ExpandItem expandItem:expandBar.getItems()){
				((TableColumn)expandItem.getData("TableColumn")).setWidth(scrolledComposite_1.getSize().x);
			}
		}
	});
}
 
Example 15
Project: vertigo-chroma-kspplugin   File: AboutDialog.java   View Source Code Vote up 4 votes
@Override
protected Control createDialogArea(Composite parent) {
	/* Titre dialogue. */
	this.getShell().setText("About KSP Plugin");

	/* Layout */
	Composite container = (Composite) super.createDialogArea(parent);
	GridLayout layout = new GridLayout(1, false);
	layout.marginRight = 5;
	layout.marginLeft = 10;
	Color white = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);
	container.setBackground(white);
	container.setLayout(layout);

	/* Logo */
	Label lblLogo = new Label(container, SWT.NONE);
	lblLogo.setBackgroundImage(getImage());
	lblLogo.setBackground(white);
	lblLogo.setText("      ");
	lblLogo.setSize(LOGO_SIZE, LOGO_SIZE);

	/* Produit */
	Label lblProduct = new Label(container, SWT.NONE);
	lblProduct.setText("Vertigo Chroma KSP Plugin");
	lblProduct.setBackground(white);

	/* Version */
	Version version = FrameworkUtil.getBundle(getClass()).getVersion();
	String fullVersion = version.toString();
	Label lblVersion = new Label(container, SWT.NONE);
	lblVersion.setText("Version : " + fullVersion);
	lblVersion.setBackground(white);

	/* Version */
	Label lblAuthor = new Label(container, SWT.NONE);
	lblAuthor.setText("Author : @sebez");
	lblAuthor.setBackground(white);

	/* Libellé documentation */
	Label lblDoc = new Label(container, SWT.NONE);
	lblDoc.setText("Documentation, sources, releases are published in the KSP plugin github repository : ");
	lblDoc.setBackground(white);

	/* Lien vers le github */
	Link link = new Link(container, SWT.NONE);
	String message = "<a href=\"" + GITHUB_URL + "\">" + GITHUB_URL + "</a>";
	link.setText(message);
	link.setBackground(white);
	link.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			Program.launch(GITHUB_URL);
		}
	});

	return container;
}
 
Example 16
Project: Hydrograph   File: LookupMapDialog.java   View Source Code Vote up 4 votes
private void createButtonSectionInFieldMappingSection(Composite composite) {

		Composite mappingHeaderComposite = new Composite(composite, SWT.NONE);
		mappingHeaderComposite.setTouchEnabled(true);
		mappingHeaderComposite.setLayout(new GridLayout(2, false));
		GridData gd_mappingHeaderComposite = new GridData(SWT.FILL, SWT.CENTER, true,
				false, 1, 1);
		gd_mappingHeaderComposite.heightHint = 40;
		mappingHeaderComposite.setLayoutData(gd_mappingHeaderComposite);

		Composite outputMappingComposite = new Composite(mappingHeaderComposite, SWT.NONE);
		GridLayout gl_outputMappingComposite = new GridLayout(1, false);
		gl_outputMappingComposite.verticalSpacing = 0;
		gl_outputMappingComposite.marginWidth = 0;
		gl_outputMappingComposite.marginHeight = 0;
		outputMappingComposite.setLayout(gl_outputMappingComposite);
		outputMappingComposite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true,
				true, 1, 1));

		Label lblMappingView = new Label(outputMappingComposite, SWT.NONE);
		lblMappingView.setText("Output Mapping");

		Composite outputMappingButtonsComposite = new Composite(mappingHeaderComposite, SWT.NONE);
		GridLayout gl_outputMappingButtonsComposite = new GridLayout(5, false);
		gl_outputMappingButtonsComposite.verticalSpacing = 0;
		gl_outputMappingButtonsComposite.marginWidth = 0;
		gl_outputMappingButtonsComposite.marginHeight = 0;
		outputMappingButtonsComposite.setLayout(gl_outputMappingButtonsComposite);
		outputMappingButtonsComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true,
				true, 1, 1));
		
		createPullButton(outputMappingButtonsComposite);

		createAddButton(outputMappingButtonsComposite);

		createDeleteButton(outputMappingButtonsComposite);

		createUpButton(outputMappingButtonsComposite);

		createDownButton(outputMappingButtonsComposite);
	}
 
Example 17
Project: AppleCommander   File: DiskImageSizePane.java   View Source Code Vote up 4 votes
/**
 * Create the wizard pane.
 * @see com.webcodepro.applecommander.ui.swt.wizard.WizardPane#open()
 */
public void open() {
	control = new Composite(parent, SWT.NULL);
	wizard.enableNextButton(true);
	wizard.enableFinishButton(false);
	RowLayout layout = new RowLayout(SWT.VERTICAL);
	layout.justify = true;
	layout.marginBottom = 5;
	layout.marginLeft = 5;
	layout.marginRight = 5;
	layout.marginTop = 5;
	layout.spacing = 3;
	control.setLayout(layout);
	Label label = new Label(control, SWT.WRAP);
	label.setText(
		textBundle.get("DiskImageSizePrompt")); //$NON-NLS-1$
	RowLayout subpanelLayout = new RowLayout(SWT.VERTICAL);
	subpanelLayout.justify = true;
	subpanelLayout.spacing = 3;
	Composite buttonSubpanel = new Composite(control, SWT.NULL);
	buttonSubpanel.setLayout(subpanelLayout);
	createRadioButton(buttonSubpanel, textBundle.get("DiskImageSize140Kb"),  //$NON-NLS-1$
		Disk.APPLE_140KB_DISK,
		textBundle.get("DiskImageSize140KbText")); //$NON-NLS-1$
	createRadioButton(buttonSubpanel, textBundle.get("DiskImageSize800Kb"),  //$NON-NLS-1$
		Disk.APPLE_800KB_2IMG_DISK,
		textBundle.get("DiskImageSize800KbText")); //$NON-NLS-1$
	if (wizard.getFormat() == DiskImageWizard.FORMAT_PRODOS) {
		createRadioButton(buttonSubpanel, textBundle.get("DiskImageSize5Mb"),  //$NON-NLS-1$
			Disk.APPLE_5MB_HARDDISK,
			textBundle.get("DiskImageSize5MbText")); //$NON-NLS-1$
		createRadioButton(buttonSubpanel, textBundle.get("DiskImageSize10Mb"),  //$NON-NLS-1$
			Disk.APPLE_10MB_HARDDISK,
			textBundle.get("DiskImageSize10MbText")); //$NON-NLS-1$
		createRadioButton(buttonSubpanel, textBundle.get("DiskImageSize20Mb"),  //$NON-NLS-1$
			Disk.APPLE_20MB_HARDDISK,
			textBundle.get("DiskImageSize20MbText")); //$NON-NLS-1$
		createRadioButton(buttonSubpanel, textBundle.get("DiskImageSize32Mb"),  //$NON-NLS-1$
			Disk.APPLE_32MB_HARDDISK, 
			textBundle.get("DiskImageSize32MbText")); //$NON-NLS-1$
	}
}
 
Example 18
Project: AppleCommander   File: DiskImageFormatPane.java   View Source Code Vote up 4 votes
/**
 * Create and display the wizard pane.
 */
public void open() {
	control = new Composite(parent, SWT.NULL);
	wizard.enableNextButton(true);
	wizard.enableFinishButton(false);
	RowLayout layout = new RowLayout(SWT.VERTICAL);
	layout.justify = true;
	layout.marginBottom = 5;
	layout.marginLeft = 5;
	layout.marginRight = 5;
	layout.marginTop = 5;
	layout.spacing = 3;
	control.setLayout(layout);
	Label label = new Label(control, SWT.WRAP);
	label.setText(
		textBundle.get("DiskImageFormatPrompt")); //$NON-NLS-1$
	RowLayout subpanelLayout = new RowLayout(SWT.VERTICAL);
	subpanelLayout.justify = true;
	subpanelLayout.spacing = 3;
	Composite buttonSubpanel = new Composite(control, SWT.NULL);
	buttonSubpanel.setLayout(subpanelLayout);
	createRadioButton(buttonSubpanel, textBundle.get("Dos"),  //$NON-NLS-1$
		DiskImageWizard.FORMAT_DOS33,
		textBundle.get("DiskImageFormatDosTooltip")); //$NON-NLS-1$
	createRadioButton(buttonSubpanel, textBundle.get("Unidos"),  //$NON-NLS-1$
		DiskImageWizard.FORMAT_UNIDOS,
		textBundle.get("DiskImageFormatUnidosTooltip")); //$NON-NLS-1$
	createRadioButton(buttonSubpanel, textBundle.get("Ozdos"),  //$NON-NLS-1$
		DiskImageWizard.FORMAT_OZDOS, 
		textBundle.get("DiskImageFormatOzdosTooltip")); //$NON-NLS-1$
	createRadioButton(buttonSubpanel, textBundle.get("Prodos"),  //$NON-NLS-1$
		DiskImageWizard.FORMAT_PRODOS, 
		textBundle.get("DiskImageFormatProdosTooltip")); //$NON-NLS-1$
	createRadioButton(buttonSubpanel, textBundle.get("Pascal"),  //$NON-NLS-1$
		DiskImageWizard.FORMAT_PASCAL, 
		textBundle.get("DiskImageFormatPascalTooltip")); //$NON-NLS-1$
	createRadioButton(buttonSubpanel, textBundle.get("Rdos"),  //$NON-NLS-1$
		DiskImageWizard.FORMAT_RDOS, 
		textBundle.get("DiskImageFormatRdosTooltip")); //$NON-NLS-1$
	createRadioButton(buttonSubpanel, textBundle.get("Cpm"),  //$NON-NLS-1$
		DiskImageWizard.FORMAT_CPM, 
		textBundle.get("DiskImageFormatCpmTooltip")); //$NON-NLS-1$
	control.pack();
}
 
Example 19
Project: gw4e.project   File: GeneratorChoiceComposite.java   View Source Code Vote up 4 votes
private void createExtendMode() {
	btnExtendRadioButton = new Button(this, SWT.RADIO);
	btnExtendRadioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	btnExtendRadioButton.setText(MessageUtil.getString("extending_class"));
	btnExtendRadioButton.setSelection(false);
	btnExtendRadioButton.addListener(SWT.Selection, new Listener() {
		public void handleEvent(Event e) {
			switch (e.type) {
			case SWT.Selection:
				updateUI();
				break;
			}
		}
	});
	btnExtendRadioButton.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_EXTEND_CHECKBOX);

	Composite composite = new Composite(this, SWT.NONE);
	composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	composite.setLayout(new GridLayout(12, false));

	lblExtendedLabel = new Label(composite, SWT.NONE);
	lblExtendedLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblExtendedLabel.setText(MessageUtil.getString("class_extended"));
	lblExtendedLabel.setEnabled(false);

	comboExtendedClassnameViewer = new AncestorViewer(composite);
	comboExtendedClassnameViewer.initialize(GW4E_CONVERSION_COMBO_ANCESTOR_EXTEND_TEST, false);
	comboExtendedClassnameViewer.getCombo().setData(GW4E_CONVERSION_WIDGET_ID, GW4E_CONVERSION_COMBO_ANCESTOR_EXTEND_TEST);
	
	Combo combo = comboExtendedClassnameViewer.getCombo();
	combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	combo.setEnabled(false);

	lblExtendingLabel = new Label(composite, SWT.NONE);
	lblExtendingLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblExtendingLabel.setText(MessageUtil.getString("classname"));
	lblExtendingLabel.setEnabled(false);

	extendingClassnameText = new Text(composite, SWT.BORDER);
	extendingClassnameText.setEnabled(false);
	extendingClassnameText.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent event) {
			listener.handleEvent(null);
		}
	});
	extendingClassnameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	extendingClassnameText.setEnabled(false);
	extendingClassnameText.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_EXTEND_CLASS_TEXT);
}
 
Example 20
Project: BiglyBT   File: SBC_DashboardView.java   View Source Code Vote up 3 votes
@Override
public Object skinObjectInitialShow(SWTSkinObject skinObject, Object params) {

	SWTSkinObject so_area = getSkinObject("dashboard-area");

	dashboard_composite = (Composite)so_area.getControl();
	
	dashboard_composite.setLayout( new FormLayout());
	
	MainMDISetup.getSb_dashboard().addListener( this );
	
	return( null );
}