/** * Returns the number of pixels corresponding to the height of the given * number of characters. * * @param chars * the number of characters * @return the number of pixels */ public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fontMetrics, chars); }
/** * Returns the number of pixels corresponding to the height of the given * number of characters. * * @param chars * the number of characters * @return the number of pixels */ public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fontMetrics, chars); }
/** * @see org.eclipse.jface.dialogs.DialogPage#convertHeightInCharsToPixels(int) */ public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
/** * Returns the number of pixels corresponding to the height of the given * number of characters. * * @param chars * the number of characters * @return the number of pixels */ public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
protected int convertHeightInCharsToPixels(int dlus) { return Dialog.convertHeightInCharsToPixels(fm, dlus); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
public int convertHeightInCharsToPixels(int chars) { return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
/** * Returns the number of pixels corresponding to the height of the given number of characters. * <p> * This method may only be called after <code>initializeDialogUnits</code> has been called. * </p> * <p> * Clients may call this framework method, but should not override it. * </p> * * @param chars the number of characters * @return the number of pixels */ private int convertHeightInCharsToPixels(int chars) { // test for failure to initialize for backward compatibility if (fFontMetrics == null) return 0; return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars); }
private static void createSpace(Composite parent) { Label vfiller = new Label(parent, SWT.LEFT); GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gridData.horizontalSpan= 2; GC gc = new GC(parent); gridData.heightHint = Dialog.convertHeightInCharsToPixels(gc.getFontMetrics(), 1) / 2; gc.dispose(); vfiller.setLayoutData(gridData); }
private void createUIWidgetFilterText(Composite parent) { // Create the widget fFilterText = new Text(parent, SWT.NONE); // Set the font GC gc = new GC(parent); gc.setFont(parent.getFont()); FontMetrics fontMetrics = gc.getFontMetrics(); gc.dispose(); // Create the layout GridData data = new GridData(GridData.FILL_HORIZONTAL); data.heightHint = Dialog.convertHeightInCharsToPixels(fontMetrics, 1); data.horizontalAlignment = GridData.FILL; data.verticalAlignment = GridData.CENTER; fFilterText.setLayoutData(data); }
protected int computeHeightLimit(Control control, int nchars) { GC gc = new GC(control); gc.setFont(control.getFont()); FontMetrics fontMetrics = gc.getFontMetrics(); gc.dispose(); return Dialog.convertHeightInCharsToPixels(fontMetrics, nchars); }