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

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

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

Table.setBackground介绍

暂无

代码示例

代码示例来源:origin: anb0s/LogViewer

  1. protected Table createEmptyTable(Composite composite, int horizontalSpan)
  2. {
  3. Table table = new Table(composite, SWT.None);
  4. GridData gridData = new GridData();
  5. gridData.horizontalSpan = horizontalSpan;
  6. gridData.verticalSpan = 1;
  7. gridData.widthHint = 1;
  8. gridData.heightHint = 1;
  9. table.setLayoutData(gridData);
  10. table.setBackground (composite.getBackground());
  11. return table;
  12. }

代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt

  1. private void setBackgroundColor(Color background) {
  2. fTableViewer.getTable().setBackground(background);
  3. fFilterText.setBackground(background);
  4. fComposite.setBackground(background);
  5. }

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

  1. private void setBackgroundColor(Color background) {
  2. fTableViewer.getTable().setBackground(background);
  3. fFilterText.setBackground(background);
  4. fComposite.setBackground(background);
  5. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. public void setBackground (Color color) {
  2. super.setBackground(color);
  3. table.setBackground(color);
  4. if (sizeImage != null) {
  5. GC gc = new GC (sizeImage);
  6. gc.setBackground(getBackground());
  7. Rectangle size = sizeImage.getBounds();
  8. gc.fillRectangle(size);
  9. gc.dispose();
  10. }
  11. }
  12. public void setEnabled (boolean enabled) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. @Override
  2. public void setBackground (Color color) {
  3. super.setBackground(color);
  4. table.setBackground(color);
  5. if (sizeImage != null) {
  6. GC gc = new GC (sizeImage);
  7. gc.setBackground(getBackground());
  8. Rectangle size = sizeImage.getBounds();
  9. gc.fillRectangle(size);
  10. gc.dispose();
  11. }
  12. }
  13. @Override

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. @Override
  2. public void setBackground (Color color) {
  3. super.setBackground(color);
  4. table.setBackground(color);
  5. if (sizeImage != null) {
  6. GC gc = new GC (sizeImage);
  7. gc.setBackground(getBackground());
  8. Rectangle size = sizeImage.getBounds();
  9. gc.fillRectangle(size);
  10. gc.dispose();
  11. }
  12. }
  13. @Override

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. @Override
  2. public void setBackground (Color color) {
  3. super.setBackground(color);
  4. table.setBackground(color);
  5. if (sizeImage != null) {
  6. GC gc = new GC (sizeImage);
  7. gc.setBackground(getBackground());
  8. Rectangle size = sizeImage.getBounds();
  9. gc.fillRectangle(size);
  10. gc.dispose();
  11. }
  12. }
  13. @Override

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. @Override
  2. public void setBackground (Color color) {
  3. super.setBackground(color);
  4. table.setBackground(color);
  5. if (sizeImage != null) {
  6. GC gc = new GC (sizeImage);
  7. gc.setBackground(getBackground());
  8. Rectangle size = sizeImage.getBounds();
  9. gc.fillRectangle(size);
  10. gc.dispose();
  11. }
  12. }
  13. @Override

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

  1. protected void updateWidgetsEnabled(ILaunchConfigurationWorkingCopy workingCopy) {
  2. if (wrappingComposite == null) {
  3. return;
  4. }
  5. boolean isSeparateJREBuild = AntUtil.isSeparateJREAntBuild(workingCopy);
  6. Color tableColor = isSeparateJREBuild ? null : Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
  7. Color labelColor = isSeparateJREBuild ? null : Display.getDefault().getSystemColor(SWT.COLOR_RED);
  8. Table table = environmentTable.getTable();
  9. table.setEnabled(isSeparateJREBuild);
  10. table.setBackground(tableColor);
  11. warningLabel.setForeground(labelColor);
  12. envAddButton.setEnabled(isSeparateJREBuild);
  13. envSelectButton.setEnabled(isSeparateJREBuild);
  14. updateAppendReplace();
  15. // update the enabled state of the edit and remove buttons
  16. environmentTable.setSelection(environmentTable.getSelection());
  17. }
  18. }

