@Override public Color getForegroundSWT() { return composite.getForeground(); }
public void linkExited(HyperlinkEvent e) { link.setForeground(link.getParent().getForeground()); }
private void createCompletionProposalsControl(Composite parent, ICompletionProposal[] proposals) { Composite composite= new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayout layout2= new GridLayout(1, false); layout2.marginHeight= 0; layout2.marginWidth= 0; layout2.verticalSpacing= 2; composite.setLayout(layout2); Label separator= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); GridData gridData= new GridData(SWT.FILL, SWT.CENTER, true, false); separator.setLayoutData(gridData); Label quickFixLabel= new Label(composite, SWT.NONE); GridData layoutData= new GridData(SWT.BEGINNING, SWT.CENTER, false, false); layoutData.horizontalIndent= 4; quickFixLabel.setLayoutData(layoutData); String text; if (proposals.length == 1) { // DIFF: replaced JavaHoverMessages with XtextUIMessages (4) text= XtextUIMessages.AnnotationWithQuickFixesHover_message_singleQuickFix; } else { // DIFF: replaced JavaHoverMessages with XtextUIMessages (4) text= MessageFormat.format(XtextUIMessages.AnnotationWithQuickFixesHover_message_multipleQuickFix, new Object[] { String.valueOf(proposals.length) }); } quickFixLabel.setText(text); setColorAndFont(composite, parent.getForeground(), parent.getBackground(), JFaceResources.getDialogFont()); createCompletionProposalsList(composite, proposals); }
private void createCompletionProposalsControl(Composite parent, ICompletionProposal[] proposals) { Composite composite= new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayout layout2= new GridLayout(1, false); layout2.marginHeight= 0; layout2.marginWidth= 0; layout2.verticalSpacing= 2; composite.setLayout(layout2); Label separator= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); GridData gridData= new GridData(SWT.FILL, SWT.CENTER, true, false); separator.setLayoutData(gridData); Label quickFixLabel= new Label(composite, SWT.NONE); GridData layoutData= new GridData(SWT.BEGINNING, SWT.CENTER, false, false); layoutData.horizontalIndent= 4; quickFixLabel.setLayoutData(layoutData); String text; if (proposals.length == 1) { text= JavaHoverMessages.AbstractAnnotationHover_message_singleQuickFix; } else { text= Messages.format(JavaHoverMessages.AbstractAnnotationHover_message_multipleQuickFix, new Object[] { String.valueOf(proposals.length) }); } quickFixLabel.setText(text); setColorAndFont(composite, parent.getForeground(), parent.getBackground(), JFaceResources.getDialogFont()); createCompletionProposalsList(composite, proposals); }
private void createCompletionProposalsControl(Composite parent, ICompletionProposal[] proposals) { Composite composite= new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayout layout2= new GridLayout(1, false); layout2.marginHeight= 0; layout2.marginWidth= 0; layout2.verticalSpacing= 2; composite.setLayout(layout2); Label separator= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); GridData gridData= new GridData(SWT.FILL, SWT.CENTER, true, false); separator.setLayoutData(gridData); Label quickFixLabel= new Label(composite, SWT.NONE); GridData layoutData= new GridData(SWT.BEGINNING, SWT.CENTER, false, false); layoutData.horizontalIndent= 4; quickFixLabel.setLayoutData(layoutData); String text; if (proposals.length == 1) { text= JavaHoverMessages.AbstractAnnotationHover_message_singleQuickFix; } else { text= Messages.format(JavaHoverMessages.AbstractAnnotationHover_message_multipleQuickFix, new Object[] { String.valueOf(proposals.length) }); } quickFixLabel.setText(text); setColorAndFont(composite, parent.getForeground(), parent.getBackground(), JFaceResources.getDialogFont()); createCompletionProposalsList(composite, proposals); }
public void modifyText(ModifyEvent e) { if (!groupIdChanged) { groupIdChanged = true; groupId.setForeground(container.getForeground()); } dialogChanged(); advancedSettings.handleModifyText(); } });
public void modifyText(ModifyEvent e) { if (!artifactIdChanged) { artifactIdChanged = true; artifactId.setForeground(container.getForeground()); } dialogChanged(); advancedSettings.handleModifyText(); } });
public void modifyText(ModifyEvent e) { if (!nameChanged) { nameChanged = true; name.setForeground(container.getForeground()); } dialogChanged(); advancedSettings.handleModifyText(); } });
@Override public int[] getForeground() { if (composite == null || composite.isDisposed()) { return null; } Color fg = composite.getForeground(); return new int[] { fg.getRed(), fg.getGreen(), fg.getBlue() }; }
| GridData.VERTICAL_ALIGN_FILL); setLayoutData(gridData); setForeground(parent.getForeground());
setColorAndFont(scrolledComposite, parent.getForeground(), parent.getBackground(), JFaceResources.getDialogFont());
@Override protected void createContent(Composite parent) { fText= new StyledText(parent, SWT.MULTI | SWT.READ_ONLY | fAdditionalTextStyles); fText.setForeground(parent.getForeground()); fText.setBackground(parent.getBackground()); fText.setFont(JFaceResources.getDialogFont()); FillLayout layout= (FillLayout)parent.getLayout(); if (fText.getWordWrap()) { // indent does not work for wrapping StyledText, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=56342 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=115432 layout.marginHeight= INNER_BORDER; layout.marginWidth= INNER_BORDER; } else { fText.setIndent(INNER_BORDER); } }
/** * Create content of the hover. This is called after * the input has been set. */ protected void deferredCreateContent() { fillToolbar(); createAnnotationInformation(fParent, getAnnotationInfo().annotation); setColorAndFont(fParent, fParent.getForeground(), fParent.getBackground(), JFaceResources.getDialogFont()); ICompletionProposal[] proposals= getAnnotationInfo().getCompletionProposals(); if (proposals.length > 0) createCompletionProposalsControl(fParent, proposals); fParent.layout(true); }
@Override protected void createContent(Composite parent) { fText= new StyledText(parent, SWT.MULTI | SWT.READ_ONLY | fAdditionalTextStyles); fText.setForeground(parent.getForeground()); fText.setBackground(parent.getBackground()); fText.setFont(JFaceResources.getDialogFont()); FillLayout layout= (FillLayout)parent.getLayout(); if (fText.getWordWrap()) { // indent does not work for wrapping StyledText, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=56342 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=115432 layout.marginHeight= INNER_BORDER; layout.marginWidth= INNER_BORDER; } else { fText.setIndent(INNER_BORDER); } }
/** * Create content of the hover. This is called after * the input has been set. */ protected void deferredCreateContent() { fillToolbar(); createAnnotationInformation(fParent, getAnnotationInfo().annotation); setColorAndFont(fParent, fParent.getForeground(), fParent.getBackground(), JFaceResources.getDialogFont()); ICompletionProposal[] proposals= getAnnotationInfo().getCompletionProposals(); if (proposals.length > 0) createCompletionProposalsControl(fParent, proposals); fParent.layout(true); }
fLabel.setForeground(fLabel.getParent().getForeground()); fLabel.setText(escapedText); fLabel.setImage(fImage);
fLabel.setForeground(fLabel.getParent().getForeground()); fLabel.setText(escapedText); fLabel.setImage(fImage);
if (e.type == SWT.Paint) { Rectangle area = canvas.getClientArea(); e.gc.setForeground(shell.getForeground()); GCStringPrinter.printString(e.gc, text, area, true, false, SWT.WRAP | SWT.TOP); sp.setUrlColor(urlColor); e.gc.setForeground(shell.getForeground()); sp.printString(); } else if (e.type == SWT.MouseMove) {
displayArea = new Composite(scrolls, SWT.NONE); scrolls.setContent(displayArea); displayArea.setForeground(parent.getForeground()); displayArea.setBackground(parent.getBackground()); displayArea.setBackgroundMode(SWT.INHERIT_FORCE); authorLabel.setForeground(parent.getForeground()); authorLabel.setBackground(parent.getBackground()); authorLabel.setFont(UIUtils.getItalicFont(JFaceResources.DEFAULT_FONT)); committerLabel.setForeground(parent.getForeground()); committerLabel.setBackground(parent.getBackground()); committerLabel.setFont(UIUtils messageText.setForeground(parent.getForeground()); messageText.setBackground(parent.getBackground()); messageText.setEditable(false);
/** * Create content of the hover. This is called after * the input has been set. */ protected void deferredCreateContent() { fillToolbar(); createAnnotationInformation(fParent, getAnnotationInfo().annotation); ColorRegistry colorRegistry= JFaceResources.getColorRegistry(); Color foreground= colorRegistry.get(JFacePreferences.INFORMATION_FOREGROUND_COLOR); if (foreground == null) { foreground= fParent.getForeground(); } Color background= colorRegistry.get(JFacePreferences.INFORMATION_BACKGROUND_COLOR); if (background == null) { background= fParent.getBackground(); } setForegroundColor(foreground); // For main composite. setBackgroundColor(background); setColorAndFont(fParent, foreground, background, JFaceResources.getDialogFont()); // For child elements. ICompletionProposal[] proposals= getAnnotationInfo().getCompletionProposals(); if (proposals.length > 0) createCompletionProposalsControl(fParent, proposals); fParent.layout(true); }