本文整理匯總了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