代码示例来源:origin: BiglySoftware/BiglyBT

  1. final Table table = new Table(composite, SWT.V_SCROLL
  2. | SWT.H_SCROLL | SWT.FULL_SELECTION | SWT.SINGLE);
  3. table.setBackground(composite.getBackground());
  4. table.addSelectionListener(new SelectionListener() {

代码示例来源:origin: org.eclipse.recommenders.extdoc/rcp

  1. table.setBackground(ExtdocUtils.createColor(SWT.COLOR_INFO_BACKGROUND));
  2. table.setLayoutData(GridDataFactory.fillDefaults().indent(10, 0).create());
  3. final TableColumn column1 = new TableColumn(table, SWT.NONE);

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

  1. GridData gridData = new GridData(GridData.FILL_BOTH);
  2. completionsTable.setLayoutData(gridData);
  3. completionsTable.setBackground(parent.getBackground());
  4. completionsTable.setLinesVisible(true);

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

  1. GridData gridData = new GridData(GridData.FILL_BOTH);
  2. completionsTable.setLayoutData(gridData);
  3. completionsTable.setBackground(parent.getBackground());
  4. completionsTable.setLinesVisible(true);

代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.css.swt

  1. @Override
  2. public void reset() {
  3. TableItem tableItem = getTableItem();
  4. Table parent = tableItem.getParent();
  5. if (!parent.isDisposed()) {
  6. parent.setForeground(null);
  7. parent.setBackground(null);
  8. CSSSWTFontHelper.restoreDefaultFont(parent);
  9. }
  10. tableItem.setForeground(null);
  11. tableItem.setBackground(null);
  12. CSSSWTImageHelper.restoreDefaultImage(tableItem);
  13. tableItem.setFont(null); // in such case the parent's font will be taken
  14. super.reset();
  15. }
  16. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

  1. private void deferredCreateContent(Composite parent) {
  2. fTable= new Table(parent, SWT.SINGLE | SWT.FULL_SELECTION);
  3. fTable.setLinesVisible(false);
  4. fTable.setHeaderVisible(false);
  5. fTable.setForeground(fForegroundColor);
  6. fTable.setBackground(fBackgroundColor);
  7. fTable.setFont(JFaceResources.getDialogFont());
  8. GridData data= new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
  9. fTable.setLayoutData(data);
  10. final TableViewer viewer= new TableViewer(fTable);
  11. viewer.setContentProvider(new LinkContentProvider());
  12. viewer.setLabelProvider(new LinkLabelProvider());
  13. viewer.setInput(fInput);
  14. fTable.setSelection(0);
  15. registerTableListeners();
  16. getShell().addShellListener(new ShellAdapter() {
  17. @Override
  18. public void shellActivated(ShellEvent e) {
  19. if (viewer.getTable().getSelectionCount() == 0) {
  20. viewer.getTable().setSelection(0);
  21. }
  22. viewer.getTable().setFocus();
  23. }
  24. });
  25. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

  1. private void deferredCreateContent(Composite parent) {
  2. fTable= new Table(parent, SWT.SINGLE | SWT.FULL_SELECTION);
  3. fTable.setLinesVisible(false);
  4. fTable.setHeaderVisible(false);
  5. fTable.setForeground(fForegroundColor);
  6. fTable.setBackground(fBackgroundColor);
  7. fTable.setFont(JFaceResources.getDialogFont());
  8. GridData data= new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
  9. fTable.setLayoutData(data);
  10. final TableViewer viewer= new TableViewer(fTable);
  11. viewer.setContentProvider(new LinkContentProvider());
  12. viewer.setLabelProvider(new LinkLabelProvider());
  13. viewer.setInput(fInput);
  14. fTable.setSelection(0);
  15. registerTableListeners();
  16. getShell().addShellListener(new ShellAdapter() {
  17. @Override
  18. public void shellActivated(ShellEvent e) {
  19. if (viewer.getTable().getSelectionCount() == 0) {
  20. viewer.getTable().setSelection(0);
  21. }
  22. viewer.getTable().setFocus();
  23. }
  24. });
  25. }

代码示例来源:origin: org.eclipse.recommenders.extdoc/rcp

  1. public static Table renderMethodDirectivesBlock(final Composite parent, final TreeBag<IMethodName> methods,
  2. final int total, final EventBus bus, final JavaElementResolver resolver, final String middlePhrase) {
  3. final Table table = new Table(parent, SWT.NONE | SWT.HIDE_SELECTION);
  4. table.setBackground(createColor(COLOR_INFO_BACKGROUND));
  5. table.setForeground(createColor(COLOR_INFO_FOREGROUND));
  6. table.setLayoutData(GridDataFactory.fillDefaults().indent(10, 0).create());

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

  1. if (c == null)
  2. c= control.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND);
  3. fContextSelectorTable.setBackground(c);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

  1. if (c == null)
  2. c= control.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND);
  3. fContextSelectorTable.setBackground(c);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

  1. fProposalTable.setBackground(c);

相关文章

Table类方法