Java Code Examples for org.eclipse.jface.dialogs.Dialog#convertWidthInCharsToPixels()

The following examples show how to use org.eclipse.jface.dialogs.Dialog#convertWidthInCharsToPixels() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PixelConverter.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public int convertWidthInCharsToPixels(int chars) {
	return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
}
 
Example 2
Source File: PixelConverter.java    From APICloud-Studio with GNU General Public License v3.0 4 votes vote down vote up
public int convertWidthInCharsToPixels(int chars) {
	return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
}
 
Example 3
Source File: PixelConverter.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int convertWidthInCharsToPixels(int chars) {
	return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
}
 
Example 4
Source File: PixelConverter.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
public int convertWidthInCharsToPixels( int chars )
{
	return Dialog.convertWidthInCharsToPixels( fFontMetrics, chars );
}
 
Example 5
Source File: JavaEditorAppearanceConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 3 votes vote down vote up
/**
 * Returns the number of pixels corresponding to the width 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
 */
protected int convertWidthInCharsToPixels(int chars) {
    // test for failure to initialize for backward compatibility
    if (fFontMetrics == null)
        return 0;
    return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
}
 
Example 6
Source File: JavaEditorColoringConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 3 votes vote down vote up
/**
* Returns the number of pixels corresponding to the width 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 convertWidthInCharsToPixels(int chars) {
      // test for failure to initialize for backward compatibility
      if (fFontMetrics == null)
          return 0;
      return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
  }