org.eclipse.swt.widgets.Tree.setFont()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(158)

本文整理了Java中org.eclipse.swt.widgets.Tree.setFont()方法的一些代码示例,展示了Tree.setFont()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.setFont()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:setFont

Tree.setFont介绍

暂无

代码示例

代码示例来源:origin: org.eclipse/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.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.scout.sdk.deps/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.platform/org.eclipse.debug.ui

Tree tree = fSelectedViewer.getTree();
tree.setLayoutData(new GridData(GridData.FILL_BOTH));
tree.setFont(parent.getFont());
fSelectedViewer.addDoubleClickListener(new IDoubleClickListener() {
  @Override

代码示例来源:origin: org.eclipse/org.eclipse.jdt.debug.ui

private void createThreadViewer(Composite parent) {
  Label label= new Label(parent, SWT.NONE);
  label.setText(PropertyPageMessages.ThreadFilterEditor_1); 
  label.setFont(parent.getFont());
  label.setLayoutData(new GridData());
  
  GridData data= new GridData(GridData.FILL_BOTH);
  data.heightHint= 100;
  fThreadViewer= new CheckboxTreeViewer(parent, SWT.BORDER);
  fThreadViewer.addCheckStateListener(fCheckHandler);
  fThreadViewer.getTree().setLayoutData(data);
  fThreadViewer.getTree().setFont(parent.getFont());
  fThreadViewer.setContentProvider(fContentProvider);
  fThreadViewer.setLabelProvider(DebugUITools.newDebugModelPresentation());
  fThreadViewer.setInput(DebugPlugin.getDefault().getLaunchManager());
  setInitialCheckedState();
}

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

atree.setFont(comp.getFont());
atree.setLayout(new GridLayout());
GridData gd = new GridData(GridData.FILL_BOTH);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

/**
 *    Create this group's tree viewer.
 */
protected void createTreeViewer(Composite parent, int width, int height) {
  Tree tree = new Tree(parent, SWT.CHECK | SWT.BORDER);
  GridData data = new GridData(GridData.FILL_BOTH);
  data.widthHint = width;
  data.heightHint = height;
  tree.setLayoutData(data);
  tree.setFont(parent.getFont());
  treeViewer = new CheckboxTreeViewer(tree);
  treeViewer.setContentProvider(treeContentProvider);
  treeViewer.setLabelProvider(treeLabelProvider);
  treeViewer.addTreeListener(this);
  treeViewer.addCheckStateListener(this);
  treeViewer.addSelectionChangedListener(this);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

@Override
protected Control createDialogArea(Composite parent) {
  Composite composite = (Composite) super.createDialogArea(parent);
  Label messageLabel = createMessageArea(composite);
  TreeViewer treeViewer = createTreeViewer(composite);
  GridData data = new GridData(GridData.FILL_BOTH);
  data.widthHint = convertWidthInCharsToPixels(fWidth);
  data.heightHint = convertHeightInCharsToPixels(fHeight);
  Tree treeWidget = treeViewer.getTree();
  treeWidget.setLayoutData(data);
  treeWidget.setFont(parent.getFont());
  if (fIsEmpty) {
    messageLabel.setEnabled(false);
    treeWidget.setEnabled(false);
  }
  return composite;
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

treeWidget.setFont(composite.getFont());

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

/**
 *    Create this group's tree viewer.
 */
private void createTreeViewer(Composite parent, boolean useHeightHint) {
  Tree tree = new Tree(parent, SWT.CHECK | SWT.BORDER);
  GridData data = new GridData(GridData.FILL_BOTH);
  if (useHeightHint) {
    data.heightHint = PREFERRED_HEIGHT;
  }
  tree.setLayoutData(data);
  tree.setFont(parent.getFont());
  treeViewer = new CheckboxTreeViewer(tree);
  treeViewer.setUseHashlookup(true);
  treeViewer.setContentProvider(treeContentProvider);
  treeViewer.setLabelProvider(treeLabelProvider);
  treeViewer.addTreeListener(treeListener);
  treeViewer.addCheckStateListener(checkListener);
  treeViewer.addSelectionChangedListener(selectionListener);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

treeWidget.setFont(composite.getFont());

代码示例来源:origin: org.eclipse/org.eclipse.ui.editors

/**
 * Create this block's tree viewer.
 *
 * @param parent the parent control
 * @param useHeightHint if <code>true</code> use the height hints
 */
private void createTreeViewer(Composite parent, boolean useHeightHint) {
  Tree tree= new Tree(parent, SWT.CHECK | SWT.BORDER);
  GridData data= new GridData(GridData.FILL_BOTH);
  if (useHeightHint)
    data.heightHint= PREFERRED_HEIGHT;
  tree.setLayoutData(data);
  tree.setFont(parent.getFont());
  treeViewer= new CheckboxTreeViewer(tree);
  treeViewer.setUseHashlookup(true);
  treeViewer.setContentProvider(treeContentProvider);
  treeViewer.setLabelProvider(treeLabelProvider);
  treeViewer.addTreeListener(this);
  treeViewer.addCheckStateListener(this);
  treeViewer.addSelectionChangedListener(this);
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

treeWidget.setFont(composite.getFont());

代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui

private void createClasspathTree(Composite parent) {
  Tree tree = new Tree(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
  GridData data = new GridData(GridData.FILL_BOTH);
  data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
  data.heightHint = tree.getItemHeight();
  tree.setLayoutData(data);
  tree.setFont(parent.getFont());
  tree.addKeyListener(new KeyAdapter() {
    @Override
    public void keyPressed(KeyEvent event) {
      if (event.character == SWT.DEL && event.stateMask == 0) {
        remove();
      }
    }
  });
  antContentProvider = new AntClasspathContentProvider();
  treeViewer = new TreeViewer(tree);
  treeViewer.setContentProvider(antContentProvider);
  treeViewer.setLabelProvider(labelProvider);
  treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
    @Override
    public void selectionChanged(SelectionChangedEvent event) {
      tableSelectionChanged((IStructuredSelection) event.getSelection(), (AntClasspathContentProvider) treeViewer.getContentProvider());
    }
  });
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.editors

/**
 * Create this block's tree viewer.
 *
 * @param parent the parent control
 * @param useHeightHint if <code>true</code> use the height hints
 */
private void createTreeViewer(Composite parent, boolean useHeightHint) {
  Tree tree= new Tree(parent, SWT.CHECK | SWT.BORDER);
  GridData data= new GridData(GridData.FILL_BOTH);
  if (useHeightHint)
    data.heightHint= PREFERRED_HEIGHT;
  data.widthHint= getViewerWidthHint(parent);
  tree.setLayoutData(data);
  tree.setFont(parent.getFont());
  treeViewer= new CheckboxTreeViewer(tree);
  treeViewer.setUseHashlookup(true);
  treeViewer.setContentProvider(treeContentProvider);
  treeViewer.setLabelProvider(treeLabelProvider);
  treeViewer.addTreeListener(this);
  treeViewer.addCheckStateListener(this);
  treeViewer.addSelectionChangedListener(this);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

@Override
protected Control createDialogArea(Composite parent) {
  Composite composite = (Composite) super.createDialogArea(parent);
  Label messageLabel = createMessageArea(composite);
  CheckboxTreeViewer treeViewer = createTreeViewer(composite);
  Control buttonComposite = createSelectionButtons(composite);
  GridData data = new GridData(GridData.FILL_BOTH);
  data.widthHint = convertWidthInCharsToPixels(fWidth);
  data.heightHint = convertHeightInCharsToPixels(fHeight);
  Tree treeWidget = treeViewer.getTree();
  treeWidget.setLayoutData(data);
  treeWidget.setFont(parent.getFont());
  if (fIsEmpty) {
    messageLabel.setEnabled(false);
    treeWidget.setEnabled(false);
    buttonComposite.setEnabled(false);
  }
  return composite;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

SWT.COLOR_WIDGET_BACKGROUND));
treeViewer.getTree().setFont(parent.getFont());

代码示例来源:origin: org.eclipse/org.eclipse.wst.server.ui

treeTable.setLinesVisible(false);
treeTable.setLayoutData(new GridData(GridData.FILL_BOTH));
treeTable.setFont(parent.getFont());
PlatformUI.getWorkbench().getHelpSystem().setHelp(treeTable, ContextIds.VIEW_SERVERS);

代码示例来源:origin: org.eclipse.equinox.p2/ui

final TreeViewer availableIUViewer = filteredTree.getViewer();
availableIUViewer.getTree().setFont(parent.getFont());
filteredTree.getFilterControl().setFont(parent.getFont());

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

filterView.setContentProvider(filterViewContentProvider);
filterView.setInput(filters);
filterView.getTree().setFont(parent.getFont());

相关文章

Tree类方法