Examples of convertHorizontalDLUsToPixels()


Examples of org.eclipse.jface.layout.PixelConverter.convertHorizontalDLUsToPixels()

     * @return the width hint
     */
    public static int getButtonWidthHint(Button button) {
        button.setFont(JFaceResources.getDialogFont());
        PixelConverter converter = new PixelConverter(button);
        int widthHint = converter
                .convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
        return Math.max(widthHint, button.computeSize(SWT.DEFAULT,
                SWT.DEFAULT, true).x);
    }

View Full Code Here

Examples of org.eclipse.jface.layout.PixelConverter.convertHorizontalDLUsToPixels()

   * @return the width hint
   */
  public static int getButtonWidthHint(Button button) {
    button.setFont(JFaceResources.getDialogFont());
    PixelConverter converter = new PixelConverter(button);
    int widthHint = converter
        .convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
    return Math.max(widthHint,
        button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
  }

View Full Code Here

Examples of org.eclipse.jface.layout.PixelConverter.convertHorizontalDLUsToPixels()

   * Returns a width hint for a button control.
   */
  public static int getButtonWidthHint(Button button) {
    /*button.setFont(JFaceResources.getDialogFont());*/
    PixelConverter converter= new PixelConverter(button);
    int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
    return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
  }
 
}
View Full Code Here

Examples of org.eclipse.jface.layout.PixelConverter.convertHorizontalDLUsToPixels()

class SWTFactory {

  public static int getButtonWidthHint(Button button) {
    button.setFont(JFaceResources.getDialogFont());
    PixelConverter converter = new PixelConverter(button);
    int widthHint = converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
    return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
  }

  /**
   * Sets width and height hint for the button control. <b>Note:</b> This is a
View Full Code Here

Examples of org.eclipse.jface.layout.PixelConverter.convertHorizontalDLUsToPixels()

class SWTFactory {

  public static int getButtonWidthHint(Button button) {
    button.setFont(JFaceResources.getDialogFont());
    PixelConverter converter = new PixelConverter(button);
    int widthHint = converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
    return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
  }

  /**
   * Sets width and height hint for the button control. <b>Note:</b> This is a
View Full Code Here

Examples of org.eclipse.php.internal.server.ui.PixelConverter.convertHorizontalDLUsToPixels()

    credentialsComposite.setLayoutData(data);
    nameLabel = new Label(credentialsComposite, SWT.NONE);
    nameLabel.setText(PHPServerUIMessages.getString("PHPServerAdvancedTab.4")); //$NON-NLS-1$
    userName = new Text(credentialsComposite, SWT.BORDER | SWT.SINGLE);
    data = new GridData();
    data.widthHint = converter.convertHorizontalDLUsToPixels(150);
    userName.setLayoutData(data);
    passwordLabel = new Label(credentialsComposite, SWT.NONE);
    passwordLabel.setText(PHPServerUIMessages.getString("PHPServerAdvancedTab.5")); //$NON-NLS-1$
    password = new Text(credentialsComposite, SWT.PASSWORD | SWT.BORDER
        | SWT.SINGLE);
View Full Code Here

Examples of org.eclipse.php.internal.server.ui.PixelConverter.convertHorizontalDLUsToPixels()

    passwordLabel = new Label(credentialsComposite, SWT.NONE);
    passwordLabel.setText(PHPServerUIMessages.getString("PHPServerAdvancedTab.5")); //$NON-NLS-1$
    password = new Text(credentialsComposite, SWT.PASSWORD | SWT.BORDER
        | SWT.SINGLE);
    data = new GridData();
    data.widthHint = converter.convertHorizontalDLUsToPixels(150);
    password.setLayoutData(data);
    final Composite testConnectionComposite = new Composite(
        credentialsComposite, SWT.NONE);
    GridLayout layout = new GridLayout(2, false);
    layout.marginWidth = 0;
View Full Code Here

Examples of org.eclipse.php.internal.ui.util.PixelConverter.convertHorizontalDLUsToPixels()

  }

  public static int getButtonWidthHint(final Button button) {
    button.setFont(JFaceResources.getDialogFont());
    final PixelConverter converter = new PixelConverter(button);
    final int widthHint = converter
        .convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
    return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT,
        true).x);
  }
View Full Code Here

Examples of org.erlide.ui.util.PixelConverter.convertHorizontalDLUsToPixels()

        final Object o = button.getLayoutData();
        if (o instanceof GridData) {
            final GridData gd = (GridData) o;
            button.setFont(JFaceResources.getDialogFont());
            final PixelConverter converter = new PixelConverter(button);
            final int widthHint1 = converter
                    .convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
            gd.widthHint = Math.max(widthHint1,
                    button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
            gd.horizontalAlignment = GridData.FILL;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.