Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Text.addFocusListener()


      gridLayout_1.marginBottom = 10;
      jobGroup.setLayout(gridLayout_1);
   

      final Text txtInfoGlobal = new Text(jobGroup, SWT.READ_ONLY | SWT.WRAP);
      txtInfoGlobal.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          butNext.setFocus();
        }
      });
     
View Full Code Here


        label.setLayoutData(gridData);
        label.setText(getLabelText(paramDef));

        Text textInput = new Text(clientArea, SWT.BORDER);
        textInput.setData(paramDef.name);
        textInput.addFocusListener(new FocusAdapter() {
          @Override
      public void focusGained(FocusEvent e) {
        setErrorMessage(null);
        setMessage(paramDef.help != null ? paramDef.help : "");
      }
View Full Code Here

        if (SyncResources.PASSWORD.equals(propertyName)) {
          textStyle |= SWT.PASSWORD;
        }
        Text textInput = new Text(clientArea, textStyle);
        textInput.setData(propertyName);
        textInput.addFocusListener(new FocusAdapter() {
          @Override
      public void focusGained(FocusEvent e) {
        setErrorMessage(null);
        setMessage(hintText);
      }
View Full Code Here

            label.setLayoutData(gridData);
            label.setText(getLabelText(paramDef));

            Text textInput = new Text(clientArea, SWT.BORDER);
            textInput.setData(paramDef.name);
            textInput.addFocusListener(new FocusAdapter() {
                @Override
                public void focusGained(FocusEvent e) {
                    setErrorMessage(null);
                    setMessage(paramDef.help != null ? paramDef.help : "");
                }
View Full Code Here

      layout.horizontalSpacing = 0;
      c.setLayout(layout);
      final Text ts = new Text(c, SWT.NONE);
      ts.setLayoutData(GridDataFactory.fillDefaults().grab(true, true)
          .create());
      ts.addFocusListener(new FocusListener() {

        ToolBar t;
        private ControlDecoration controlDecoration;

        public void focusLost(FocusEvent e) {
View Full Code Here

                    text.setFocus();

                    text.setText(cursor.getRow().getText(cursor.getColumn()));
                    text.setFocus();

                    text.addFocusListener(new FocusListener() {
                        public void focusLost(FocusEvent event) {
                            cursor.getRow().setText(cursor.getColumn(), text.getText());
                            text.dispose();
                        }
View Full Code Here

                                    break;
                            }
                        }
                    });

                    text.addFocusListener(new FocusListener() {
                        public void focusLost(FocusEvent event) {
                            cursor.getRow().setText(cursor.getColumn(), text.getText());
                            text.dispose();
                        }
View Full Code Here

    final Text searchtext = new Text(container, SWT.BORDER);
    // text.setBounds(100, 50, 70, 20);
    // text.setSize(50, 50);
    searchtext.setLayoutData(searchdata);
    searchtext.setText("Use this field to search any term");
    searchtext.addFocusListener(new FocusAdapter() {
      @Override
      public void focusGained(final FocusEvent event) {
        if (searchtext.getText().equals("Use this field to search any term")) {
          searchtext.setText("");
        }
View Full Code Here

  @Override
  protected Control createControl(Composite parent) {
    final Text searchBox = new Text(parent, SWT.FILL | SWT.BORDER);

    TextUtils.setToDefault(searchBox, "{OpenGrok");
    searchBox.addFocusListener(new FocusListener() {

      @Override
      public void focusLost(FocusEvent e) {
        if (!disableFocusLostEvent) {
          TextUtils.setToDefault(searchBox, "{OpenGrok");
View Full Code Here

    Text text = new Text(parent, borderStyle | style | orientation);
    if (value != null)
      text.setText(value);
    text.setForeground(colors.getForeground());
    text.setBackground(colors.getBackground());
    text.addFocusListener(visibilityHandler);
    return text;
  }

  /**
   * Creates a tree widget as a part of the form.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.