本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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