本文整理了Java中com.arjuna.ats.internal.arjuna.recovery.Listener.<init>()
方法的一些代码示例,展示了Listener.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Listener.<init>()
方法的具体详情如下:
包路径:com.arjuna.ats.internal.arjuna.recovery.Listener
类名称:Listener
方法名:<init>
[英]Creates a listener thread on the specified port for the specified service to run.
[中]在指定端口上为要运行的指定服务创建侦听器线程。
代码示例来源:origin: stackoverflow.com
public static void main( String[] args ) {
Display display = new Display();
Shell shell = new Shell( display );
shell.setLayout( new FillLayout() );
final Table table = new Table( shell, SWT.VIRTUAL );
table.setItemCount( 10000 );
table.addListener( SWT.SetData, new Listener() {
public void handleEvent( Event event ) {
TableItem item = (TableItem)event.item;
item.setText( "Item " + table.indexOf( item ) );
}
} );
shell.setSize( 300, 500 );
shell.open();
while( !shell.isDisposed() ) {
if( !display.readAndDispatch() ) {
display.sleep();
}
}
display.dispose();
}
代码示例来源:origin: stackoverflow.com
composite.addListener(SWT.Resize, new Listener() {
public void handleEvent(Event e) {
changeImage();
try {
shell.setSize(200, 100);
shell.setLayout(new FillLayout());
createComponents(shell);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
if (!shell.isDisposed()) {
shell.dispose();
代码示例来源:origin: stackoverflow.com
shell.setLayout(new GridLayout(1, false));
shell.setText("Hide Label");
button.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
Button b = (Button) e.widget;
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
final Color orig = shell.getBackground();
display.addFilter(SWT.KeyDown, new Listener() {
shell.open ();
while (!shell.isDisposed()) {
if (!display.readAndDispatch ()) display.sleep ();
display.dispose ();
代码示例来源:origin: stackoverflow.com
final Shell shell = new Shell(display);
shell.setText("StackOverflow");
shell.setLayout(new GridLayout(1, true));
hideButton.addListener(SWT.Selection, new Listener()
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new GridLayout(1, false));
text.addListener(SWT.MouseUp, new Listener() {
text.addListener(SWT.KeyUp, new Listener() {
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
display.dispose ();
代码示例来源:origin: stackoverflow.com
final Shell shell = new Shell(display);
shell.setText("StackOverflow");
shell.setLayout(new GridLayout(1, false));
text.addListener(SWT.Traverse, new Listener()
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
shell.setLayout(new GridLayout(1, false));
shell.setText("StackOverflow");
combo.add("Second");
Listener listener = new Listener()
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
public static void main(String[] args)
{
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout(1, false));
Text text = new Text(shell, SWT.BORDER);
text.addListener(SWT.KeyDown, new Listener()
{
@Override
public void handleEvent(Event e)
{
if ((e.stateMask & SWT.CTRL) == SWT.CTRL && e.keyCode == 'c')
{
e.doit = false;
}
}
});
shell.setSize(1000, 400);
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
代码示例来源:origin: stackoverflow.com
shell.setLayout(new FillLayout(SWT.VERTICAL));
text.addListener(SWT.FocusOut, new Listener()
text.addListener(SWT.FocusIn, new Listener()
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setLayout(new GridLayout());
shell.addListener(SWT.DragDetect, new Listener() {
@Override
public void handleEvent(Event event) {
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
final Shell shell = new Shell(display);
shell.setText("StackOverflow");
shell.setLayout(new GridLayout(1, false));
text.addListener(SWT.Verify, new Listener()
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
shell.setLayout(new GridLayout(2, false));
right.setLayoutData(rightData);
shell.addListener(SWT.Resize, new Listener()
shell.open();
shell.layout();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
public static void main(String[] args)
{
Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("StackOverflow");
shell.setLayout(new GridLayout(1, true));
final Combo combo = new Combo(shell, SWT.NONE);
combo.addListener(SWT.KeyUp, new Listener()
{
@Override
public void handleEvent(Event arg0)
{
if(arg0.character == SWT.CR)
MessageDialog.openInformation(shell, "Input", "You entered: " + combo.getText());
}
});
shell.pack();
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
代码示例来源:origin: stackoverflow.com
shell.setLayout(new GridLayout(1, true));
button.addListener(SWT.Selection, new Listener()
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
shell.setLayout(new FillLayout());
text.addListener(SWT.Traverse, new Listener()
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
final Shell shell = new Shell(display);
shell.setText("StackOverflow");
shell.setLayout(new GridLayout());
text.addListener(SWT.MouseUp, new Listener()
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
shell.setLayout(new GridLayout(2, false));
right.setLayoutData(rightData);
shell.addListener(SWT.Resize, new Listener()
shell.open();
shell.layout();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
Shell shell = new Shell();
shell.setText("StackOverflow");
shell.setLayout(new GridLayout(1, false));
text.addListener(SWT.Verify, new Listener()
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
代码示例来源:origin: stackoverflow.com
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new RowLayout(SWT.VERTICAL));
tfPaste.addListener(SWT.Verify, new Listener() {
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
display.dispose();
内容来源于网络,如有侵权,请联系作者删除!