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


Java PixelConverter.convertHeightInCharsToPixels方法代码示例

本文整理汇总了Java中org.eclipse.jface.layout.PixelConverter.convertHeightInCharsToPixels方法的典型用法代码示例。如果您正苦于以下问题:Java PixelConverter.convertHeightInCharsToPixels方法的具体用法?Java PixelConverter.convertHeightInCharsToPixels怎么用?Java PixelConverter.convertHeightInCharsToPixels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.layout.PixelConverter的用法示例。


在下文中一共展示了PixelConverter.convertHeightInCharsToPixels方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDialogArea

import org.eclipse.jface.layout.PixelConverter; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
    Composite comp = (Composite) super.createDialogArea(parent);
    Text filed = new Text(comp, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
            | SWT.READ_ONLY | SWT.MULTI);
    filed.setText(text);
    filed.setBackground(getShell().getDisplay().getSystemColor(
            SWT.COLOR_LIST_BACKGROUND));
    filed.setFont(JFaceResources.getTextFont());
    PixelConverter pc = new PixelConverter(filed);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.widthHint = pc.convertWidthInCharsToPixels(80);
    gd.heightHint = pc.convertHeightInCharsToPixels(30);
    filed.setLayoutData(gd);
    return comp;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:17,代码来源:SQLEditor.java

示例2: addFiller

import org.eclipse.jface.layout.PixelConverter; //导入方法依赖的package包/类
private void addFiller(Composite composite, int horizontalSpan) {
	PixelConverter pixelConverter = new PixelConverter(composite);
	Label filler = new Label(composite, SWT.LEFT);
	GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
	gd.horizontalSpan = horizontalSpan;
	gd.heightHint = pixelConverter.convertHeightInCharsToPixels(1) / 2;
	filler.setLayoutData(gd);
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:9,代码来源:AppearanceConfigurationBlock.java

示例3: getSignImageMaxSize

import org.eclipse.jface.layout.PixelConverter; //导入方法依赖的package包/类
/**
 * @param pc
 * @return Returns the default max size in pixel for a {@link TourSign} image. This is used when
 *         drawing a table column.<br>
 *         When a sign image is drawn in a chart or map, the sign image size from the pref store
 *         {@link ITourbookPreferences#GRAPH_MARKER_SIGN_IMAGE_SIZE} is used. This size is
 *         converted into pixel with the vertical DLU's.
 */
public static int getSignImageMaxSize(final PixelConverter pc) {

	if (_defaultSignImageMaxSize == -1) {
		_defaultSignImageMaxSize = pc.convertHeightInCharsToPixels(3);
	}

	return _defaultSignImageMaxSize;
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:17,代码来源:TourMarker.java

示例4: initUI

import org.eclipse.jface.layout.PixelConverter; //导入方法依赖的package包/类
private void initUI(final Composite parent) {

		final Display display = parent.getDisplay();

		_pc = new PixelConverter(parent);
		_defaultTextWidth = _pc.convertWidthInCharsToPixels(DEFAULT_TEXT_WIDTH);
		_defaultTextHeight = _pc.convertHeightInCharsToPixels(DEFAULT_TEXT_HEIGHT);

		_colorCache = new ColorCache();
		_boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT);
		_fgBorder = display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
		_titleColor = _colorCache.getColor(new RGB(0x50, 0x50, 0x50));
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:14,代码来源:ChartMarkerToolTip.java

示例5: createContents

import org.eclipse.jface.layout.PixelConverter; //导入方法依赖的package包/类
@Override
	protected Control createContents(final Composite parent) {

		_pc = new PixelConverter(parent);

		PROFILE_IMAGE_HEIGHT = (int) (_pc.convertHeightInCharsToPixels(1) * 1.0);

		final Composite ui = createUI(parent);

		fillToolbar();

		restorePrefStore();
		enableControls();

		reloadViewer();
		restoreStateViewer();

		// expand all for doing easier navigation when only the default profiles are defined
//		_colorProfileViewer.expandAll();

		return ui;
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:23,代码来源:PrefPageMap3Color.java

示例6: initUI

import org.eclipse.jface.layout.PixelConverter; //导入方法依赖的package包/类
private void initUI(final Composite parent) {

		_pc = new PixelConverter(parent);

		PROFILE_IMAGE_HEIGHT = (int) (_pc.convertHeightInCharsToPixels(1) * 1.0);

		NUMBER_OF_VISIBLE_ROWS = _prefStore.getInt(ITourbookPreferences.MAP3_NUMBER_OF_COLOR_SELECTORS);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:9,代码来源:DialogSelectMap3Color.java


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