當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。