Java Code Examples for org.eclipse.swt.widgets.Composite#setLayout()
The following examples show how to use
org.eclipse.swt.widgets.Composite#setLayout() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VariableDialog.java From birt with Eclipse Public License 1.0 | 6 votes |
protected Control createDialogArea( Composite parent ) { UIUtil.bindHelp( parent, IHelpContextIds.INSERT_EDIT_SORTKEY_DIALOG_ID ); Composite area = (Composite) super.createDialogArea( parent ); Composite contents = new Composite( area, SWT.NONE ); contents.setLayoutData( new GridData( GridData.FILL_BOTH ) ); contents.setLayout( new GridLayout( ) ); this.setTitle( title ); getShell( ).setText( title ); applyDialogFont( contents ); initializeDialogUnits( area ); createInputContents( contents ); Composite space = new Composite( contents, SWT.NONE ); GridData gdata = new GridData( GridData.FILL_HORIZONTAL ); gdata.heightHint = 10; space.setLayoutData( gdata ); Label lb = new Label( contents, SWT.SEPARATOR | SWT.HORIZONTAL ); lb.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); return area; }
Example 2
Source File: BonitaPreferenceDialog.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
protected Composite createRow(final Composite menuComposite, final Color backgroundColor, final String rowTitle, final int nbItems) { final Composite composite = new Composite(menuComposite, SWT.NONE); final GridLayout gl = new GridLayout(nbItems, true); gl.verticalSpacing = 0; gl.marginLeft = MARGIN_LEFT; gl.horizontalSpacing = 20; gl.marginRight = MARGIN_RIGHT; composite.setLayout(gl); composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); composite.setBackground(backgroundColor); final Label sectionTitle = new Label(composite, SWT.NONE); final GridData gd_lblGeneral = new GridData(SWT.LEFT, SWT.CENTER, false, false, nbItems, 1); gd_lblGeneral.horizontalIndent = SECTION_TITLE_MARGIN; sectionTitle.setLayoutData(gd_lblGeneral); sectionTitle.setFont(BonitaStudioFontRegistry.getPreferenceTitleFont()); sectionTitle.setText(rowTitle); sectionTitle.setBackground(backgroundColor); return composite; }
Example 3
Source File: CodeCreateDialog.java From elexis-3-core with Eclipse Public License 1.0 | 6 votes |
/** * Create contents of the dialog. * * @param parent */ @Override protected Control createDialogArea(Composite parent){ setMessage("Neuen Code anlegen"); setTitle("Codesystem: " + CodingSystem.ELEXIS_LOCAL_CODESYSTEM.getSystem()); Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(2, false)); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); Label lblCode = new Label(composite, SWT.NONE); lblCode.setText("Code"); txtCode = new Text(composite, SWT.BORDER); txtCode.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); Label lblDisplay = new Label(composite, SWT.NONE); lblDisplay.setText("Display"); txtDisplay = new Text(composite, SWT.BORDER); txtDisplay.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); return composite; }
Example 4
Source File: ParameterDialog.java From birt with Eclipse Public License 1.0 | 5 votes |
protected Control createDialogArea( Composite parent ) { setMessage( Messages.getString( "ParameterDialog.message" ) ); //$NON-NLS-1$ ScrolledComposite scrollContent = new ScrolledComposite( (Composite) super.createDialogArea( parent ), SWT.H_SCROLL | SWT.V_SCROLL ); scrollContent.setAlwaysShowScrollBars( false ); scrollContent.setExpandHorizontal( true ); scrollContent.setMinWidth( 600 ); scrollContent.setLayout( new FillLayout( ) ); scrollContent.setLayoutData( new GridData( GridData.FILL_BOTH ) ); displayArea = new Composite( scrollContent, SWT.NONE ); Composite topComposite = new Composite( displayArea, SWT.NONE ); topComposite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); topComposite.setLayout( new GridLayout( 2, false ) ); createPropertiesSection( topComposite ); createDisplayOptionsSection( topComposite ); createValuesDefineSection( displayArea ); displayArea.setLayout( new GridLayout( ) ); Point size = displayArea.computeSize( SWT.DEFAULT, SWT.DEFAULT ); displayArea.setSize( size ); scrollContent.setContent( displayArea ); UIUtil.bindHelp( parent, IHelpContextIds.PARAMETER_DIALOG_ID ); return scrollContent; }
Example 5
Source File: ViewFilterDialog.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { getShell().setText(Messages.AbstractTimeGraphView_TimeEventFilterDialogTitle); Composite container = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(3, false); layout.horizontalSpacing = 0; layout.marginHeight = 0; layout.marginWidth = 0; container.setLayout(layout); Composite labels = createCLabelsArea(container); createFilterTextArea(parent, container, labels); createCloseButton(container); // support close on escape button getShell().addListener(SWT.Traverse, e -> { if (e.detail == SWT.TRAVERSE_ESCAPE) { clearFilter(); } }); for (String label : fFilterRegexes) { createCLabels(parent, labels, label); } fControl.addControlListener(fControlListener); fControl.getShell().addControlListener(fControlListener); return parent; }
Example 6
Source File: BitwiseFlagsPicker.java From XPagesExtensionLibrary with Apache License 2.0 | 5 votes |
@Override protected void fillClientArea(Composite parent) { //create the scrolled area that will contain the checkBox container composite. ScrolledComposite scrolledParentComposite = createScrolledComposite(parent); //create the composite that will hold the checkBoxes and become the content of the scrolled composite Composite checkBoxContainerComposite = new Composite(scrolledParentComposite, SWT.NONE); // $NON-NLS-1$ checkBoxContainerComposite.setLayout(new GridLayout()); checkBoxContainerComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); checkBoxContainerComposite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); //parse the parameters to get a HashMap of value label pairs, that we use to create checkBoxes. HashMap<ComparableHexString,String> valueLabelPairs = parseParameters(); if(!valueLabelPairs.isEmpty()){ ArrayList<ComparableHexString> values = new ArrayList<ComparableHexString>(valueLabelPairs.keySet()); Collections.sort(values); Iterator<ComparableHexString> valuesIter = values.iterator(); while(valuesIter.hasNext()){ //double check that value is in fact an int that we can do bitwise operation on. ComparableHexString value = valuesIter.next(); if(value.getIntValue() > -1){ String label = valueLabelPairs.get(value); if(StringUtil.isNotEmpty(label)){ //create the checkBox that will set this bit flag and add it to our list of checkBoxes. ExtendedCustomCheckbox checkBox = createCheckBox(checkBoxContainerComposite, label, value.getHexString()); _optionCheckBoxes.add(checkBox); } } } //if there was already a value set then we need to see which checkBoxes should be checked based on that value. updateCheckboxState(); //set the checkBox container composite as the content of the scrolled composite scrolledParentComposite.setContent(checkBoxContainerComposite); scrolledParentComposite.setMinSize(checkBoxContainerComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); } }
Example 7
Source File: HierarchyWizardPageIntervals.java From arx with Apache License 2.0 | 5 votes |
@Override public void createControl(final Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(SWTUtil.createGridLayout(1, false)); editor = new HierarchyWizardEditor<T>(composite, (HierarchyWizardModelGrouping<T>) model); editor.setLayoutData(SWTUtil.createFillGridData()); setControl(composite); }
Example 8
Source File: LayoutTransformationModel.java From arx with Apache License 2.0 | 5 votes |
/** * * * @param parent * @return */ private Composite build(final Composite parent) { // Create input group Composite group = new Composite(parent, SWT.NONE); group.setLayoutData(SWTUtil.createFillGridData()); group.setLayout(new FillLayout()); folder = new ComponentTitledFolder(group, controller, null, "id-60"); //$NON-NLS-1$ // Create general tab group = folder.createItem(Resources.getMessage("CriterionDefinitionView.61"), null); //$NON-NLS-1$ group.setLayout(new FillLayout()); new ViewTransformationSettings(group, controller); // Create metrics tab Composite composite1 = folder.createItem(Resources.getMessage("CriterionDefinitionView.66"), null); //$NON-NLS-1$ composite1.setLayout(new FillLayout()); new ViewUtilityMeasures(composite1, controller); // Coding model Composite composite4 = folder.createItem(Resources.getMessage("CriterionDefinitionView.65"), null, true); //$NON-NLS-1$ composite4.setLayout(new FillLayout()); new ViewCodingModel(composite4, controller); // Attribute weights Composite composite3 = folder.createItem(Resources.getMessage("CriterionDefinitionView.63"), null, true); //$NON-NLS-1$ composite3.setLayout(new FillLayout()); new ViewAttributeWeights(composite3, controller); // Select first and finish folder.setSelection(0); return group; }
Example 9
Source File: TableAttributeTabWrapper.java From erflute with Apache License 2.0 | 5 votes |
private void createBody(Composite parent) { final Composite content = new Composite(parent, SWT.BORDER); final GridData contentGridData = new GridData(); contentGridData.horizontalAlignment = GridData.FILL; contentGridData.grabExcessHorizontalSpace = true; content.setLayoutData(contentGridData); content.setLayout(new GridLayout(6, false)); initTable(content); }
Example 10
Source File: ConfigurationFormToolkit.java From neoscada with Eclipse Public License 1.0 | 5 votes |
public Composite createStandardSection ( final Composite parent, final String sectionLabel, final boolean fillVeritcal ) { final Section section = this.toolkit.createSection ( parent, sectionLabel != null ? ExpandableComposite.TITLE_BAR : ExpandableComposite.NO_TITLE ); if ( sectionLabel != null ) { section.setText ( sectionLabel ); } final Composite client = createStandardComposite ( section ); section.setClient ( client ); client.setLayout ( new GridLayout ( 3, false ) ); section.setLayoutData ( new GridData ( GridData.FILL, GridData.BEGINNING, true, fillVeritcal ) ); return client; }
Example 11
Source File: MainProjectWizardPage.java From sarl with Apache License 2.0 | 5 votes |
@Override public void createControl(Composite parent) { initializeDialogUnits(parent); final Composite composite = new Composite(parent, SWT.NULL); composite.setFont(parent.getFont()); composite.setLayout(initGridLayout(new GridLayout(1, false), true)); composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); // create UI elements final Control nameControl = createNameControl(composite); nameControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Control locationControl = createLocationControl(composite); locationControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Control sreControl = createSRESelectionControl(composite); sreControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Control jreControl = createJRESelectionControl(composite); jreControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Control workingSetControl = createWorkingSetControl(composite); workingSetControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Control infoControl = createInfoControl(composite); infoControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); setControl(composite); this.sreGroup.initialize(); this.sreGroup.selectSpecificSRE(null); this.sreGroup.selectSystemWideSRE(); }
Example 12
Source File: PreferencesPage.java From txtUML with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createContents(Composite parent) { Composite container = new Composite(parent, SWT.NONE); container.setLayout(new FillLayout()); preferencesUI = new PreferencesUI(); preferencesUI.init(container); return container; }
Example 13
Source File: OverviewPage.java From typescript.java with MIT License | 5 votes |
private Composite createBody(Section section) { FormToolkit toolkit = super.getToolkit(); Composite body = toolkit.createComposite(section); section.setClient(body); GridLayout glayout = new GridLayout(); glayout.numColumns = 1; body.setLayout(glayout); return body; }
Example 14
Source File: TransDialog.java From pentaho-kettle with Apache License 2.0 | 4 votes |
private void addDepTab() { // //////////////////////// // START OF Dep TAB/// // / wDepTab = new CTabItem( wTabFolder, SWT.NONE ); wDepTab.setText( BaseMessages.getString( PKG, "TransDialog.DepTab.Label" ) ); FormLayout DepLayout = new FormLayout(); DepLayout.marginWidth = Const.MARGIN; DepLayout.marginHeight = Const.MARGIN; Composite wDepComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wDepComp ); wDepComp.setLayout( DepLayout ); Label wlFields = new Label( wDepComp, SWT.RIGHT ); wlFields.setText( BaseMessages.getString( PKG, "TransDialog.Fields.Label" ) ); props.setLook( wlFields ); FormData fdlFields = new FormData(); fdlFields.left = new FormAttachment( 0, 0 ); fdlFields.top = new FormAttachment( 0, 0 ); wlFields.setLayoutData( fdlFields ); final int FieldsCols = 3; final int FieldsRows = transMeta.nrDependencies(); ColumnInfo[] colinf = new ColumnInfo[FieldsCols]; colinf[0] = new ColumnInfo( BaseMessages.getString( PKG, "TransDialog.ColumnInfo.Connection.Label" ), ColumnInfo.COLUMN_TYPE_CCOMBO, connectionNames ); colinf[1] = new ColumnInfo( BaseMessages.getString( PKG, "TransDialog.ColumnInfo.Table.Label" ), ColumnInfo.COLUMN_TYPE_TEXT, false ); colinf[2] = new ColumnInfo( BaseMessages.getString( PKG, "TransDialog.ColumnInfo.Field.Label" ), ColumnInfo.COLUMN_TYPE_TEXT, false ); wFields = new TableView( transMeta, wDepComp, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, FieldsRows, lsMod, props ); wGet = new Button( wDepComp, SWT.PUSH ); wGet.setText( BaseMessages.getString( PKG, "TransDialog.GetDependenciesButton.Label" ) ); fdGet = new FormData(); fdGet.bottom = new FormAttachment( 100, 0 ); fdGet.left = new FormAttachment( 50, 0 ); wGet.setLayoutData( fdGet ); FormData fdFields = new FormData(); fdFields.left = new FormAttachment( 0, 0 ); fdFields.top = new FormAttachment( wlFields, margin ); fdFields.right = new FormAttachment( 100, 0 ); fdFields.bottom = new FormAttachment( wGet, 0 ); wFields.setLayoutData( fdFields ); FormData fdDepComp = new FormData(); fdDepComp.left = new FormAttachment( 0, 0 ); fdDepComp.top = new FormAttachment( 0, 0 ); fdDepComp.right = new FormAttachment( 100, 0 ); fdDepComp.bottom = new FormAttachment( 100, 0 ); wDepComp.setLayoutData( fdDepComp ); wDepComp.layout(); wDepTab.setControl( wDepComp ); // /////////////////////////////////////////////////////////// // / END OF DEP TAB // /////////////////////////////////////////////////////////// }
Example 15
Source File: UsersWizardPage.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
protected void setOtherGroup(final Group otherGroup) { otherGroup.setText(Messages.otherInformationGroupTitle); otherGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); otherGroup.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).create()); final Composite otherGroupComposite = new Composite(otherGroup, SWT.NONE); otherGroupComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); otherGroupComposite .setLayout(GridLayoutFactory.fillDefaults().numColumns(2).margins(5, 5).equalWidth(false).create()); createCustomUserInfoTableButtonComposite(otherGroupComposite); createCustomUserInformationTableComposite(otherGroupComposite); }
Example 16
Source File: DialogAbout.java From arx with Apache License 2.0 | 4 votes |
@Override protected Control createDialogArea(final Composite parent) { parent.setLayout(new GridLayout()); // Text final Label label = new Label(parent, SWT.CENTER | SWT.NONE); label.setText(ABOUT); label.setLayoutData(SWTUtil.createFillHorizontallyGridData()); // Folder CTabFolder folder = new CTabFolder(parent, SWT.BORDER); folder.setSimple(false); folder.setLayoutData(SWTUtil.createFillGridData()); // License CTabItem item1 = new CTabItem(folder, SWT.NULL); item1.setText("License"); //$NON-NLS-1$ final Text license = new Text(folder, SWT.NONE | SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); license.setText(LICENSE); license.setEditable(false); license.setLayoutData(SWTUtil.createFillGridData()); item1.setControl(license); // Contributors CTabItem item2 = new CTabItem(folder, SWT.NULL); item2.setText("Contributors"); //$NON-NLS-1$ final Text contributors = new Text(folder, SWT.NONE | SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); contributors.setText(CONTRIBUTORS); contributors.setEditable(false); contributors.setLayoutData(SWTUtil.createFillGridData()); item2.setControl(contributors); // Information CTabItem item3 = new CTabItem(folder, SWT.NULL); item3.setText("Links"); //$NON-NLS-1$ Composite composite3 = new Composite(folder, SWT.BORDER); composite3.setBackground(license.getBackground()); item3.setControl(composite3); composite3.setLayout(SWTUtil.createGridLayout(1, false)); createLink(composite3, "Website: <a>arx.deidentifier.org</a>", "Website", "http://arx.deidentifier.org"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ createLink(composite3, "Manual: <a>arx.deidentifier.org/anonymization-tool</a>", "Manual", "http://arx.deidentifier.org/anonymization-tool/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ createLink(composite3, "API: <a>arx.deidentifier.org/api</a>", "API", "http://arx.deidentifier.org/api"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ createLink(composite3, "Downloads: <a>arx.deidentifier.org/downloads</a>", "Downloads", "http://arx.deidentifier.org/downloads"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ createLink(composite3, "Github: <a>github.com/arx-deidentifier</a>", "Github", "https://github.com/arx-deidentifier"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return parent; }
Example 17
Source File: JobDialog.java From pentaho-kettle with Apache License 2.0 | 4 votes |
private void addParamTab() { // //////////////////////// // START OF PARAM TAB // / wParamTab = new CTabItem( wTabFolder, SWT.NONE ); wParamTab.setText( BaseMessages.getString( PKG, "JobDialog.ParamTab.Label" ) ); FormLayout paramLayout = new FormLayout(); paramLayout.marginWidth = Const.MARGIN; paramLayout.marginHeight = Const.MARGIN; Composite wParamComp = new Composite( wTabFolder, SWT.NONE ); props.setLook( wParamComp ); wParamComp.setLayout( paramLayout ); Label wlFields = new Label( wParamComp, SWT.RIGHT ); wlFields.setText( BaseMessages.getString( PKG, "JobDialog.Parameters.Label" ) ); props.setLook( wlFields ); FormData fdlFields = new FormData(); fdlFields.left = new FormAttachment( 0, 0 ); fdlFields.top = new FormAttachment( 0, 0 ); wlFields.setLayoutData( fdlFields ); final int FieldsCols = 3; final int FieldsRows = jobMeta.listParameters().length; ColumnInfo[] colinf = new ColumnInfo[FieldsCols]; colinf[0] = new ColumnInfo( BaseMessages.getString( PKG, "JobDialog.ColumnInfo.Parameter.Label" ), ColumnInfo.COLUMN_TYPE_TEXT, false ); colinf[1] = new ColumnInfo( BaseMessages.getString( PKG, "JobDialog.ColumnInfo.Default.Label" ), ColumnInfo.COLUMN_TYPE_TEXT, false ); colinf[2] = new ColumnInfo( BaseMessages.getString( PKG, "JobDialog.ColumnInfo.Description.Label" ), ColumnInfo.COLUMN_TYPE_TEXT, false ); wParamFields = new TableView( jobMeta, wParamComp, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, FieldsRows, lsMod, props ); FormData fdFields = new FormData(); fdFields.left = new FormAttachment( 0, 0 ); fdFields.top = new FormAttachment( wlFields, margin ); fdFields.right = new FormAttachment( 100, 0 ); fdFields.bottom = new FormAttachment( 100, 0 ); wParamFields.setLayoutData( fdFields ); FormData fdDepComp = new FormData(); fdDepComp.left = new FormAttachment( 0, 0 ); fdDepComp.top = new FormAttachment( 0, 0 ); fdDepComp.right = new FormAttachment( 100, 0 ); fdDepComp.bottom = new FormAttachment( 100, 0 ); wParamComp.setLayoutData( fdDepComp ); wParamComp.layout(); wParamTab.setControl( wParamComp ); // /////////////////////////////////////////////////////////// // / END OF PARAM TAB // /////////////////////////////////////////////////////////// }
Example 18
Source File: WidgetUtils.java From pentaho-kettle with Apache License 2.0 | 4 votes |
public static void setFormLayout( Composite composite, int margin ) { FormLayout formLayout = new FormLayout(); formLayout.marginWidth = margin; formLayout.marginHeight = margin; composite.setLayout( formLayout ); }
Example 19
Source File: DialTickSheet.java From birt with Eclipse Public License 1.0 | 4 votes |
protected Composite getComponent( Composite parent ) { GridLayout glContent = new GridLayout( ); glContent.numColumns = 2; glContent.marginHeight = 7; glContent.marginWidth = 7; glContent.verticalSpacing = 5; Composite cmpContent = new Composite( parent, SWT.NONE ); cmpContent.setLayout( glContent ); // Layout for the Major Grid group FillLayout flMajor = new FillLayout( ); // Layout for the Minor Grid group FillLayout flMinor = new FillLayout( ); // Major Grid Group grpMajor = new Group( cmpContent, SWT.NONE ); GridData gdGRPMajor = new GridData( GridData.FILL_HORIZONTAL ); grpMajor.setLayoutData( gdGRPMajor ); grpMajor.setText( Messages.getString( "OrthogonalSeriesDataSheetImpl.Lbl.MajorGrid" ) ); //$NON-NLS-1$ grpMajor.setLayout( flMajor ); int gridOptionalStyles = useFullMode( ) ? GridAttributesComposite.ENABLE_COLOR | GridAttributesComposite.ENABLE_STYLES | GridAttributesComposite.ENABLE_VISIBILITY : GridAttributesComposite.ENABLE_COLOR; gacMajor = new GridAttributesComposite( grpMajor, SWT.NONE, gridOptionalStyles, getContext( ), getDialForProcessing( ).getMajorGrid( ), false, defSeries.getDial( ).getMajorGrid( ) ); gacMajor.addListener( this ); // Minor Grid Group grpMinor = new Group( cmpContent, SWT.NONE ); GridData gdGRPMinor = new GridData( GridData.FILL_HORIZONTAL ); grpMinor.setLayoutData( gdGRPMinor ); grpMinor.setText( Messages.getString( "OrthogonalSeriesDataSheetImpl.Lbl.MinorGrid" ) ); //$NON-NLS-1$ grpMinor.setLayout( flMinor ); gacMinor = new GridAttributesComposite( grpMinor, SWT.NONE, gridOptionalStyles, getContext( ), getDialForProcessing( ).getMinorGrid( ), false, defSeries.getDial( ).getMinorGrid( ) ); gacMinor.addListener( this ); if (useFullMode()) { Composite cmpGridCount = new Composite( cmpContent, SWT.NONE ); { GridData gdCMPGridCount = new GridData( GridData.FILL_HORIZONTAL ); gdCMPGridCount.horizontalSpan = 2; cmpGridCount.setLayoutData( gdCMPGridCount ); cmpGridCount.setLayout( new GridLayout( 3, false ) ); } lblGridCount = new Label( cmpGridCount, SWT.NONE ); lblGridCount.setText( Messages.getString( "OrthogonalSeriesDataSheetImpl.Lbl.MinorGridCount" ) ); //$NON-NLS-1$ iscGridCount = getContext( ).getUIFactory( ) .createChartIntSpinner( cmpGridCount, SWT.NONE, getDialForProcessing( ).getScale( ) .getMinorGridsPerUnit( ), getDialForProcessing( ).getScale( ), "minorGridsPerUnit", //$NON-NLS-1$ true ); GridData gdISCGridCount = new GridData( GridData.FILL_HORIZONTAL ); iscGridCount.setLayoutData( gdISCGridCount ); iscGridCount.addListener( this ); if ( iscGridCount instanceof IntegerSpinControl ) { ( (IntegerSpinControl) iscGridCount ).addScreenreaderAccessbility( lblGridCount.getText( ) ); } } setState( !getContext( ).getUIFactory( ) .isSetInvisible( getDialForProcessing( ).getMinorGrid( ) .getTickAttributes( ) ) ); return cmpContent; }
Example 20
Source File: SmartTypingConfigurationBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 3 votes |
private void addAutopositionSection(Composite composite) { GridLayout layout= new GridLayout(); composite.setLayout(layout); String label; label= PreferencesMessages.JavaEditorPreferencePage_typing_smartSemicolon; addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_SEMICOLON, 0); label= PreferencesMessages.JavaEditorPreferencePage_typing_smartOpeningBrace; addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_OPENING_BRACE, 0); }