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

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

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

  • 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: org.eclipse.jdt/org.eclipse.jdt.ui

private void createDescription(String label) {
  if (label == null)
    return;
  fDescription= new Label(fParentComposite, SWT.LEFT | SWT.WRAP);
  fDescription.setFont(fParentComposite.getFont());
  fDescription.setText(label);
  fDescription.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
}
origin: org.eclipse/org.eclipse.jdt.ui

protected static Label createLabel(Composite composite, String text, int numColumns) {
  final GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
  gd.horizontalSpan = numColumns;
  gd.widthHint= 0;
  final Label label = new Label(composite, SWT.WRAP);
  label.setFont(composite.getFont());
  label.setText(text);
  label.setLayoutData(gd);
  return label;		
}
origin: org.eclipse.pde/org.eclipse.pde.ui

private Button createButton(Composite parent, int span, int indent, String text) {
  Button button = new Button(parent, SWT.CHECK);
  button.setText(text);
  GridData gd = new GridData();
  gd.horizontalSpan = span;
  gd.horizontalIndent = indent;
  button.setLayoutData(gd);
  button.addSelectionListener(fListener);
  button.setFont(parent.getFont());
  return button;
}
origin: org.eclipse/org.eclipse.jdt.debug.ui

/**
 * Creates a fully configured composite with the given number of columns
 * @param parent
 * @param numColumns
 * @return the configured composite
 */
