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


Java CSSEngine类代码示例

本文整理汇总了Java中org.eclipse.e4.ui.css.core.engine.CSSEngine的典型用法代码示例。如果您正苦于以下问题:Java CSSEngine类的具体用法?Java CSSEngine怎么用?Java CSSEngine使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CSSEngine类属于org.eclipse.e4.ui.css.core.engine包,在下文中一共展示了CSSEngine类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getElement

import org.eclipse.e4.ui.css.core.engine.CSSEngine; //导入依赖的package包/类
@Override
public Element getElement(Object element, CSSEngine engine) {
	if (element instanceof Checkbox) {
		return new CheckColorElementAdapter((Checkbox) element, engine);
	}
	return null;
}
 
开发者ID:vogellacompany,项目名称:swt-custom-widgets,代码行数:8,代码来源:CustomWidgetProvider.java

示例2: applyCSSProperty

import org.eclipse.e4.ui.css.core.engine.CSSEngine; //导入依赖的package包/类
@Override
public boolean applyCSSProperty( Object element, String property, CSSValue value, String pseudo, CSSEngine engine )
  throws Exception
{
  if( mustApply( element ) ) {
    doApplyCssProperty( extractScrollable( element ), property, value );
  }
  return false;
}
 
开发者ID:fappel,项目名称:xiliary,代码行数:10,代码来源:ScrollableAdapterContribution.java

示例3: applyCSSProperty

import org.eclipse.e4.ui.css.core.engine.CSSEngine; //导入依赖的package包/类
@Override
public boolean applyCSSProperty( Object element, String property, CSSValue value, String pseudo, CSSEngine engine )
    throws Exception
{
  if( mustApply( element, property ) ) {
    doApplyCssProperty( extractControl( element ), property, value );
  }
  return false;
}
 
开发者ID:fappel,项目名称:xiliary,代码行数:10,代码来源:TopLevelWindowAttributeContribution.java

示例4: applyCSSProperty

import org.eclipse.e4.ui.css.core.engine.CSSEngine; //导入依赖的package包/类
public boolean applyCSSProperty(Object element, String property,
			CSSValue value, String pseudo, CSSEngine engine) throws Exception {
		final Widget widget = SWTElementHelpers.getWidget(element);
		final Display display = widget.getDisplay();
		final Color color = (Color) engine.convert(value, Color.class, display);
		if (widget instanceof Button ) {
			final Button b = (Button) widget;
			if ((b.getStyle() & SWT.PUSH)!=0) {
				
			b.addPaintListener(new PaintListener() {
				@Override
				public void paintControl(PaintEvent e) {
					b.setBackground(color);
					e.gc.setBackground(color);
					e.gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
					e.gc.fillRoundRectangle(0, 0, 
							b.getBounds().width,
							b.getBounds().height, 
							2, 2);
//					e.gc.drawRoundRectangle(0, 0, 
//							b.getBounds().width,
//							b.getBounds().height, 
//							2, 2);
					e.gc.drawString(b.getText(),5,5);
				}
			});
			return true;
			}
		}
		return false;

	}
 
开发者ID:jvanzyl,项目名称:eclipse.darker.theme,代码行数:33,代码来源:CSSPropertyDarkerButtonBackgroundColorHandler.java

示例5: CheckColorElementAdapter

import org.eclipse.e4.ui.css.core.engine.CSSEngine; //导入依赖的package包/类
public CheckColorElementAdapter(Composite composite, CSSEngine engine) {
	super(composite, engine);
}
 
开发者ID:vogellacompany,项目名称:swt-custom-widgets,代码行数:4,代码来源:CheckColorElementAdapter.java

示例6: retrieveCSSProperty

import org.eclipse.e4.ui.css.core.engine.CSSEngine; //导入依赖的package包/类
@Override
public String retrieveCSSProperty( Object element, String property, String pseudo, CSSEngine engine )
  throws Exception
{
  return null;
}
 
开发者ID:fappel,项目名称:xiliary,代码行数:7,代码来源:ScrollableAdapterContribution.java

示例7: retrieveCSSProperty

import org.eclipse.e4.ui.css.core.engine.CSSEngine; //导入依赖的package包/类
public String retrieveCSSProperty(Object element, String property,
		String pseudo, CSSEngine engine) throws Exception {
	//NOTE: not used now
	return null;
}
 
开发者ID:jvanzyl,项目名称:eclipse.darker.theme,代码行数:6,代码来源:CSSPropertyDarkerButtonBackgroundColorHandler.java


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