FormData fdOK = (FormData) wOK.getLayoutData(); FormData fdHelpButton = new FormData(); fdHelpButton.top = fdOK.top;
@Override protected void adjustForNumColumns(int numColumns) { if (style == SEPARATE_LABEL) { numColumns--; } ((GridData) checkBox.getLayoutData()).horizontalSpan = numColumns; }
@Override protected void adjustForNumColumns(int numColumns) { if (style == SEPARATE_LABEL) { numColumns--; } ((GridData) checkBox.getLayoutData()).horizontalSpan = numColumns; }
protected void adjustForNumColumns(int numColumns) { if (style == SEPARATE_LABEL) { numColumns--; } ((GridData) checkBox.getLayoutData()).horizontalSpan = numColumns; }
/** * Hide the button if hide is <code>true</code>. * * @param button * @param hide */ private void hideButton(Button button, boolean hide) { ((GridData) button.getLayoutData()).exclude = hide; button.setVisible(!hide); button.setEnabled(!hide); }
public static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object gd= button.getLayoutData(); if (gd instanceof GridData) { ((GridData)gd).widthHint= getButtonWidthHint(button); } }
@Override protected void adjustForNumColumns(int numColumns) { ((GridData) colorSelector.getButton().getLayoutData()).horizontalSpan = numColumns - 1; }
@Override protected void adjustForNumColumns(int numColumns) { ((GridData) colorSelector.getButton().getLayoutData()).horizontalSpan = numColumns - 1; }
private static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object gd = button.getLayoutData(); if (gd instanceof GridData) { ((GridData) gd).widthHint = getButtonWidthHint(button); ((GridData) gd).horizontalAlignment = GridData.FILL; } }
public static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object data= button.getLayoutData(); if (data instanceof GridData) { ((GridData) data).widthHint= getButtonWidthHint(button); ((GridData) data).horizontalAlignment= GridData.FILL; } }
/** * Sets width for the button control. * <b>Note:</b> This is a NOP if the button's layout data is not * an instance of <code>GridData</code>. * * @param button a button for which to set the dimension hint */ public static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object gd= button.getLayoutData(); if (gd instanceof GridData) { ((GridData)gd).widthHint= getButtonWidthHint(button); } }
/** * Sets width and height hint for the button control. * <b>Note:</b> This is a NOP if the button's layout data is not * an instance of <code>GridData</code>. * * @param button the button for which to set the dimension hint */ public static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object gd= button.getLayoutData(); if (gd instanceof GridData) { ((GridData)gd).widthHint= getButtonWidthHint(button); ((GridData)gd).horizontalAlignment = GridData.FILL; } }
/** * Sets width and height hint for the button control. * <b>Note:</b> This is a NOP if the button's layout data is not * an instance of <code>GridData</code>. * * @param the button for which to set the dimension hint */ public static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object gd= button.getLayoutData(); if (gd instanceof GridData) { ((GridData)gd).widthHint= getButtonWidthHint(button); ((GridData)gd).horizontalAlignment = GridData.FILL; } }
/** * Sets width and height hint for the button control. * <b>Note:</b> This is a NOP if the button's layout data is not * an instance of <code>GridData</code>. * * @param button the button for which to set the dimension hint */ public static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object gd= button.getLayoutData(); if (gd instanceof GridData) { ((GridData)gd).widthHint= getButtonWidthHint(button); ((GridData)gd).horizontalAlignment = GridData.FILL; } }
/** * Sets width and height hint for the button control. * <b>Note:</b> This is a NOP if the button's layout data is not * an instance of <code>GridData</code>. * * @param button the button for which to set the dimension hint */ public static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object gd= button.getLayoutData(); if (gd instanceof GridData) { ((GridData)gd).widthHint= getButtonWidthHint(button); ((GridData)gd).horizontalAlignment = GridData.FILL; } }
/** * Sets width and height hint for the button control. <b>Note:</b> This is a * NOP if the button's layout data is not an instance of * <code>GridData</code>. * * @param button * the button for which to set the dimension hint */ public static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object gd = button.getLayoutData(); if (gd instanceof GridData) { ((GridData) gd).widthHint = getButtonWidthHint(button); ((GridData) gd).horizontalAlignment = GridData.FILL; } }
/** * Sets the text of the change button. * * @param text the new text */ public void setChangeButtonText(String text) { Assert.isNotNull(text); changeButtonText = text; if (changeButton != null) { changeButton.setText(text); Point prefSize = changeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT); GridData data = (GridData)changeButton.getLayoutData(); data.widthHint = Math.max(SWT.DEFAULT, prefSize.x); } }
/** * Sets width and height hint for the button control. * <b>Note:</b> This is a NOP if the button's layout data is not * an instance of <code>GridData</code>. * * @param button the button for which to set the dimension hint */ public static void setButtonDimensionHint(Button button) { Assert.isNotNull(button); Object gd= button.getLayoutData(); if (gd instanceof GridData) { ((GridData)gd).widthHint= getButtonWidthHint(button); ((GridData)gd).horizontalAlignment = GridData.FILL; } }
@Override protected void setButtonLayoutData(Button button) { super.setButtonLayoutData(button); Object data= button.getLayoutData(); if (data instanceof GridData) { GridData gridData= (GridData) data; gridData.widthHint+= button.getText().length(); button.setLayoutData(gridData); } } }
/** * Sets width and height hint for the button control. <b>Note:</b> This is a * NOP if the button's layout data is not an instance of * <code>GridData</code>. * * @param button for which to set the dimension hint */ public static void setButtonDimensionHint(Button button) { Dialog.applyDialogFont(button); Assert.isNotNull(button); Object gd = button.getLayoutData(); if (gd instanceof GridData) { ((GridData) gd).widthHint = getButtonWidthHint(button); } }