本文整理匯總了Java中org.eclipse.swt.graphics.Device.getSystemColor方法的典型用法代碼示例。如果您正苦於以下問題:Java Device.getSystemColor方法的具體用法?Java Device.getSystemColor怎麽用?Java Device.getSystemColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.graphics.Device
的用法示例。
在下文中一共展示了Device.getSystemColor方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DialogLayerViewerToolTip
import org.eclipse.swt.graphics.Device; //導入方法依賴的package包/類
public DialogLayerViewerToolTip(final ContainerCheckedTreeViewer propViewer) {
super(propViewer.getTree());
_propViewer = propViewer;
_tree = propViewer.getTree();
_tree.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(final DisposeEvent e) {
onDispose();
}
});
final Device display = _tree.getDisplay();
_bgColor = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
_fgColor = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
}
示例2: getSystemColor
import org.eclipse.swt.graphics.Device; //導入方法依賴的package包/類
public static Color getSystemColor (Device d, int id) {
if (Utils.isGTK3) {
if (id == SWT.COLOR_INFO_BACKGROUND) {
return ColorCache.getColor(d, 0, 0,0 );
}
if (id == SWT.COLOR_INFO_FOREGROUND) {
return ColorCache.getColor(d, 255, 255,255 );
}
}
return d.getSystemColor(id);
}
示例3: SlideoutMap3LayerTooltip
import org.eclipse.swt.graphics.Device; //導入方法依賴的package包/類
public SlideoutMap3LayerTooltip(final ContainerCheckedTreeViewer layerViewer) {
super(layerViewer.getTree());
_layerViewer = layerViewer;
_tree = _layerViewer.getTree();
final Device display = _tree.getDisplay();
_bgColor = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
_fgColor = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
_cursorHand = new Cursor(display, SWT.CURSOR_HAND);
}