本文整理了Java中org.eclipse.swt.widgets.Table.setBackground()
方法的一些代码示例,展示了Table.setBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setBackground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:setBackground
暂无
代码示例来源:origin: anb0s/LogViewer
protected Table createEmptyTable(Composite composite, int horizontalSpan)
{
Table table = new Table(composite, SWT.None);
GridData gridData = new GridData();
gridData.horizontalSpan = horizontalSpan;
gridData.verticalSpan = 1;
gridData.widthHint = 1;
gridData.heightHint = 1;
table.setLayoutData(gridData);
table.setBackground (composite.getBackground());
return table;
}
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
private void setBackgroundColor(Color background) {
fTableViewer.getTable().setBackground(background);
fFilterText.setBackground(background);
fComposite.setBackground(background);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
private void setBackgroundColor(Color background) {
fTableViewer.getTable().setBackground(background);
fFilterText.setBackground(background);
fComposite.setBackground(background);
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
public void setBackground (Color color) {
super.setBackground(color);
table.setBackground(color);
if (sizeImage != null) {
GC gc = new GC (sizeImage);
gc.setBackground(getBackground());
Rectangle size = sizeImage.getBounds();
gc.fillRectangle(size);
gc.dispose();
}
}
public void setEnabled (boolean enabled) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
public void setBackground (Color color) {
super.setBackground(color);
table.setBackground(color);
if (sizeImage != null) {
GC gc = new GC (sizeImage);
gc.setBackground(getBackground());
Rectangle size = sizeImage.getBounds();
gc.fillRectangle(size);
gc.dispose();
}
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
public void setBackground (Color color) {
super.setBackground(color);
table.setBackground(color);
if (sizeImage != null) {
GC gc = new GC (sizeImage);
gc.setBackground(getBackground());
Rectangle size = sizeImage.getBounds();
gc.fillRectangle(size);
gc.dispose();
}
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
public void setBackground (Color color) {
super.setBackground(color);
table.setBackground(color);
if (sizeImage != null) {
GC gc = new GC (sizeImage);
gc.setBackground(getBackground());
Rectangle size = sizeImage.getBounds();
gc.fillRectangle(size);
gc.dispose();
}
}
@Override
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
@Override
public void setBackground (Color color) {
super.setBackground(color);
table.setBackground(color);
if (sizeImage != null) {
GC gc = new GC (sizeImage);
gc.setBackground(getBackground());
Rectangle size = sizeImage.getBounds();
gc.fillRectangle(size);
gc.dispose();
}
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui
protected void updateWidgetsEnabled(ILaunchConfigurationWorkingCopy workingCopy) {
if (wrappingComposite == null) {
return;
}
boolean isSeparateJREBuild = AntUtil.isSeparateJREAntBuild(workingCopy);
Color tableColor = isSeparateJREBuild ? null : Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
Color labelColor = isSeparateJREBuild ? null : Display.getDefault().getSystemColor(SWT.COLOR_RED);
Table table = environmentTable.getTable();
table.setEnabled(isSeparateJREBuild);
table.setBackground(tableColor);
warningLabel.setForeground(labelColor);
envAddButton.setEnabled(isSeparateJREBuild);
envSelectButton.setEnabled(isSeparateJREBuild);
updateAppendReplace();
// update the enabled state of the edit and remove buttons
environmentTable.setSelection(environmentTable.getSelection());
}
}
代码示例来源:origin: BiglySoftware/BiglyBT
final Table table = new Table(composite, SWT.V_SCROLL
| SWT.H_SCROLL | SWT.FULL_SELECTION | SWT.SINGLE);
table.setBackground(composite.getBackground());
table.addSelectionListener(new SelectionListener() {
代码示例来源:origin: org.eclipse.recommenders.extdoc/rcp
table.setBackground(ExtdocUtils.createColor(SWT.COLOR_INFO_BACKGROUND));
table.setLayoutData(GridDataFactory.fillDefaults().indent(10, 0).create());
final TableColumn column1 = new TableColumn(table, SWT.NONE);
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.bindings
GridData gridData = new GridData(GridData.FILL_BOTH);
completionsTable.setLayoutData(gridData);
completionsTable.setBackground(parent.getBackground());
completionsTable.setLinesVisible(true);
代码示例来源:origin: org.eclipse.e4.ui/bindings
GridData gridData = new GridData(GridData.FILL_BOTH);
completionsTable.setLayoutData(gridData);
completionsTable.setBackground(parent.getBackground());
completionsTable.setLinesVisible(true);
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.css.swt
@Override
public void reset() {
TableItem tableItem = getTableItem();
Table parent = tableItem.getParent();
if (!parent.isDisposed()) {
parent.setForeground(null);
parent.setBackground(null);
CSSSWTFontHelper.restoreDefaultFont(parent);
}
tableItem.setForeground(null);
tableItem.setBackground(null);
CSSSWTImageHelper.restoreDefaultImage(tableItem);
tableItem.setFont(null); // in such case the parent's font will be taken
super.reset();
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
private void deferredCreateContent(Composite parent) {
fTable= new Table(parent, SWT.SINGLE | SWT.FULL_SELECTION);
fTable.setLinesVisible(false);
fTable.setHeaderVisible(false);
fTable.setForeground(fForegroundColor);
fTable.setBackground(fBackgroundColor);
fTable.setFont(JFaceResources.getDialogFont());
GridData data= new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
fTable.setLayoutData(data);
final TableViewer viewer= new TableViewer(fTable);
viewer.setContentProvider(new LinkContentProvider());
viewer.setLabelProvider(new LinkLabelProvider());
viewer.setInput(fInput);
fTable.setSelection(0);
registerTableListeners();
getShell().addShellListener(new ShellAdapter() {
@Override
public void shellActivated(ShellEvent e) {
if (viewer.getTable().getSelectionCount() == 0) {
viewer.getTable().setSelection(0);
}
viewer.getTable().setFocus();
}
});
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
private void deferredCreateContent(Composite parent) {
fTable= new Table(parent, SWT.SINGLE | SWT.FULL_SELECTION);
fTable.setLinesVisible(false);
fTable.setHeaderVisible(false);
fTable.setForeground(fForegroundColor);
fTable.setBackground(fBackgroundColor);
fTable.setFont(JFaceResources.getDialogFont());
GridData data= new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
fTable.setLayoutData(data);
final TableViewer viewer= new TableViewer(fTable);
viewer.setContentProvider(new LinkContentProvider());
viewer.setLabelProvider(new LinkLabelProvider());
viewer.setInput(fInput);
fTable.setSelection(0);
registerTableListeners();
getShell().addShellListener(new ShellAdapter() {
@Override
public void shellActivated(ShellEvent e) {
if (viewer.getTable().getSelectionCount() == 0) {
viewer.getTable().setSelection(0);
}
viewer.getTable().setFocus();
}
});
}
代码示例来源:origin: org.eclipse.recommenders.extdoc/rcp
public static Table renderMethodDirectivesBlock(final Composite parent, final TreeBag<IMethodName> methods,
final int total, final EventBus bus, final JavaElementResolver resolver, final String middlePhrase) {
final Table table = new Table(parent, SWT.NONE | SWT.HIDE_SELECTION);
table.setBackground(createColor(COLOR_INFO_BACKGROUND));
table.setForeground(createColor(COLOR_INFO_FOREGROUND));
table.setLayoutData(GridDataFactory.fillDefaults().indent(10, 0).create());
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
if (c == null)
c= control.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND);
fContextSelectorTable.setBackground(c);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
if (c == null)
c= control.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND);
fContextSelectorTable.setBackground(c);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
fProposalTable.setBackground(c);
内容来源于网络,如有侵权,请联系作者删除!