Codota Logo
Composite.getForeground
Code IndexAdd Codota to your IDE (free)

How to use
getForeground
method
in
org.eclipse.swt.widgets.Composite

Best Java code snippets using org.eclipse.swt.widgets.Composite.getForeground (Showing top 20 results out of 315)

  • Common ways to obtain Composite
private void myMethod () {
Composite c =
  • Codota IconControl control;control.getParent()
  • Codota IconStatusDialog zuper;(Composite) zuper.createDialogArea(parent)
  • Codota IconTitleAreaDialog zuper;(Composite) zuper.createDialogArea(parent)
  • Smart code suggestions by Codota
}
origin: BiglySoftware/BiglyBT

@Override
public Color getForegroundSWT() {
  return composite.getForeground();
}
origin: org.eclipse/org.eclipse.wst.xsd.ui

public void linkExited(HyperlinkEvent e)
{
 link.setForeground(link.getParent().getForeground());
}

origin: org.eclipse.xtext/ui

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);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

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);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

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);
}
origin: Adobe-Marketing-Cloud/aem-eclipse-developer-tools

  public void modifyText(ModifyEvent e) {
    if (!groupIdChanged) {
      groupIdChanged = true;
      groupId.setForeground(container.getForeground());
    }
    dialogChanged();
    advancedSettings.handleModifyText();
  }
});
origin: Adobe-Marketing-Cloud/aem-eclipse-developer-tools

  public void modifyText(ModifyEvent e) {
    if (!artifactIdChanged) {
      artifactIdChanged = true;
      artifactId.setForeground(container.getForeground());
    }
    dialogChanged();
    advancedSettings.handleModifyText();
  }
});
origin: Adobe-Marketing-Cloud/aem-eclipse-developer-tools

  public void modifyText(ModifyEvent e) {
    if (!nameChanged) {
      nameChanged = true;
      name.setForeground(container.getForeground());
    }
    dialogChanged();
    advancedSettings.handleModifyText();
  }
});
origin: BiglySoftware/BiglyBT

@Override
public int[] getForeground() {
  if (composite == null || composite.isDisposed()) {
    return null;
  }
  Color fg = composite.getForeground();
  return new int[] {
    fg.getRed(),
    fg.getGreen(),
    fg.getBlue()
  };
}
origin: BiglySoftware/BiglyBT

    | GridData.VERTICAL_ALIGN_FILL);
setLayoutData(gridData);
setForeground(parent.getForeground());
origin: org.eclipse.xtext/ui

setColorAndFont(scrolledComposite, parent.getForeground(), parent.getBackground(), JFaceResources.getDialogFont());
origin: org.eclipse.platform/org.eclipse.jface.text

@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);
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * 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);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@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);
  }
}
origin: org.eclipse.xtext/ui

/**
 * 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);
}
origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor

fLabel.setForeground(fLabel.getParent().getForeground());
fLabel.setText(escapedText);
fLabel.setImage(fImage);
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

fLabel.setForeground(fLabel.getParent().getForeground());
fLabel.setText(escapedText);
fLabel.setImage(fImage);
origin: BiglySoftware/BiglyBT

  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) {
origin: org.eclipse.egit/ui

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);
origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * 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);
}
org.eclipse.swt.widgetsCompositegetForeground

Popular methods of Composite

  • setLayout
    Sets the layout which is associated with the receiver to be the argument which may be null.
  • <init>
    Constructs a new instance of this class given its parent and a style value describing its behavior a
  • setLayoutData
  • layout
    Forces a lay out (that is, sets the size and location) of all widgets that are in the parent hierarc
  • getDisplay
  • getChildren
    Returns a (possibly empty) array containing the receiver's children. Children are returned in the or
  • getShell
  • getFont
  • getLayout
    Returns layout which is associated with the receiver, or null if one has not been set.
  • setFont
  • getParent
  • computeSize
  • getParent,
  • computeSize,
  • dispose,
  • setBackground,
  • getClientArea,
  • isDisposed,
  • getBackground,
  • setVisible,
  • setSize,
  • setData

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now