protected Composite createComposite(Composite parent, int numColumns) {
  return SWTFactory.createComposite(parent, parent.getFont(), numColumns, 1, GridData.FILL_HORIZONTAL, 0, 0);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private Button createSelectionButton(int index, Composite group, SelectionListener listener) {
  Button button= new Button(group, fButtonsStyle | SWT.LEFT);
  button.setFont(group.getFont());
  button.setText(fButtonNames[index]);
  button.setEnabled(isEnabled() && fButtonsEnabled[index]);
  button.setSelection(fButtonsSelected[index]);
  button.addSelectionListener(listener);
  button.setLayoutData(new GridData());
  return button;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

protected static Label createLabel(int numColumns, Composite parent, String text, int indent) {
  final Label label= new Label(parent, SWT.WRAP);
  label.setFont(parent.getFont());
  label.setText(text);
  GridData gd= new GridData(GridData.BEGINNING, GridData.CENTER, true, false, numColumns, 1);
  gd.horizontalIndent= indent * LayoutUtil.getIndent();
  label.setLayoutData(gd);
  return label;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private Label createSeparator(Composite parent) {
  Label separator= new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
  separator.setFont(parent.getFont());
  separator.setVisible(false);
  GridData gd= new GridData();
  gd.horizontalAlignment= GridData.FILL;
  gd.verticalAlignment= GridData.BEGINNING;
  gd.verticalIndent= 4;
  separator.setLayoutData(gd);
  return separator;
}
origin: org.eclipse/org.eclipse.jdt.ui

protected Control createDialogArea(Composite parent) {
  Composite control= (Composite)super.createDialogArea(parent);
  
  fCountLabel= new Label(control, SWT.NONE);
  fCountLabel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
  fCountLabel.setFont(parent.getFont());
  updateCountLabel();
  
  return control;
}

origin: org.eclipse.pde/org.eclipse.pde.ui

private Control createImplicitTabContents(Composite parent) {
  Composite container = new Composite(parent, SWT.NONE);
  GridLayout layout = new GridLayout(2, false);
  container.setLayout(layout);
  container.setLayoutData(new GridData(GridData.FILL_BOTH));
  container.setFont(parent.getFont());
  createImpLabel(container);
  createImpTable(container);
  createImpButtons(container);
  return container;
}
origin: org.eclipse/org.eclipse.ui.navigator

private void createDescriptionText(Composite composite) {
  descriptionText = new Text(composite, SWT.WRAP | SWT.V_SCROLL
      | SWT.BORDER);
  descriptionText.setFont(composite.getFont());
  descriptionText.setBackground(composite.getBackground());
  GridData descriptionTextGridData = new GridData(
      GridData.FILL_HORIZONTAL);
  descriptionTextGridData.heightHint = convertHeightInCharsToPixels(3);
  descriptionText.setLayoutData(descriptionTextGridData);
}
origin: org.eclipse/org.eclipse.ui.navigator

protected CustomizationTab(Composite parent,
    INavigatorContentService aContentService) {
  super(parent, SWT.RESIZE);
  contentService = aContentService;
  setFont(getParent().getFont()); 
  setLayout(new GridLayout()); 
  GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); 
  setData(data);
}
origin: org.eclipse/org.eclipse.jdt.ui

public ScrolledPageContent(Composite parent, int style) {
  super(parent, style);
  
  setFont(parent.getFont());
  
  fToolkit= JavaPlugin.getDefault().getDialogsFormToolkit();
  
  setExpandHorizontal(true);
  setExpandVertical(true);
  
  Composite body= new Composite(this, SWT.NONE);
  body.setFont(parent.getFont());
  setContent(body);
}

origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void createControl(Composite parent) {
  Composite composite= new Composite(parent, SWT.NONE);
  composite.setFont(parent.getFont());
  composite.setLayout(new GridLayout(1, false));
  Control control= fBuildPathsBlock.createControl(composite);
  control.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
  Dialog.applyDialogFont(composite);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.NEW_JAVAPROJECT_WIZARD_PAGE);
  setControl(composite);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

protected Composite createPreviewPane(Composite parent) {
  final Composite previewPane= new Composite(parent, SWT.NONE);
  createGridLayout(previewPane, 1, true);
  previewPane.setFont(parent.getFont());
  createLabel(1, previewPane, FormatterMessages.ModifyDialogTabPage_preview_label_text, 0);
  fPreview= new JavaPreview(fWorkingValues, previewPane);
  fPreview.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
  return previewPane;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

public Control createControl(Composite composite) {
  Group workingSetGroup= new Group(composite, SWT.NONE);
  workingSetGroup.setFont(composite.getFont());
  workingSetGroup.setText(NewWizardMessages.NewJavaProjectWizardPageOne_WorkingSets_group);
  workingSetGroup.setLayout(new GridLayout(1, false));
  fWorkingSetBlock.createContent(workingSetGroup);
  return workingSetGroup;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

protected TreeViewer createTreeViewer(Composite parent) {
  Tree tree= new Tree(parent, getTreeStyle());
  tree.setFont(parent.getFont());
  return new TreeViewer(tree);
}
origin: org.eclipse/org.eclipse.ui.editors

private boolean useHeightHint(Composite parent) {
  int fontHeight= (parent.getFont().getFontData())[0].getHeight();
  int displayHeight= parent.getDisplay().getClientArea().height;
  return (displayHeight / fontHeight) > 50;
}
origin: org.eclipse/org.eclipse.jdt.ui

protected TableViewer createTableViewer(Composite parent) {
  Table table= new Table(parent, getListStyle());
  table.setFont(parent.getFont());
  return new TableViewer(table);
}    

origin: org.eclipse.xtext/ui

protected TableViewer createTableViewer(Composite parent) {
  Table table = new Table(parent, getListStyle());
  table.setFont(parent.getFont());
  return new TableViewer(table);
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

static Spinner createSpinner(Composite parentComposite, int minValue, int maxValue) {
  Spinner spinner= new Spinner(parentComposite, SWT.BORDER);
  spinner.setFont(parentComposite.getFont());
  spinner.setMinimum(minValue);
  spinner.setMaximum(maxValue);
  spinner.setLayoutData(createGridData(1, GridData.HORIZONTAL_ALIGN_END, SWT.DEFAULT, 0));
  return spinner;
}
org.eclipse.swt.widgetsCompositegetFont

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
  • getLayout
    Returns layout which is associated with the receiver, or null if one has not been set.
  • setFont
  • getParent
  • computeSize
  • dispose
  • computeSize,
  • dispose,
  • setBackground,
  • getClientArea,
  • isDisposed,
  • getBackground,
  • setVisible,
  • setSize,
  • setData

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
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