当前位置: 首页>>代码示例>>Java>>正文


Java Spinner.addKeyListener方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.Spinner.addKeyListener方法的典型用法代码示例。如果您正苦于以下问题:Java Spinner.addKeyListener方法的具体用法?Java Spinner.addKeyListener怎么用?Java Spinner.addKeyListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.Spinner的用法示例。


在下文中一共展示了Spinner.addKeyListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: LinesPerPageDialog

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private LinesPerPageDialog(Shell parentShell)
{
	shell = new Shell(parentShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
	shell.setText("Lines per Page");
	shell.setLayout(new GridLayout(3, true));

	spinner = new Spinner(shell, 0);
	spinner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	spinner.setValues(bzStyledText.getLinesPerPage(), 0, 225, 0, 1, 10);
	spinner.addKeyListener(this);

	okButton = new Button(shell, SWT.PUSH);
	okButton.setText("OK");
	okButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	okButton.addSelectionListener(this);

	cancelButton = new Button(shell, SWT.PUSH);
	cancelButton.setText("Cancel");
	cancelButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	cancelButton.addSelectionListener(this);

	shell.pack();
	shell.open();
}
 
开发者ID:MikeGray-APH,项目名称:BrailleZephyr,代码行数:25,代码来源:BZMenu.java

示例2: CharsPerLineDialog

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private CharsPerLineDialog(Shell parentShell)
{
	shell = new Shell(parentShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
	shell.setText("Characters Per Line");
	shell.setLayout(new GridLayout(3, true));

	spinner = new Spinner(shell, 0);
	spinner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	spinner.setValues(bzStyledText.getCharsPerLine(), 0, 27720, 0, 1, 10);
	spinner.addKeyListener(this);

	okButton = new Button(shell, SWT.PUSH);
	okButton.setText("OK");
	okButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	okButton.addSelectionListener(this);

	cancelButton = new Button(shell, SWT.PUSH);
	cancelButton.setText("Cancel");
	cancelButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	cancelButton.addSelectionListener(this);

	shell.pack();
	shell.open();
}
 
开发者ID:MikeGray-APH,项目名称:BrailleZephyr,代码行数:25,代码来源:BZMenu.java

示例3: LineMarginBellDialog

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private LineMarginBellDialog(Shell parentShell)
{
	shell = new Shell(parentShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
	shell.setText("Bell Margin");
	shell.setLayout(new GridLayout(3, true));

	spinner = new Spinner(shell, 0);
	spinner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	spinner.setValues(bzStyledText.getLineMarginBell(), 0, 27720, 0, 1, 10);
	spinner.addKeyListener(this);

	okButton = new Button(shell, SWT.PUSH);
	okButton.setText("OK");
	okButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	okButton.addSelectionListener(this);

	cancelButton = new Button(shell, SWT.PUSH);
	cancelButton.setText("Cancel");
	cancelButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	cancelButton.addSelectionListener(this);

	shell.pack();
	shell.open();
}
 
开发者ID:MikeGray-APH,项目名称:BrailleZephyr,代码行数:25,代码来源:BZMenu.java

示例4: PageMarginBellDialog

import org.eclipse.swt.widgets.Spinner; //导入方法依赖的package包/类
private PageMarginBellDialog(Shell parentShell)
{
	shell = new Shell(parentShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
	shell.setText("Bell Page");
	shell.setLayout(new GridLayout(3, true));

	spinner = new Spinner(shell, 0);
	spinner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	spinner.setValues(bzStyledText.getPageMarginBell(), 0, 27720, 0, 1, 10);
	spinner.addKeyListener(this);

	okButton = new Button(shell, SWT.PUSH);
	okButton.setText("OK");
	okButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	okButton.addSelectionListener(this);

	cancelButton = new Button(shell, SWT.PUSH);
	cancelButton.setText("Cancel");
	cancelButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	cancelButton.addSelectionListener(this);

	shell.pack();
	shell.open();
}
 
开发者ID:MikeGray-APH,项目名称:BrailleZephyr,代码行数:25,代码来源:BZMenu.java


注:本文中的org.eclipse.swt.widgets.Spinner.addKeyListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。