org.eclipse.swt.widgets.Label Java Examples
The following examples show how to use
org.eclipse.swt.widgets.Label.
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: XLIFFEditorStatusLineItemWithProgressBar.java From tmxeditor8 with GNU General Public License v2.0 | 6 votes |
public void fill(Composite parent) { super.fill(parent); Composite container = new Composite(parent, SWT.NONE); GridLayout gl = new GridLayout(2, false); gl.marginWidth = 5; gl.marginHeight = 3; container.setLayout(gl); progressBar = new ProgressBar(container, SWT.SMOOTH); GridData gdPprogressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); gdPprogressBar.heightHint = 16; gdPprogressBar.widthHint = 130; progressBar.setLayoutData(gdPprogressBar); progressBar.setMinimum(0); // 最小值 progressBar.setMaximum(100);// 最大值 progressBar.setSelection(progressValue); progressBar.setToolTipText(defaultMessage); label = new Label(container, SWT.None); label.setText(progressValue + "%"); StatusLineLayoutData data = new StatusLineLayoutData(); container.setLayoutData(data); }
Example #2
Source File: ChartManager.java From neoscada with Eclipse Public License 1.0 | 6 votes |
public ChartManager ( final Composite parent, final int style ) { super ( parent, style ); setLayout ( makeLayout () ); // title row this.title = new Label ( this, SWT.NONE ); this.title.setLayoutData ( new GridData ( GridData.CENTER, GridData.FILL, true, false, 1, 1 ) ); // row 2 this.chartArea = new ChartArea ( this, SWT.NONE ); this.chartArea.setLayoutData ( makeMainLayoutData () ); addDisposeListener ( new DisposeListener () { @Override public void widgetDisposed ( final DisposeEvent e ) { onDispose (); } } ); }
Example #3
Source File: MoveConnectorWizardPage.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
private void createExecutionEventControl(final EMFDataBindingContext dbc, final Composite parent) { final Label eventLabel = new Label(parent, SWT.NONE); eventLabel.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create()); eventLabel.setText(Messages.connectorEventLabel); final Composite eventRadioGroup = new Composite(parent, SWT.NONE); eventRadioGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); eventRadioGroup.setLayout(GridLayoutFactory.fillDefaults().numColumns(2).extendedMargins(20, 0, 0, 15).create()); final Button inRadio = createRadioButton(eventRadioGroup, Messages.bind(Messages.connectorInChoice, ConnectorEvent.ON_ENTER.name())); final Button outRadio = createRadioButton(eventRadioGroup, Messages.bind(Messages.connectorOutChoice, ConnectorEvent.ON_FINISH.name())); final SelectObservableValue eventObservable = new SelectObservableValue(String.class); eventObservable.addOption(ConnectorEvent.ON_ENTER.name(), SWTObservables.observeSelection(inRadio)); eventObservable.addOption(ConnectorEvent.ON_FINISH.name(), SWTObservables.observeSelection(outRadio)); dbc.bindValue(eventObservable, connectorEventObservable); }
Example #4
Source File: ReportConfigurationTab.java From spotbugs with GNU Lesser General Public License v2.1 | 6 votes |
private void createPriorityGroup(Composite parent) { Composite prioGroup = new Composite(parent, SWT.NONE); prioGroup.setLayout(new GridLayout(2, false)); Label minPrioLabel = new Label(prioGroup, SWT.NONE); minPrioLabel.setText(getMessage("property.minPriority")); minPrioLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); minPriorityCombo = new Combo(prioGroup, SWT.DROP_DOWN | SWT.READ_ONLY); minPriorityCombo.add(ProjectFilterSettings.HIGH_PRIORITY); minPriorityCombo.add(ProjectFilterSettings.MEDIUM_PRIORITY); minPriorityCombo.add(ProjectFilterSettings.LOW_PRIORITY); minPriorityCombo.setText(propertyPage.getOriginalUserPreferences().getFilterSettings().getMinPriority()); minPriorityCombo.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); minPriorityCombo.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { String data = minPriorityCombo.getText(); getCurrentProps().getFilterSettings().setMinPriority(data); } }); }
Example #5
Source File: DetailsDialog.java From hop with Apache License 2.0 | 6 votes |
@Override protected Control createMessageArea( Composite composite ) { GridLayout gridLayout = (GridLayout) composite.getLayout(); gridLayout.numColumns = 1; composite.setLayout( gridLayout ); if ( this.message != null ) { this.messageLabel = new Label( composite, this.getMessageLabelStyle() ); this.messageLabel.setText( this.message ); } if ( this.details != null ) { this.detailsText = new Text( composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL ); this.detailsText.pack(); this.detailsText.setText( this.details ); GridData gridData = new GridData(); gridData.widthHint = 1024; gridData.heightHint = 300; this.detailsText.setLayoutData( gridData ); this.detailsText.setSelection( this.details.length() ); } return composite; }
Example #6
Source File: IntroduceParameterObjectWizard.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
private void createClassNameInput(Composite result) { Label label= new Label(result, SWT.LEAD); label.setText(RefactoringMessages.IntroduceParameterObjectWizard_classnamefield_label); final Text text= new Text(result, SWT.SINGLE | SWT.BORDER); text.setText(fProcessor.getClassName()); text.selectAll(); text.setFocus(); text.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { fProcessor.setClassName(text.getText()); updateSignaturePreview(); validateRefactoring(); } }); text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); }
Example #7
Source File: CreateOrUpdataSRXDialog.java From tmxeditor8 with GNU General Public License v2.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { Composite tparent = (Composite) super.createDialogArea(parent); GridDataFactory.fillDefaults().grab(true, true).hint(300, 50).minSize(300, 50).applyTo(tparent); Composite nameCmp = new Composite(tparent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(nameCmp); GridLayoutFactory.fillDefaults().numColumns(2).applyTo(nameCmp); Label nameLbl = new Label(nameCmp, SWT.NONE); nameLbl.setText(Messages.getString("srx.CreateOrUpdataSRXDialog.nameLbl")); nameTxt = new Text(nameCmp, SWT.BORDER); GridDataFactory.fillDefaults().grab(true, false).applyTo(nameTxt); return tparent; }
Example #8
Source File: CogniCryptPreferencePage.java From CogniCrypt with Eclipse Public License 2.0 | 6 votes |
@Override protected Control createContents(Composite parent) { final Composite container = new Composite(parent, SWT.FILL); container.setLayout(new GridLayout(1, true)); notifyBasicPreferenceListeners(container); new Label(container, SWT.NONE); final ExpandableComposite collap = new ExpandableComposite(container, SWT.Collapse); collap.setText("Advanced Options"); final Composite advancedOptions = new Composite(collap, SWT.None); collap.setClient(advancedOptions); advancedOptions.setLayout(new RowLayout(SWT.VERTICAL)); notifyAdvancedPreferenceListeners(advancedOptions); collap.setExpanded(true); return container; }
Example #9
Source File: SpecProcessPage.java From n4js with Eclipse Public License 1.0 | 6 votes |
/** * (non-Javadoc) Method declared on IDialogPage. */ @Override public void createControl(Composite parent) { setPageComplete(true); initializeDialogUnits(parent); Composite composite = new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); new Label(composite, SWT.NONE).setText("Messages:"); createErrorGroup(composite); Display display = getShell().getDisplay(); highlightColor = display.getSystemColor(SWT.COLOR_RED); setControl(composite); }
Example #10
Source File: CompositeFactory.java From ermaster-b with Apache License 2.0 | 6 votes |
public static Label createExampleLabel(Composite composite, String title, int span) { Label label = new Label(composite, SWT.NONE); label.setText(ResourceString.getResourceString(title)); if (span > 0) { GridData gridData = new GridData(); gridData.horizontalSpan = span; label.setLayoutData(gridData); } FontData fontData = Display.getCurrent().getSystemFont().getFontData()[0]; Font font = new Font(Display.getCurrent(), fontData.getName(), 8, SWT.NORMAL); label.setFont(font); return label; }
Example #11
Source File: MultiResourceSelectionDialogWithFlowOption.java From uima-uimaj with Apache License 2.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); new Label(composite, SWT.WRAP).setText(""); //$NON-NLS-1$ String sAddToFlowPrompt = Messages .getString("MultiResourceSelectionDialogWithFlowOption.addSelectedAEsToEndOfFlow"); //$NON-NLS-1$ FormToolkit factory = new FormToolkit(TAEConfiguratorPlugin.getDefault().getFormColors( parent.getDisplay())); autoAddToFlowButton = factory.createButton(composite, sAddToFlowPrompt, SWT.CHECK); m_bAutoAddToFlow = "false".equals(CDEpropertyPage.getAddToFlow(editor.getProject())) ? false : true; autoAddToFlowButton.setSelection(m_bAutoAddToFlow); autoAddToFlowButton.setBackground(null); return composite; }
Example #12
Source File: AddMultiplikatorDialog.java From elexis-3-core with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(final Composite parent){ Composite ret = new Composite(parent, SWT.NONE); ret.setLayout(new GridLayout(2, false)); Label l1 = new Label(ret, SWT.NONE); l1.setText(Messages.AccountView_date); dpc = new CDateTime(ret, CDT.HORIZONTAL | CDT.DATE_SHORT | CDT.DROP_DOWN | SWT.BORDER | CDT.TAB_FIELDS); String value = java.time.LocalDate.now().format(DateTimeFormatter.ofPattern("01.01.y")); dpc.setSelection(new TimeTool(value).getTime()); dpc.setToolTipText(Messages.MultiplikatorEditor_PleaseEnterBeginDate); Label label = new Label(ret, SWT.NONE); label.setText(Messages.Leistungscodes_multiplierLabel); multi = new Text(ret, SWT.BORDER); multi.setTextLimit(6); multi.setToolTipText(Messages.MultiplikatorEditor_NewMultipilcator); multi.setLayoutData(SWTHelper.getFillGridData(1, true, 1, false)); return ret; }
Example #13
Source File: TextTemplatePreferences.java From elexis-3-core with Eclipse Public License 1.0 | 6 votes |
@Override protected void createFieldEditors(){ Label expl = new Label(getFieldEditorParent(), SWT.WRAP); expl.setText(Messages.TextTemplatePreferences_ExplanationLine1 + Messages.TextTemplatePreferences_ExplanationLine2 + Messages.TextTemplatePreferences_ExplanationLine3); expl.setLayoutData(SWTHelper.getFillGridData(2, true, 1, false)); addField(new StringFieldEditor(SUFFIX_STATION, SUFFIX_FOR_THIS_STATION, getFieldEditorParent())); /* * IExtensionRegistry exr = Platform.getExtensionRegistry(); IExtensionPoint exp = * exr.getExtensionPoint("ch.elexis.documentTemplates"); if (exp != null) { IExtension[] * extensions = exp.getExtensions(); for (IExtension ex : extensions) { * IConfigurationElement[] elems = ex.getConfigurationElements(); for (IConfigurationElement * el : elems) { String n=el.getAttribute("name"); addField(new StringFieldEditor(BRANCH+n, * n, getFieldEditorParent())); } } * * } */ }
Example #14
Source File: DocumentExpressionEditor.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
protected void createReturnTypeComposite(final Composite parent) { final Composite typeComposite = new Composite(parent, SWT.NONE); typeComposite.setLayoutData(GridDataFactory.fillDefaults() .grab(true, false).create()); final GridLayout gl = new GridLayout(2, false); gl.marginWidth = 0; gl.marginHeight = 0; typeComposite.setLayout(gl); final Label typeLabel = new Label(typeComposite, SWT.NONE); typeLabel.setText(Messages.returnType); typeLabel.setLayoutData(GridDataFactory.fillDefaults() .align(SWT.FILL, SWT.CENTER).create()); typeText = new Text(typeComposite, SWT.BORDER | SWT.READ_ONLY); typeText.setLayoutData(GridDataFactory.fillDefaults().grab(true, false) .align(SWT.FILL, SWT.CENTER).indent(10, 0).create()); }
Example #15
Source File: PrimitiveQuestionnairePage.java From CogniCrypt with Eclipse Public License 2.0 | 6 votes |
private void createNote(final Composite parent, final Question question) { final Group notePanel = new Group(parent, SWT.NONE); notePanel.setText("Note:"); final Font boldFont = new Font(notePanel.getDisplay(), new FontData(Constants.ARIAL, 10, SWT.BOLD)); notePanel.setFont(boldFont); this.note = new Text(notePanel, SWT.MULTI | SWT.WRAP); this.note.setLayoutData(new GridData(GridData.FILL_BOTH)); this.note.setText(Constants.DESCRIPTION_KEYSIZES); this.note.setBounds(10, 20, 585, 60); this.note.setSize(this.note.computeSize(585, SWT.DEFAULT)); setControl(notePanel); this.note.setEditable(false); this.note.setEnabled(true); new Label(parent, SWT.NULL); }
Example #16
Source File: SVNAbstractCompareEditorInput.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
public Control createContents(Composite parent) { if (getCompareResult() instanceof String) { setMessage("Testing"); Composite composite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.numColumns = 2; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); Label iconLabel = new Label(composite, SWT.WRAP); iconLabel.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK)); Label errorLabel = new Label(composite, SWT.WRAP); GridData gd = new GridData(); gd.widthHint = 500; errorLabel.setLayoutData(gd); errorLabel.setText((String)getCompareResult()); parent.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE)); composite.setBackground(parent.getBackground()); errorLabel.setBackground(parent.getBackground()); iconLabel.setBackground(parent.getBackground()); return composite; } return super.createContents(parent); }
Example #17
Source File: DefaultJavaFoldingPreferenceBlock.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
public Control createControl(Composite composite) { fOverlayStore.load(); fOverlayStore.start(); Composite inner= new Composite(composite, SWT.NONE); GridLayout layout= new GridLayout(1, true); layout.verticalSpacing= 3; layout.marginWidth= 0; inner.setLayout(layout); Label label= new Label(inner, SWT.LEFT); label.setText(FoldingMessages.DefaultJavaFoldingPreferenceBlock_title); addCheckBox(inner, FoldingMessages.DefaultJavaFoldingPreferenceBlock_comments, PreferenceConstants.EDITOR_FOLDING_JAVADOC, 0); addCheckBox(inner, FoldingMessages.DefaultJavaFoldingPreferenceBlock_headers, PreferenceConstants.EDITOR_FOLDING_HEADERS, 0); addCheckBox(inner, FoldingMessages.DefaultJavaFoldingPreferenceBlock_innerTypes, PreferenceConstants.EDITOR_FOLDING_INNERTYPES, 0); addCheckBox(inner, FoldingMessages.DefaultJavaFoldingPreferenceBlock_methods, PreferenceConstants.EDITOR_FOLDING_METHODS, 0); addCheckBox(inner, FoldingMessages.DefaultJavaFoldingPreferenceBlock_imports, PreferenceConstants.EDITOR_FOLDING_IMPORTS, 0); return inner; }
Example #18
Source File: FilterViewer.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
FilterTraceTypeNodeComposite(Composite parent, TmfFilterTraceTypeNode node) { super(parent, node); fNode = node; fTraceTypeMap = getTraceTypeMap(fNode.getTraceTypeId()); Label label = new Label(this, SWT.NONE); label.setText(Messages.FilterViewer_TypeLabel); fTypeCombo = new CCombo(this, SWT.DROP_DOWN | SWT.READ_ONLY); fTypeCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); fTypeCombo.setItems(fTraceTypeMap.keySet().toArray(new String[0])); if (fNode.getTraceTypeId() != null) { fTypeCombo.setText(fNode.getName()); } fTypeCombo.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { TraceTypeHelper helper = checkNotNull(fTraceTypeMap.get(fTypeCombo.getText())); fNode.setTraceTypeId(helper.getTraceTypeId()); fNode.setTraceClass(helper.getTraceClass()); fNode.setName(fTypeCombo.getText()); fViewer.refresh(fNode); } }); }
Example #19
Source File: CompositeFactory.java From erflute with Apache License 2.0 | 6 votes |
public static Combo createCombo(AbstractDialog dialog, Composite composite, String title, int span) { if (title != null) { final Label label = new Label(composite, SWT.RIGHT); label.setText(DisplayMessages.getMessage(title)); } final GridData gridData = new GridData(); gridData.horizontalSpan = span; gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; final Combo combo = new Combo(composite, SWT.NONE); combo.setLayoutData(gridData); ListenerAppender.addComboListener(combo, dialog, false); return combo; }
Example #20
Source File: TranslationPreferencePage.java From ermaster-b with Apache License 2.0 | 5 votes |
private void createButtonComposite(Composite composite) { GridLayout layout = new GridLayout(); layout.numColumns = 2; composite.setLayout(layout); new Label(composite, SWT.NONE); }
Example #21
Source File: ExternalizeWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void createButtonComposite(Composite parent) { Composite buttonComp= new Composite(parent, SWT.NONE); GridLayout gl= new GridLayout(); gl.marginHeight= 0; gl.marginWidth= 0; buttonComp.setLayout(gl); buttonComp.setLayoutData(new GridData(GridData.FILL_VERTICAL)); SelectionAdapter adapter= new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { handleButtonPressed(e.widget); } }; fExternalizeButton= createTaskButton(buttonComp, NLSUIMessages.ExternalizeWizardPage_Externalize_Selected, adapter); fIgnoreButton= createTaskButton(buttonComp, NLSUIMessages.ExternalizeWizardPage_Ignore_Selected, adapter); fInternalizeButton= createTaskButton(buttonComp, NLSUIMessages.ExternalizeWizardPage_Internalize_Selected, adapter); new Label(buttonComp, SWT.NONE); // separator fEditButton= createTaskButton(buttonComp, NLSUIMessages.ExternalizeWizardPage_Edit_key_and_value, adapter); fRevertButton= createTaskButton(buttonComp, NLSUIMessages.ExternalizeWizardPage_Revert_Selected, adapter); fRenameButton= createTaskButton(buttonComp, NLSUIMessages.ExternalizeWizardPage_Rename_Keys, adapter); fEditButton.setEnabled(false); fRenameButton.setEnabled(false); buttonComp.pack(); }
Example #22
Source File: SelectDatabaseOutputTypeWizardPage.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected void createAdvancedModeDescriptionControl( final Composite choicesComposite) { final Label choiceDescriptionLabel = new Label(choicesComposite, SWT.WRAP); choiceDescriptionLabel .setLayoutData(GridDataFactory.fillDefaults().grab(true, false).hint(160, SWT.DEFAULT).span(2, 1).create()); choiceDescriptionLabel.setText(Messages.graphicalModeDescription); }
Example #23
Source File: ProviderRow.java From olca-app with Mozilla Public License 2.0 | 5 votes |
private void fireSelect(Label label, IProvider provider) { label.setText(label(provider)); label.getParent().pack(); if (onSelect != null) { onSelect.accept(provider); } }
Example #24
Source File: SplitXliffWizardPage.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
/** * 创建要分割文件的显示区 * @param tparent */ public void createSplitXlfNameGroup(Composite tparent) { final Group xliffDataGroup = new Group(tparent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).margins(8, 8).applyTo(xliffDataGroup); GridDataFactory.fillDefaults().grab(true, false).applyTo(xliffDataGroup); xliffDataGroup.setText(Messages.getString("wizard.SplitXliffWizardPage.xliffDataGroup")); GridData textData = new GridData(SWT.FILL, SWT.CENTER, true, false); textData.widthHint = 200; Label xlfNameLbl = new Label(xliffDataGroup, SWT.RIGHT); xlfNameLbl.setText(Messages.getString("wizard.SplitXliffWizardPage.xlfNameLbl")); GridDataFactory.swtDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(xlfNameLbl); xliffNameTxt = new Text(xliffDataGroup, SWT.BORDER); xliffNameTxt.setText(splitFile.getFullPath().toOSString()); GridDataFactory.fillDefaults().grab(true, false).applyTo(xliffNameTxt); xliffNameTxt.setEditable(false); Label targetFilsPathLbl = new Label(xliffDataGroup, SWT.RIGHT); targetFilsPathLbl.setText(Messages.getString("wizard.SplitXliffWizardPage.targetFilsPathLbl")); GridDataFactory.swtDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(targetFilsPathLbl); targetXlfPathTxt = new Text(xliffDataGroup, SWT.BORDER); targetXlfPathTxt.setLayoutData(textData); targetXlfPathTxt.setText(splitFile.getParent().getFullPath().append(splitFile.getName() + "_split") .toOSString()); targetXlfPathTxt.setEditable(false); if ("\\".equals(System.getProperty("file.separator"))) { separator = "\\"; } else { separator = "/"; } validXliff(); }
Example #25
Source File: PluginHelpDialog.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { Composite tparent = (Composite) super.createDialogArea(parent); tparent.setLayout(new GridLayout()); tparent.setLayoutData(new GridData(GridData.FILL_BOTH)); Label logo = new Label(tparent, SWT.BORDER); logo.setImage(Activator.getImageDescriptor(PluginConstants.HELP_SPLASH).createImage()); return tparent; }
Example #26
Source File: RelationDialog.java From ermaster-b with Apache License 2.0 | 5 votes |
private int createParentGroup(Composite composite) { GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 10; gridLayout.marginHeight = 10; GridData gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; Group group = new Group(composite, SWT.NONE); group.setLayoutData(gridData); group.setLayout(gridLayout); group.setText(ResourceString.getResourceString("label.parent")); Composite upperComposite = new Composite(group, SWT.NONE); upperComposite.setLayoutData(gridData); upperComposite.setLayout(gridLayout); Label label1 = new Label(upperComposite, SWT.NONE); label1.setText(ResourceString .getResourceString("label.reference.table")); parentTableNameText = new Text(upperComposite, SWT.BORDER | SWT.READ_ONLY); parentTableNameText.setLayoutData(gridData); Label label2 = new Label(upperComposite, SWT.NONE); label2.setText(ResourceString .getResourceString("label.reference.column")); this.createColumnCombo(upperComposite); this.createParentMandatoryGroup(group); upperComposite.pack(); return upperComposite.getSize().y; }
Example #27
Source File: ChartInputSelectorView.java From neoscada with Eclipse Public License 1.0 | 5 votes |
@Override public void createPartControl ( final Composite parent ) { this.parent = parent; this.placeholder = new Label ( parent, SWT.NONE ); this.placeholder.setText ( "Select a chart view to see input channels" ); attachSelectionService (); }
Example #28
Source File: UtilsUI.java From EasyShell with Eclipse Public License 2.0 | 5 votes |
static public Label createLabel(Composite parent, String imageId, String text, String tooltip) { Label label = new Label(parent, SWT.LEFT); label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); if (text != null) { label.setText(text); label.setToolTipText(tooltip); } label.setImage(Activator.getImage(imageId)); return label; }
Example #29
Source File: SplitTermDialog.java From slr-toolkit with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); GridLayout layout = new GridLayout(2, false); layout.marginRight = 5; layout.marginLeft = 10; container.setLayout(layout); new Label(container, SWT.NONE).setText("Split Term: "); new Label(container, SWT.NONE).setText(this.selectedTermName); new Label(container, SWT.NONE).setText("Default Term*: "); this.defaultTermNameText = new Text(container, SWT.BORDER); this.defaultTermNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); this.defaultTermNameText.setText(""); this.defaultTermNameText.addModifyListener((e) -> { if (((Text) e.getSource()).getText() == null || ((Text) e.getSource()).getText().isEmpty()) { getButton(IDialogConstants.OK_ID).setEnabled(false); } else { getButton(IDialogConstants.OK_ID).setEnabled(true); } }); new Label(container, SWT.NONE).setText("Further Terms (comma-seperated): "); this.furtherTermNamesText = new Text(container, SWT.BORDER | SWT.V_SCROLL); return container; }
Example #30
Source File: CompositeFactory.java From ermasterr with Apache License 2.0 | 5 votes |
public static Text createTextArea(final AbstractDialog dialog, final Composite composite, final String title, final int width, final int height, final int span, final boolean selectAll, final boolean imeOn, final boolean indent) { if (title != null) { final Label label = new Label(composite, SWT.NONE); final GridData labelGridData = new GridData(); labelGridData.verticalAlignment = SWT.TOP; labelGridData.horizontalAlignment = SWT.LEFT; label.setLayoutData(labelGridData); label.setText(ResourceString.getResourceString(title)); } final GridData textAreaGridData = new GridData(); textAreaGridData.heightHint = height; textAreaGridData.horizontalSpan = span; if (width > 0) { textAreaGridData.widthHint = width; } else { textAreaGridData.horizontalAlignment = GridData.FILL; textAreaGridData.grabExcessHorizontalSpace = true; } if (title != null && indent) { textAreaGridData.horizontalIndent = Resources.INDENT; } final Text text = new Text(composite, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.BORDER); text.setLayoutData(textAreaGridData); ListenerAppender.addTextAreaListener(text, dialog, selectAll, imeOn); return text; }