List of usage examples for org.eclipse.jface.util BidiUtils applyBidiProcessing
public static void applyBidiProcessing(Combo combo, String handlingType)
From source file:com.mywork.eclipse.base.MyWizardNewProjectCreationPage.java
License:Open Source License
/** * Creates the project name specification controls. * * @param parent the parent composite// ww w. j a v a2s . c o m */ private final void createProjectNameGroup(Composite parent) { // project specification group Composite projectGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; projectGroup.setLayout(layout); projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // new project label Label projectLabel = new Label(projectGroup, SWT.NONE); projectLabel.setText("&Project name"); projectLabel.setFont(parent.getFont()); // new project name entry field projectNameField = new Text(projectGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; projectNameField.setLayoutData(data); projectNameField.setFont(parent.getFont()); // new template label Label authorLabel = new Label(projectGroup, SWT.NONE); authorLabel.setText("author"); authorLabel.setFont(parent.getFont()); // new template entry field authorField = new Text(projectGroup, SWT.BORDER); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; authorField.setLayoutData(data); authorField.setFont(parent.getFont()); // Set the initial value first before listener // to avoid handling an event during the creation. if (initialProjectFieldValue != null) { projectNameField.setText(initialProjectFieldValue); } projectNameField.addListener(SWT.Modify, nameModifyListener); BidiUtils.applyBidiProcessing(projectNameField, BidiUtils.BTD_DEFAULT); }
From source file:com.sas.seleniumplus.projects.AdvanceProjectPageWizard.java
License:Open Source License
/** * Creates the project name specification controls. * * @param parent the parent composite//from ww w . j av a 2 s . co m */ private final void createProjectNameGroup(Composite parent) { // project specification group Composite projectGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; projectGroup.setLayout(layout); projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // new project label Label projectLabel = new Label(projectGroup, SWT.NONE); projectLabel.setText(IDEWorkbenchMessages.WizardNewProjectCreationPage_nameLabel); projectLabel.setFont(parent.getFont()); // new project name entry field projectNameField = new Text(projectGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; projectNameField.setLayoutData(data); projectNameField.setFont(parent.getFont()); // new company initial label projectLabel = new Label(projectGroup, SWT.NONE); projectLabel.setText(lblCompanyInitial); projectLabel.setFont(parent.getFont()); // new company name entry field companyInitialField = new Text(projectGroup, SWT.BORDER); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; companyInitialField.setLayoutData(data); companyInitialField.setFont(parent.getFont()); // Set the initial value first before listener // to avoid handling an event during the creation. if (initialProjectFieldValue != null) { projectNameField.setText(initialProjectFieldValue); } projectNameField.addListener(SWT.Modify, nameModifyListener); BidiUtils.applyBidiProcessing(projectNameField, BidiUtils.BTD_DEFAULT); // Set the initial value first before listener // to avoid handling an event during the creation. if (companyInitialField != null) { companyInitialField.setText(initialCompanyInitialFieldValue); } companyInitialField.addListener(SWT.Modify, nameModifyListener); BidiUtils.applyBidiProcessing(companyInitialField, BidiUtils.BTD_DEFAULT); }
From source file:com.sas.seleniumplus.projects.SeleniumProjectPageWizard.java
License:Open Source License
/** * Creates the project name specification controls. * * @param parent the parent composite/*from ww w .j a v a 2 s .c om*/ */ private final void createProjectNameGroup(Composite parent) { // project specification group Composite projectGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; projectGroup.setLayout(layout); projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // new project label Label projectLabel = new Label(projectGroup, SWT.NONE); projectLabel.setText(IDEWorkbenchMessages.WizardNewProjectCreationPage_nameLabel); projectLabel.setFont(parent.getFont()); // new project name entry field projectNameField = new Text(projectGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; projectNameField.setLayoutData(data); projectNameField.setFont(parent.getFont()); // Set the initial value first before listener // to avoid handling an event during the creation. if (initialProjectFieldValue != null) { projectNameField.setText(initialProjectFieldValue); } projectNameField.addListener(SWT.Modify, nameModifyListener); BidiUtils.applyBidiProcessing(projectNameField, BidiUtils.BTD_DEFAULT); }
From source file:eu.ddmore.mdl.ui.wizard.PharmMLExportWizardPage.java
License:Open Source License
@Override protected void createDestinationGroup(Composite parent) { Font font = parent.getFont(); // destination specification group Composite destinationSelectionGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3;// w w w . j a v a2 s.co m destinationSelectionGroup.setLayout(layout); destinationSelectionGroup .setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL)); destinationSelectionGroup.setFont(font); Label destinationLabel = new Label(destinationSelectionGroup, SWT.NONE); destinationLabel.setText(getDestinationLabel()); destinationLabel.setFont(font); // destination name entry field destinationNameField = new Combo(destinationSelectionGroup, SWT.SINGLE | SWT.BORDER); destinationNameField.addListener(SWT.Modify, this); destinationNameField.addListener(SWT.Selection, this); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; destinationNameField.setLayoutData(data); destinationNameField.setFont(font); BidiUtils.applyBidiProcessing(destinationNameField, StructuredTextTypeHandlerFactory.FILE); // destination browse button destinationBrowseButton = new Button(destinationSelectionGroup, SWT.PUSH); destinationBrowseButton.setText("Open"); destinationBrowseButton.addListener(SWT.Selection, this); destinationBrowseButton.setFont(font); setButtonLayoutData(destinationBrowseButton); new Label(parent, SWT.NONE); // vertical spacer }
From source file:eu.numberfour.n4js.npmexporter.ui.ExportSelectionPage.java
License:Open Source License
/** * Create the export destination specification widgets * * @param parent/*from w w w .jav a 2 s . c om*/ * org.eclipse.swt.widgets.Composite */ @SuppressWarnings("unused") @Override protected void createDestinationGroup(Composite parent) { Font font = parent.getFont(); // destination specification group Composite destinationSelectionGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; destinationSelectionGroup.setLayout(layout); destinationSelectionGroup .setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL)); destinationSelectionGroup.setFont(font); Label destinationLabel = new Label(destinationSelectionGroup, SWT.NONE); destinationLabel.setText("npm Target Folder"); destinationLabel.setFont(font); // destination name entry field destinationNameField = new Combo(destinationSelectionGroup, SWT.SINGLE | SWT.BORDER); destinationNameField.addListener(SWT.Modify, this); destinationNameField.addListener(SWT.Selection, this); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; destinationNameField.setLayoutData(data); destinationNameField.setFont(font); BidiUtils.applyBidiProcessing(destinationNameField, StructuredTextTypeHandlerFactory.FILE); // destination browse button destinationBrowseButton = new Button(destinationSelectionGroup, SWT.PUSH); destinationBrowseButton.setText(DataTransferMessages.DataTransfer_browse); destinationBrowseButton.addListener(SWT.Selection, this); destinationBrowseButton.setFont(font); setButtonLayoutData(destinationBrowseButton); new Label(parent, SWT.NONE); // vertical spacer }
From source file:org.dslforge.ace.generator.ui.wizard.NewWebEditorWizardPage.java
License:Open Source License
private final void createLanguageGroup(Composite parent) { Group group = new Group(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;// w w w .ja v a 2s . co m group.setLayout(layout); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group.setText("Language Specification"); // new language label Label projectLabel = new Label(group, SWT.NONE); projectLabel.setText("&Name:"); projectLabel.setFont(parent.getFont()); // new language name entry field languageNameField = new Text(group, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; languageNameField.setLayoutData(data); languageNameField.setFont(parent.getFont()); if (initialLanguageFieldValue != null) { languageNameField.setText(initialLanguageFieldValue); } languageNameField.addModifyListener(languageNameModifyListener); BidiUtils.applyBidiProcessing(languageNameField, BidiUtils.BTD_DEFAULT); // new grammar path label Label grammarPathLabel = new Label(group, SWT.NONE); grammarPathLabel.setText("&ANTLR file:"); grammarPathLabel.setFont(parent.getFont()); // new grammar path entry field grammarPathField = new Text(group, SWT.BORDER); GridData pathData = new GridData(GridData.FILL_HORIZONTAL); pathData.widthHint = SIZING_TEXT_FIELD_WIDTH; grammarPathField.setLayoutData(pathData); grammarPathField.setFont(parent.getFont()); grammarPathField.setEditable(false); if (grammarPathField != null) { grammarPathField.setText(initialGrammarPathFieldValue); } BidiUtils.applyBidiProcessing(grammarPathField, BidiUtils.BTD_DEFAULT); }
From source file:org.dslforge.xtext.generator.ui.wizard.NewWebEditorFromXtextWizardPage.java
License:Open Source License
protected void createProjectNameGroup(Composite parent) { Composite projectGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;// w w w . ja v a2 s. c o m projectGroup.setLayout(layout); projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // new project field Label projectLabel = new Label(projectGroup, SWT.NONE); projectLabel.setText(IDEWorkbenchMessages.WizardNewProjectCreationPage_nameLabel); projectLabel.setFont(parent.getFont()); projectNameField = new Text(projectGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; projectNameField.setLayoutData(data); projectNameField.setFont(parent.getFont()); if (initialProjectFieldValue != null) { projectNameField.setText(initialProjectFieldValue); } projectNameField.addModifyListener(projectNameModifyListener); BidiUtils.applyBidiProcessing(projectNameField, BidiUtils.BTD_DEFAULT); }
From source file:org.dslforge.xtext.generator.ui.wizard.NewWebEditorFromXtextWizardPage.java
License:Open Source License
protected void createLanguageGroup(Composite parent) { Group group = new Group(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;/*from w ww . j ava2 s. c om*/ group.setLayout(layout); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group.setText("ANTLR Specification"); // new grammar field Label xtextGrammarLabel = new Label(group, SWT.NONE); xtextGrammarLabel.setLayoutData(new GridData(160, SWT.DEFAULT)); xtextGrammarLabel.setText("&Grammar file:"); grammarPathField = new Text(group, SWT.BORDER); GridData layoutData = new GridData(GridData.FILL_HORIZONTAL); layoutData.grabExcessHorizontalSpace = true; grammarPathField.setLayoutData(layoutData); grammarPathField.setFont(parent.getFont()); grammarPathField.setEnabled(false); if (descriptor != null) grammarPathField.setText(descriptor.getGrammar().getFullPath().toString()); // new language field Label projectLabel = new Label(group, SWT.NONE); projectLabel.setText("&Grammar name:"); projectLabel.setFont(parent.getFont()); languageNameField = new Text(group, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; languageNameField.setLayoutData(data); languageNameField.setFont(parent.getFont()); if (descriptor != null) languageNameField.setText(descriptor.getGrammar().getName()); BidiUtils.applyBidiProcessing(languageNameField, BidiUtils.BTD_DEFAULT); //Target Platform Label targetLabel = new Label(group, SWT.NONE); targetLabel.setText("&RAP Target:"); targetLabel.setFont(parent.getFont()); generateTarget = new Button(group, SWT.CHECK); generateTarget.setSelection(true); generateTarget.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { descriptor.setOption(IWebProjectDescriptor.TARGET_PLATFORM, new Boolean(generateTarget.getSelection())); } @Override public void widgetDefaultSelected(SelectionEvent e) { descriptor.setOption(IWebProjectDescriptor.TARGET_PLATFORM, new Boolean(true)); } }); //Packaging Projct Label buildLabel = new Label(group, SWT.NONE); buildLabel.setText("&WAR Build:"); buildLabel.setFont(parent.getFont()); generateBuild = new Button(group, SWT.CHECK); generateBuild.setSelection(true); generateBuild.addSelectionListener(new SelectionListener() { @Override public void widgetSelected(SelectionEvent e) { descriptor.setOption(IWebProjectDescriptor.BUILD_PROJECT, new Boolean(generateBuild.getSelection())); } @Override public void widgetDefaultSelected(SelectionEvent e) { descriptor.setOption(IWebProjectDescriptor.BUILD_PROJECT, new Boolean(true)); } }); }
From source file:org.dslforge.xtext.generator.ui.wizard.XtextGrammarImportPage.java
License:Open Source License
/** * Creates the language name specification controls. * * @param parent/*from w w w . j a v a 2s. c o m*/ * the parent composite */ private final void createLanguageGroup(Composite parent) { Group group = new Group(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; group.setLayout(layout); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group.setText("Language Specification"); //Label Label xtextGrammarLabel = new Label(group, SWT.NONE); xtextGrammarLabel.setLayoutData(new GridData(160, SWT.DEFAULT)); xtextGrammarLabel.setText("&Xtext grammar:"); //Text grammarPathField = new Text(group, SWT.BORDER); GridData layoutData = new GridData(GridData.FILL_HORIZONTAL); layoutData.grabExcessHorizontalSpace = true; grammarPathField.setLayoutData(layoutData); grammarPathField.setEditable(false); // Button browseWorkspace = new Button(group, SWT.PUSH); browseWorkspace.setText("&Browse..."); setButtonLayoutData(browseWorkspace); browseWorkspace.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleBrowseFileSystem(); } }); //Label Label languageLabel = new Label(group, SWT.NONE); languageLabel.setLayoutData(new GridData(160, SWT.DEFAULT)); languageLabel.setText("&Short Name:"); languageLabel.setFont(parent.getFont()); //Text grammarNameField = new Text(group, SWT.BORDER); GridData languageData = new GridData(GridData.FILL_HORIZONTAL); languageData.widthHint = SIZING_TEXT_FIELD_WIDTH; grammarNameField.setLayoutData(languageData); languageData.grabExcessHorizontalSpace = true; languageData.horizontalSpan = 2; grammarNameField.setFont(parent.getFont()); grammarNameField.setText(""); grammarNameField.setEditable(false); BidiUtils.applyBidiProcessing(grammarNameField, BidiUtils.BTD_DEFAULT); //Label Label projectLabel = new Label(group, SWT.NONE); projectLabel.setLayoutData(new GridData(160, SWT.DEFAULT)); projectLabel.setText("&Runtime Project:"); projectLabel.setFont(parent.getFont()); //Text runtimeProjectNameField = new Text(group, SWT.BORDER); GridData projectData = new GridData(GridData.FILL_HORIZONTAL); projectData.widthHint = SIZING_TEXT_FIELD_WIDTH; projectData.grabExcessHorizontalSpace = true; projectData.horizontalSpan = 2; runtimeProjectNameField.setLayoutData(projectData); runtimeProjectNameField.setFont(parent.getFont()); runtimeProjectNameField.setEditable(false); BidiUtils.applyBidiProcessing(runtimeProjectNameField, BidiUtils.BTD_DEFAULT); //Label Label entryRuleLabel = new Label(group, SWT.NONE); entryRuleLabel.setLayoutData(new GridData(160, SWT.DEFAULT)); entryRuleLabel.setText("&Entry rule:"); entryRuleLabel.setFont(parent.getFont()); //Text entryRuleNameField = new Text(group, SWT.BORDER); GridData entryRuleData = new GridData(GridData.FILL_HORIZONTAL); entryRuleData.widthHint = SIZING_TEXT_FIELD_WIDTH; entryRuleData.grabExcessHorizontalSpace = true; entryRuleData.horizontalSpan = 2; entryRuleNameField.setLayoutData(entryRuleData); entryRuleNameField.setFont(parent.getFont()); entryRuleNameField.setText(""); entryRuleNameField.setEditable(false); BidiUtils.applyBidiProcessing(entryRuleNameField, BidiUtils.BTD_DEFAULT); }
From source file:org.eclipse.gemoc.execution.concurrent.ccsljavaxdsml.ui.wizards.pages.AskMoCInfoWizardPage.java
License:Open Source License
/** * @param parent the parent composite//from www. j a va 2s .c o m */ private final void createTemplateMoCFileGroup(Composite parent) { // project specification group Composite templateMoCFileGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; templateMoCFileGroup.setLayout(layout); templateMoCFileGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // root container label Label label = new Label(templateMoCFileGroup, SWT.NONE); label.setText("new MoCC file base name"); label.setFont(parent.getFont()); // new project name entry field templateMoCFileField = new Text(templateMoCFileGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = SIZING_TEXT_FIELD_WIDTH; templateMoCFileField.setLayoutData(data); templateMoCFileField.setFont(parent.getFont()); // Set the initial value first before listener // to avoid handling an event during the creation. if (initialTemplateMoCFileFieldValue != null) { templateMoCFileField.setText(initialTemplateMoCFileFieldValue); } templateMoCFileField.addListener(SWT.Modify, genericModifyListener); BidiUtils.applyBidiProcessing(templateMoCFileField, BidiUtils.BTD_DEFAULT); }