本文整理了Java中org.eclipse.swt.widgets.Button.moveBelow()
方法的一些代码示例,展示了Button.moveBelow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.moveBelow()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:moveBelow
暂无
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
Button ok= getButton(IDialogConstants.OK_ID);
ok.setText( RefactoringMessages.ChangeExceptionHandler_undo_button);
Button abort= createButton(parent, IDialogConstants.CANCEL_ID, RefactoringMessages.ChangeExceptionHandler_abort_button, true);
abort.moveBelow(ok);
abort.setFocus();
}
@Override
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
Button ok= getButton(IDialogConstants.OK_ID);
ok.setText( RefactoringMessages.ChangeExceptionHandler_undo_button);
Button abort= createButton(parent, IDialogConstants.CANCEL_ID, RefactoringMessages.ChangeExceptionHandler_abort_button, true);
abort.moveBelow(ok);
abort.setFocus();
}
protected Control createMessageArea (Composite parent) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
Button ok= getButton(IDialogConstants.OK_ID);
ok.setText( RefactoringMessages.ChangeExceptionHandler_undo_button);
Button abort= createButton(parent, IDialogConstants.CANCEL_ID, RefactoringMessages.ChangeExceptionHandler_abort_button, true);
abort.moveBelow(ok);
abort.setFocus();
}
@Override
代码示例来源:origin: org.eclipse/org.eclipse.ltk.ui.refactoring
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
Button ok= getButton(IDialogConstants.OK_ID);
ok.setText( RefactoringUIMessages.ChangeExceptionHandler_undo);
Button abort= createButton(parent, IDialogConstants.CANCEL_ID, RefactoringUIMessages.ChangeExceptionHandler_abort, true);
abort.moveBelow(ok);
abort.setFocus();
}
protected Control createMessageArea (Composite parent) {
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
protected void initializeBounds() {
Shell shell = getShell();
if (shell != null) {
if (shell.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
// make the default button the right-most button
Button defaultButton = shell.getDefaultButton();
if (defaultButton != null
&& isContained(buttonBar, defaultButton)) {
defaultButton.moveBelow(null);
((Composite) buttonBar).layout();
}
}
}
super.initializeBounds();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* {@inheritDoc}
* <p>
* The implementation in {@link #Dialog} also moves the
* {@link Shell#getDefaultButton() default button} in the
* {@link #createButtonBar(Composite) button bar} to the right
* if that's required by the
* {@link Display#getDismissalAlignment() platform convention}.
* </p>
*/
@Override
protected void initializeBounds() {
Shell shell = getShell();
if (shell != null) {
if (shell.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
// make the default button the right-most button
Button defaultButton = shell.getDefaultButton();
if (defaultButton != null
&& isContained(buttonBar, defaultButton)) {
defaultButton.moveBelow(null);
defaultButton.getParent().layout();
}
}
}
super.initializeBounds();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* {@inheritDoc}
* <p>
* The implementation in {@link #Dialog} also moves the
* {@link Shell#getDefaultButton() default button} in the
* {@link #createButtonBar(Composite) button bar} to the right
* if that's required by the
* {@link Display#getDismissalAlignment() platform convention}.
* </p>
*/
@Override
protected void initializeBounds() {
// UI guidelines:
// https://developer.gnome.org/hig/stable/dialogs.html.en#primary-buttons
// https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/WindowDialogs.html#//apple_ref/doc/uid/20000957-CH43-SW5
// https://msdn.microsoft.com/en-us/library/windows/desktop/dn742499(v=vs.85).aspx#win_dialog_box_image25
Shell shell = getShell();
if (shell != null) {
if (shell.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
// make the default button the right-most button
Button defaultButton = shell.getDefaultButton();
if (defaultButton != null
&& isContained(buttonBar, defaultButton)) {
defaultButton.moveBelow(null);
defaultButton.getParent().layout();
}
}
}
super.initializeBounds();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* Creates the buttons for this dialog's button bar.
* <p>
* The <code>WizardDialog</code> implementation of this framework method
* prevents the parent composite's columns from being made equal width in
* order to remove the margin between the Back and Next buttons.
* </p>
*
* @param parent
* the parent composite to contain the buttons
*/
@Override
protected void createButtonsForButtonBar(Composite parent) {
((GridLayout) parent.getLayout()).makeColumnsEqualWidth = false;
if (wizard.isHelpAvailable()) {
helpButton = createButton(parent, IDialogConstants.HELP_ID,
IDialogConstants.HELP_LABEL, false);
}
if (wizard.needsPreviousAndNextButtons()) {
createPreviousAndNextButtons(parent);
}
finishButton = createButton(parent, IDialogConstants.FINISH_ID,
IDialogConstants.FINISH_LABEL, true);
cancelButton = createCancelButton(parent);
if (parent.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
// Make the default button the right-most button.
// See also special code in org.eclipse.jface.dialogs.Dialog#initializeBounds()
finishButton.moveBelow(null);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* Creates the buttons for this dialog's button bar.
* <p>
* The <code>WizardDialog</code> implementation of this framework method
* prevents the parent composite's columns from being made equal width in
* order to remove the margin between the Back and Next buttons.
* </p>
*
* @param parent
* the parent composite to contain the buttons
*/
@Override
protected void createButtonsForButtonBar(Composite parent) {
((GridLayout) parent.getLayout()).makeColumnsEqualWidth = false;
if (wizard.isHelpAvailable()) {
helpButton = createButton(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false);
}
if (wizard.needsPreviousAndNextButtons()) {
createPreviousAndNextButtons(parent);
}
finishButton = createButton(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, true);
cancelButton = createCancelButton(parent);
if (parent.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
// Make the default button the right-most button.
// See also special code in org.eclipse.jface.dialogs.Dialog#initializeBounds()
finishButton.moveBelow(null);
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Creates the buttons for this dialog's button bar.
* <p>
* The <code>WizardDialog</code> implementation of this framework method
* prevents the parent composite's columns from being made equal width in
* order to remove the margin between the Back and Next buttons.
* </p>
*
* @param parent
* the parent composite to contain the buttons
*/
protected void createButtonsForButtonBar(Composite parent) {
((GridLayout) parent.getLayout()).makeColumnsEqualWidth = false;
if (wizard.isHelpAvailable()) {
helpButton = createButton(parent, IDialogConstants.HELP_ID,
IDialogConstants.get().HELP_LABEL, false);
}
if (wizard.needsPreviousAndNextButtons()) {
createPreviousAndNextButtons(parent);
}
finishButton = createButton(parent, IDialogConstants.FINISH_ID,
IDialogConstants.get().FINISH_LABEL, true);
cancelButton = createCancelButton(parent);
if (parent.getDisplay().getDismissalAlignment() == SWT.RIGHT) {
// Make the default button the right-most button.
// See also special code in org.eclipse.jface.dialogs.Dialog#initializeBounds()
finishButton.moveBelow(null);
}
}
内容来源于网络,如有侵权,请联系作者删除!