本文整理汇总了Java中org.eclipse.ui.forms.FormColors类的典型用法代码示例。如果您正苦于以下问题:Java FormColors类的具体用法?Java FormColors怎么用?Java FormColors使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FormColors类属于org.eclipse.ui.forms包,在下文中一共展示了FormColors类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ScrolledPageContent
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
public ScrolledPageContent(Composite parent, int style)
{
super(parent, style);
setFont(parent.getFont());
FormColors colors = new FormColors(parent.getDisplay());
colors.setBackground(null);
colors.setForeground(null);
fToolkit = new FormToolkit(colors);
setExpandHorizontal(true);
setExpandVertical(true);
Composite body = new Composite(this, SWT.NONE);
body.setFont(parent.getFont());
setContent(body);
}
示例2: createToolTipContentArea
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
@Override
protected Composite createToolTipContentArea(Event event, Composite parent){
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
FormColors colors = toolkit.getColors();
Form form = toolkit.createForm(parent);
GridLayout layout = new GridLayout();
layout.numColumns = 1;
form.getBody().setLayout(layout);
FormText text = toolkit.createFormText(form.getBody(), true);
GridData td = new GridData();
td.heightHint = 200;
td.widthHint = 300;
text.setLayoutData(td);
try {
text.setText("<form>"+m_htmlString+"</form>", true, true);
} catch (IllegalArgumentException e) {
text.setText("<form><p>Fehlerhafter ToolTip Eingabestring</p><br /></form>", true, true);
}
return parent;
}
示例3: ScrolledPageContent
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
public ScrolledPageContent(Composite parent, int style) {
super(parent, style);
setFont(parent.getFont());
FormColors colors= new FormColors(parent.getDisplay());
colors.setBackground(null);
colors.setForeground(null);
fToolkit= new FormToolkit(colors);
setExpandHorizontal(true);
setExpandVertical(true);
Composite body= new Composite(this, SWT.NONE);
body.setFont(parent.getFont());
setContent(body);
}
示例4: AppEngineDeployPreferencesPanel
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
public AppEngineDeployPreferencesPanel(Composite parent, IProject project,
IGoogleLoginService loginService, Runnable layoutChangedHandler, boolean requireValues,
ProjectRepository projectRepository, DeployPreferences model) {
super(parent, SWT.NONE);
this.project = project;
this.layoutChangedHandler = Preconditions.checkNotNull(layoutChangedHandler);
this.requireValues = requireValues;
this.projectRepository = projectRepository;
this.model = model;
FormColors colors = new FormColors(getDisplay());
colors.setBackground(null);
colors.setForeground(null);
formToolkit = new FormToolkit(colors);
createCredentialSection(loginService);
createProjectIdSection();
setupAccountEmailDataBinding();
setupProjectSelectorDataBinding();
createCenterArea();
createAdvancedSection();
setupTextFieldDataBinding(bucket, "bucket", new BucketNameValidator());
observables.addObservablesFromContext(bindingContext, true, true);
Dialog.applyDialogFont(this);
GridLayoutFactory.swtDefaults().numColumns(2).applyTo(this);
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:32,代码来源:AppEngineDeployPreferencesPanel.java
示例5: getDialogsFormToolkit
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
public FormToolkit getDialogsFormToolkit() {
if (dialogsFormToolkit == null) {
FormColors colors = new FormColors(Display.getCurrent());
colors.setBackground(null);
colors.setForeground(null);
dialogsFormToolkit = new FormToolkit(colors);
}
return dialogsFormToolkit;
}
示例6: getDialogsFormToolkit
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
public FormToolkit getDialogsFormToolkit() {
if (fDialogsFormToolkit == null) {
FormColors colors = new FormColors(Display.getCurrent());
colors.setBackground(null);
colors.setForeground(null);
fDialogsFormToolkit = new FormToolkit(colors);
}
return fDialogsFormToolkit;
}
示例7: getFormToolkit
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
private static FormToolkit getFormToolkit() {
if (toolkit == null) {
FormColors colors = new FormColors(Display.getCurrent());
colors.setBackground(null);
colors.setForeground(null);
toolkit = new FormToolkit(colors);
}
return toolkit;
}
示例8: getDialogsFormToolkit
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
public FormToolkit getDialogsFormToolkit() {
if (fDialogsFormToolkit == null) {
FormColors colors= new FormColors(Display.getCurrent());
colors.setBackground(null);
colors.setForeground(null);
fDialogsFormToolkit= new FormToolkit(colors);
}
return fDialogsFormToolkit;
}
示例9: createColor
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
private Color createColor(int color1, int color2, int ratio, Display display) {
RGB rgb1= display.getSystemColor(color1).getRGB();
RGB rgb2= display.getSystemColor(color2).getRGB();
RGB blend= FormColors.blend(rgb2, rgb1, ratio);
return new Color(display, blend);
}
示例10: createColor
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
private Color createColor( int color1, int color2, int ratio,
Display display )
{
RGB rgb1 = display.getSystemColor( color1 ).getRGB( );
RGB rgb2 = display.getSystemColor( color2 ).getRGB( );
RGB blend = FormColors.blend( rgb2, rgb1, ratio );
return new Color( display, blend );
}
示例11: getDialogsFormToolkit
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
public FormToolkit getDialogsFormToolkit() {
if (fDialogsFormToolkit == null) {
FormColors colors = new FormColors(Display.getCurrent());
colors.setBackground(null);
colors.setForeground(null);
fDialogsFormToolkit = new FormToolkit(colors);
}
return fDialogsFormToolkit;
}
示例12: initColors
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
private void initColors() {
if (colors == null) {
colors = new Color[COLOR_STEPS];
for (int i = 0; i < COLOR_STEPS; i++) {
RGB rgb = FormColors.blend(RED, GREEN, Math.min((int) Math.round(i * (100d / COLOR_STEPS)), 100));
colors[i] = colorRegistry.getColor(rgb);
}
}
}
示例13: createFormContent
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
protected void createFormContent(IManagedForm managedForm) {
final ScrolledForm form = managedForm.getForm();
//form.setBackgroundImage(PDEPlugin.getDefault().getLabelProvider().get(
// PDEPluginImages.DESC_FORM_BANNER));
FormToolkit toolkit = managedForm.getToolkit();
FormColors colors = toolkit.getColors();
form.getForm().setSeparatorColor(colors.getColor(FormColors.TB_BORDER));
if (newStyleHeader) {
colors.initializeSectionToolBarColors();
Color gbg = colors.getColor(FormColors.TB_GBG);
Color bg = colors.getBackground();
form.getForm().setTextBackground(new Color[]{bg, gbg}, new int [] {100}, true);
form.getForm().setSeparatorVisible(true);
}
final String href = getHelpResource();
if (href != null) {
IToolBarManager manager = form.getToolBarManager();
Action helpAction = new Action("help") { //$NON-NLS-1$
public void run() {
BusyIndicator.showWhile(form.getDisplay(), new Runnable() {
public void run() {
PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(href);
}
});
}
};
helpAction.setToolTipText("Help");
// helpAction.setImageDescriptor(PDEPluginImages.DESC_HELP);
manager.add(helpAction);
form.updateToolBar();
}
}
示例14: createToolTipContentArea
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
protected Composite createToolTipContentArea(Event event, Composite parent) {
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
FormColors colors = toolkit.getColors();
Color top = colors.getColor(IFormColors.H_GRADIENT_END);
Color bot = colors.getColor(IFormColors.H_GRADIENT_START);
// create the base form
Form form = toolkit.createForm(parent);
form.setText(title);
form.setTextBackground(new Color[] { top, bot }, new int[] { 100 }, true);
FormLayout layout = new FormLayout();
layout.marginTop = 10;
layout.marginBottom = 10;
layout.marginLeft = 10;
layout.marginRight = 10;
form.getBody().setLayout(layout);
// Scrolled text
ScrolledFormText scrolledFormText = new ScrolledFormText(form.getBody(), true);
FormText text = toolkit.createFormText(scrolledFormText, true);
scrolledFormText.setAlwaysShowScrollBars(false);
StringBuilder builder = new StringBuilder();
for (final String currentText : texts) {
builder.append("<p>").append(currentText).append("</p>");
}
text.setText(String.format("<form>%s</form>", builder.toString()), true, false);
FormData data = new FormData();
data.left = new FormAttachment(0, 0);
data.right = new FormAttachment(100);
scrolledFormText.setLayoutData(data);
scrolledFormText.setFormText(text);
scrolledFormText.setBackground(ColorConstants.white);
return parent;
}
示例15: SwtRapCompatibilityFormToolkit
import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
public SwtRapCompatibilityFormToolkit(FormColors colors) {
super(colors);
}