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