本文整理匯總了Java中org.eclipse.swt.custom.SashForm.setBackground方法的典型用法代碼示例。如果您正苦於以下問題:Java SashForm.setBackground方法的具體用法?Java SashForm.setBackground怎麽用?Java SashForm.setBackground使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.custom.SashForm
的用法示例。
在下文中一共展示了SashForm.setBackground方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createContents
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
protected Control createContents(Composite mainComposite) {
this.composite = mainComposite;
initTray();
createApplicationMenu();
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
sashForm = new SashForm(mainComposite, SWT.VERTICAL);
sashForm.setLayout(layout);
sashForm.setLayoutData(layoutData);
sashForm.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
createTopPanel(sashForm);
createBottomPanel(sashForm);
sashForm.setSashWidth(2);
sashForm.setWeights(new int[] {80,20});
if (viewListener != null) {
viewListener.applicationViewDidLoad();
}
return mainComposite;
}
示例2: createParentSash
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
protected Composite createParentSash(Composite parent) {
GridDataFactory.fillDefaults().grab(false, true).applyTo(parent);
SashForm sash = new SashForm(parent, SWT.HORIZONTAL | SWT.SMOOTH);
sash.setBackground(ColorConstants.white);
GridDataFactory.fillDefaults().grab(true, true).applyTo(sash);
GridLayoutFactory.fillDefaults().applyTo(sash);
return sash;
}
示例3: createControls
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
public void createControls(Composite parent) {
parent.setLayout(new FillLayout());
SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL | SWT.SMOOTH);
sashForm.setSashWidth(2);
sashForm.setBackground(sashForm.getDisplay().getSystemColor( SWT.COLOR_GRAY));
sashForm.setLayout(new FillLayout());
Composite leftColumn = getToolkit().createComposite(sashForm);
leftColumn.setLayout(createLeftColumnLayout());
Composite rightColumn = getToolkit().createComposite(sashForm);
rightColumn.setLayout(createRightColumnLayout());
sashForm.setWeights(new int[] { 1, 1 });
createLeftColumnControls(leftColumn);
createRightColumnControls(rightColumn);
}
示例4: ownCreatePartControl
import org.eclipse.swt.custom.SashForm; //導入方法依賴的package包/類
@Override
public void ownCreatePartControl(final Composite c) {
if (getOutput() == null) { return; }
c.setLayout(emptyLayout());
// First create the sashform
form = new SashForm(c, SWT.HORIZONTAL);
form.setLayoutData(fullData());
form.setBackground(IGamaColors.WHITE.color());
form.setSashWidth(8);
decorator.createSidePanel(form);
final Composite centralPanel = new Composite(form, CORE_DISPLAY_BORDER.getValue() ? SWT.BORDER : SWT.NONE);
centralPanel.setLayout(emptyLayout());
setParentComposite(new Composite(centralPanel, SWT.NONE) {
@Override
public boolean setFocus() {
return forceFocus();
}
});
getParentComposite().setLayoutData(fullData());
getParentComposite().setLayout(emptyLayout());
createSurfaceComposite(getParentComposite());
surfaceComposite.setLayoutData(fullData());
getOutput().setSynchronized(getOutput().isSynchronized() || CORE_SYNC.getValue());
form.setMaximizedControl(centralPanel);
decorator.createDecorations(form);
c.layout();
}