本文整理了Java中org.eclipse.swt.widgets.Button.getLayoutData()
方法的一些代码示例,展示了Button.getLayoutData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.getLayoutData()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:getLayoutData
暂无
代码示例来源:origin: pentaho/pentaho-kettle
FormData fdOK = (FormData) wOK.getLayoutData();
FormData fdHelpButton = new FormData();
fdHelpButton.top = fdOK.top;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
protected void adjustForNumColumns(int numColumns) {
if (style == SEPARATE_LABEL) {
numColumns--;
}
((GridData) checkBox.getLayoutData()).horizontalSpan = numColumns;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
protected void adjustForNumColumns(int numColumns) {
if (style == SEPARATE_LABEL) {
numColumns--;
}
((GridData) checkBox.getLayoutData()).horizontalSpan = numColumns;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
protected void adjustForNumColumns(int numColumns) {
if (style == SEPARATE_LABEL) {
numColumns--;
}
((GridData) checkBox.getLayoutData()).horizontalSpan = numColumns;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
/**
* 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);
}
代码示例来源:origin: cbeust/testng-eclipse
public static void setButtonDimensionHint(Button button) {
Assert.isNotNull(button);
Object gd= button.getLayoutData();
if (gd instanceof GridData) {
((GridData)gd).widthHint= getButtonWidthHint(button);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
protected void adjustForNumColumns(int numColumns) {
((GridData) colorSelector.getButton().getLayoutData()).horizontalSpan = numColumns - 1;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
protected void adjustForNumColumns(int numColumns) {
((GridData) colorSelector.getButton().getLayoutData()).horizontalSpan = numColumns - 1;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
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;
}
}
代码示例来源:origin: org.eclipse/org.eclipse.ltk.ui.refactoring
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;
}
}
代码示例来源:origin: oyse/yedit
/**
* 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);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
/**
* 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;
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
/**
* 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;
}
}
代码示例来源:origin: org.eclipse/org.eclipse.search
/**
* 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;
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.search
/**
* 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;
}
}
代码示例来源:origin: org.eclipse.xtext/ui
/**
* 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;
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* 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);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor
/**
* 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;
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@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);
}
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
/**
* 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);
}
}
内容来源于网络,如有侵权,请联系作者删除!