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


Java Text.addKeyListener方法代码示例

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


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

示例1: createTitleControl

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
@Override
protected Control createTitleControl(Composite parent) {
	text = new Text(parent, SWT.NONE);

	GridData textLayoutData = new GridData();
	textLayoutData.horizontalAlignment = GridData.FILL;
	textLayoutData.verticalAlignment = GridData.FILL;
	textLayoutData.grabExcessHorizontalSpace = true;
	textLayoutData.grabExcessVerticalSpace = false;
	textLayoutData.horizontalSpan = 2;

	text.setLayoutData(textLayoutData);

	text.addKeyListener(new FilterKeyListener());

	GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(DO_SHOW_DIALOG ? 1 : 2, 1)
			.applyTo(text);

	return text;
}
 
开发者ID:de-jcup,项目名称:eclipse-batch-editor,代码行数:21,代码来源:AbstractFilterableTreeQuickDialog.java

示例2: createComponents

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private void createComponents ()
{
    final FillLayout layout = new FillLayout ( SWT.VERTICAL );
    layout.marginHeight = 12;
    layout.marginWidth = 12;
    setLayout ( layout );

    final Text filterTextField = new Text ( this, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL );
    filterTextField.setText ( this.filter );
    filterTextField.addKeyListener ( new KeyAdapter () {
        @Override
        public void keyReleased ( final KeyEvent e )
        {
            verifyFilter ( filterTextField.getText () );
        }
    } );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:FilterFreeFormComposite.java

示例3: createAttributeText

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private Text createAttributeText ( final String attribute )
{
    final Text t = new Text ( this, SWT.BORDER );
    final Fields field = Fields.byField ( attribute );
    if ( field == null )
    {
        t.setEditable ( true );
        t.setMessage ( Messages.custom_field );
    }
    else
    {
        t.setEditable ( false );
        t.setText ( field.getName () );
    }
    t.addKeyListener ( new KeyAdapter () {
        @Override
        public void keyReleased ( final KeyEvent e )
        {
            AssertionComposite.this.orCondition.updateFilter ();
        };
    } );
    final RowData rowData = new RowData ();
    rowData.width = 132;
    t.setLayoutData ( rowData );
    return t;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:27,代码来源:FilterAdvancedComposite.java

示例4: createValueText

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
private Text createValueText ()
{
    final Text t = new Text ( this, SWT.BORDER );
    t.setMessage ( Messages.argument );
    t.addKeyListener ( new KeyAdapter () {
        @Override
        public void keyReleased ( final KeyEvent e )
        {
            AssertionComposite.this.orCondition.updateFilter ();
        }
    } );
    final RowData rowData = new RowData ();
    rowData.width = 132;
    t.setLayoutData ( rowData );
    return t;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:17,代码来源:FilterAdvancedComposite.java

示例5: createControl

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
protected Control createControl() {
  m_Text = new Text(m_Table, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);
  m_Text.addKeyListener(new KeyAdapter() {
    public void keyPressed(KeyEvent e) {
      try {
        onKeyPressed(e);
      } catch (Exception ex) {
      }
    }
  });
  m_Text.addTraverseListener(new TraverseListener() {
    public void keyTraversed(TraverseEvent arg0) {
      onTraverse(arg0);
    }
  });
  return m_Text;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:18,代码来源:KTableCellEditorMultilineWrapText.java

示例6: createControl

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
protected Control createControl() {
  // System.out.println("Created a new one.");
  m_Text = new Text(m_Table, SWT.NONE);
  m_Text.addKeyListener(new KeyAdapter() {
    public void keyPressed(KeyEvent e) {
      try {
        onKeyPressed(e);
      } catch (Exception ex) {
      }
    }
  });
  m_Text.addTraverseListener(new TraverseListener() {
    public void keyTraversed(TraverseEvent arg0) {
      onTraverse(arg0);
    }
  });
  return m_Text;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:19,代码来源:KTableCellEditorText.java

示例7: createControl

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
protected Control createControl() {
  m_Text = new Text(m_Table, SWT.MULTI | SWT.V_SCROLL);
  m_Text.addKeyListener(new KeyAdapter() {
    public void keyPressed(KeyEvent e) {
      try {
        onKeyPressed(e);
      } catch (Exception ex) {
      }
    }
  });
  m_Text.addTraverseListener(new TraverseListener() {
    public void keyTraversed(TraverseEvent arg0) {
      onTraverse(arg0);
    }
  });
  return m_Text;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:18,代码来源:KTableCellEditorMultilineText.java

示例8: TextValidator

import org.eclipse.swt.widgets.Text; //导入方法依赖的package包/类
public TextValidator(Text control, int position, IInputValidator validator, IValueChangeListener valueChangeListener) {
    this.validator = validator;
    this.valueChangeListener = valueChangeListener;
    this.deco = new ControlDecoration(control, position, control.getParent());
    this.deco.setMarginWidth(2);
    this.errorImg = AvroSchemaEditorActivator.getImage(AvroSchemaEditorImages.ERROR_OVERLAY);
    control.addModifyListener(this);
    control.addFocusListener(this);
    control.addKeyListener(this);
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:11,代码来源:TextValidator.java


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