当前位置: 首页>>代码示例>>Java>>正文


Java FormColors类代码示例

本文整理汇总了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);
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:20,代码来源:ScrolledPageContent.java

示例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;
}
 
开发者ID:MEDEVIT,项目名称:ecard,代码行数:25,代码来源:HTMLToolTip.java

示例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);
}
 
开发者ID:Elphel,项目名称:vdt-plugin,代码行数:19,代码来源:ScrolledPageContent.java

示例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;
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:10,代码来源:FluentMkUI.java

示例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;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:10,代码来源:TypeScriptUIPlugin.java

示例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;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:10,代码来源:ScrolledPageContent.java

示例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;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:JavaPlugin.java

示例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);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:BreadcrumbItemDropDown.java

示例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 );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:11,代码来源:BreadcrumbItemDropDown.java

示例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;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:10,代码来源:PydevPlugin.java

示例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);
		}
	}
}
 
开发者ID:blizzy78,项目名称:pathfinder,代码行数:10,代码来源:TrafficDensityOverlay.java

示例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();
		}
	}
 
开发者ID:chrisGerken,项目名称:transformAuthoring,代码行数:33,代码来源:AbstractFormPage.java

示例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;
	}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:42,代码来源:FormToolTip.java

示例15: SwtRapCompatibilityFormToolkit

import org.eclipse.ui.forms.FormColors; //导入依赖的package包/类
public SwtRapCompatibilityFormToolkit(FormColors colors) {
    super(colors);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:4,代码来源:SwtRapCompatibilityFormToolkit.java


注:本文中的org.eclipse.ui.forms.FormColors类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。