Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.FocusAdapter


        group.setText("Parameters"); // Generated
        group.setLayout(gridLayout); // Generated
        label = new Label(group, SWT.NONE);
        label.setText("ID:"); // Generated
        tParamsID = new Text(group, SWT.BORDER);
        tParamsID.addFocusListener(new FocusAdapter() {
          public void focusGained(final FocusEvent e) {
            tParamsID.selectAll();
          }
        });
        tParamsID.setLayoutData(gridData); // Generated
View Full Code Here


        group1.setLayout(gridLayout1); // Generated
        group1.setLayoutData(gridData2); // Generated
        label2 = new Label(group1, SWT.NONE);
        label2.setText("Name:"); // Generated
        tName = new Text(group1, SWT.BORDER);
        tName.addFocusListener(new FocusAdapter() {
          public void focusGained(final FocusEvent e) {
            tName.selectAll();
          }
        });
        tName.setLayoutData(gridData3); // Generated
        tName.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
            public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
                setApplyStatus();
            }
        });
        bApply = new Button(group1, SWT.NONE);
        bApply.setText("Apply Param"); // Generated
        bApply.setLayoutData(gridData8); // Generated
        bApply.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                applyParam();
            }
        });
        label3 = new Label(group1, SWT.NONE);
        label3.setText("Default Value:"); // Generated
        tDefault = new Text(group1, SWT.BORDER);
        tDefault.addFocusListener(new FocusAdapter() {
          public void focusGained(final FocusEvent e) {
            tDefault.selectAll();   
          }
        });
        tDefault.setLayoutData(gridData4); // Generated
        label6 = new Label(group1, SWT.NONE);
        label6.setText("Reference:"); // Generated
        createCReference();
        tDefault.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
            public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
                setApplyStatus();
            }
        });
        label4 = new Label(group1, SWT.NONE);
        label4.setText("Required:"); // Generated
        cRequired = new Button(group1, SWT.CHECK);
        cRequired.setLayoutData(gridData13); // Generated
        cRequired.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                setApplyStatus();
            }
        });
        label5 = new Label(group1, SWT.NONE);
        label5.setText("ID:"); // Generated
        tID = new Text(group1, SWT.BORDER);
        tID.addFocusListener(new FocusAdapter() {
          public void focusGained(final FocusEvent e) {
            tID.selectAll();
          }
        });
        tID.setLayoutData(gridData5); // Generated
View Full Code Here

        gridLayout2.numColumns = 5; // Generated
        group = new Group(this, SWT.NONE);
        label6 = new Label(group, SWT.NONE);
        label6.setText("File:"); // Generated
        tFile = new Text(group, SWT.BORDER);
        tFile.addFocusListener(new FocusAdapter() {
          public void focusGained(final FocusEvent e) {
            tFile.selectAll();
          }
        });
        tFile.setLayoutData(gridData); // Generated
        tFile.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
            public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
                Utils.setBackground(tFile, true);
                setApplyStatus();
            }
        });
        bApply = new Button(group, SWT.NONE);
        bApply.setText("Apply File"); // Generated
        bApply.setLayoutData(gridData4); // Generated
        bApply.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                applyFile();
            }
        });
        label9 = new Label(group, SWT.NONE);
        label9.setText("OS:"); // Generated
        createCOS();
        label10 = new Label(group, SWT.NONE);
        label10.setText("Type:"); // Generated
        createCType();
        group.setLayout(gridLayout2); // Generated
        group.setText("Files"); // Generated
        GridData gridData11 = new GridData(GridData.FILL, GridData.BEGINNING, false, false);
        bNotes = new Button(group, SWT.NONE);
        bNotes.setText("Note..."); // Generated
        bNotes.setLayoutData(gridData11); // Generated
        bNotes.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                String tip = Messages.getTooltip("doc.note.text.files");
                DocumentationForm.openNoteDialog(dom, listener.getFileElement(), "note", tip, true, !listener
                        .isNewFile(),"File Note");
            }
        });
        label11 = new Label(group, SWT.NONE);
        label11.setText("ID:"); // Generated
        tID = new Text(group, SWT.BORDER);
        tID.addFocusListener(new FocusAdapter() {
          public void focusGained(final FocusEvent e) {
            tID.selectAll();
          }
        });
        tID.setLayoutData(gridData1); // Generated
View Full Code Here

      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

         gridLayout_1.horizontalSpacing = 0;
         gridLayout_1.numColumns = 3;
         scriptcom.setLayout(gridLayout_1);

         txtName = new Text(scriptcom, SWT.BORDER);
         txtName.addFocusListener(new FocusAdapter() {
           public void focusGained(final FocusEvent e) {
             txtName.selectAll();
           }
         });
         txtName.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
         txtName.addModifyListener(new ModifyListener() {
           public void modifyText(final ModifyEvent e) {
             if(!init)
               listener.setName(txtName.getText());
           }
         });

         final Label orderingLabel = new Label(scriptcom, SWT.NONE);
         orderingLabel.setLayoutData(new GridData());
         orderingLabel.setText("  Ordering: ");

         spinner = new Spinner(scriptcom, SWT.BORDER);
         spinner.addSelectionListener(new SelectionAdapter() {
           public void widgetSelected(final SelectionEvent e) {
             if(!init)
             listener.setOrdering(String.valueOf(spinner.getSelection()));
           }
         });
         spinner.setSelection(-1);
         spinner.setMaximum(999);
       }
       label14 = new Label(gScript, SWT.NONE);
       label14.setText("Language:");
       createComposite();
       label1 = new Label(gScript, SWT.NONE);
       label1.setText("Classname:");
       new Label(gScript, SWT.NONE);
       tClass = new Text(gScript, SWT.BORDER);
       tClass.addFocusListener(new FocusAdapter() {
         public void focusGained(final FocusEvent e) {
           tClass.selectAll();
         }
       });
       tClass.addVerifyListener(new VerifyListener() {
         public void verifyText(final VerifyEvent e) {
           if(e.text.length() > 0 && bJava.getSelection() && tSource.getText().length() > 0) {
               MainWindow.message("Please remove first Source Code.", SWT.ICON_WARNING);
               e.doit = false;                             
               return;
             }
         }
       });
       tClass.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
       tClass.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
           public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
             if(!init) {
              
               if (bJava.getSelection())
                 listener.setJavaClass(tClass.getText());
               else if (bCom.getSelection())
                 listener.setComClass(tClass.getText());
             }
           }
       });


        butFavorite = new Button(gScript, SWT.NONE);
       
        butFavorite.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(final SelectionEvent e) {
            Options.setProperty("monitor_favorite_" + ( bCom.getSelection() ? "com" : listener.getLanguage(listener.getLanguage())) +"_" + txtName.getText(), getFavoriteValue());
            Options.saveProperties();
             cboFavorite.setItems(normalized(Options.getPropertiesWithPrefix("monitor_favorite_")));
          }
        });
        butFavorite.setEnabled(false);
        butFavorite.setVisible(type == Editor.MONITOR);
        butFavorite.setText("Favorites");
       
        Label lblClasspath = new Label(gScript, SWT.NONE);
        lblClasspath.setText("Class_path");
        Label label_1 = new Label(gScript, SWT.NONE);
        label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
       
        tClasspath = new Text(gScript, SWT.BORDER);
        tClasspath.addModifyListener(new ModifyListener() {
          public void modifyText(ModifyEvent arg0) {
             listener.setClasspath(tClasspath.getText());
          }
        });
        tClasspath.setEnabled(false);
        tClasspath.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        new Label(gScript, SWT.NONE);
       
       
        label3 = new Label(gScript, SWT.NONE);
        label3.setText("Filename:");
        new GridData(GridData.FILL, GridData.FILL, false, true, 3, 1);
        new Label(gScript, SWT.NONE);
        GridData gridData2 = new GridData(GridData.FILL, GridData.CENTER, true, false, 1, 1);
        gridData2.widthHint = 0;
        tFilename = new Text(gScript, SWT.BORDER);
        tFilename.addFocusListener(new FocusAdapter() {
          public void focusGained(final FocusEvent e) {
            tFilename.selectAll();   
          }
        });
        tFilename.setLayoutData(gridData2);
        tFilename.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
            public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
              if(!init)
                listener.setFilename(tFilename.getText());               
            }
        });
        new Label(gScript, SWT.NONE);
        GridLayout gridLayout1 = new GridLayout();
        gridLayout1.marginWidth = 0;
        gridLayout1.marginHeight = 0;
        gridLayout1.numColumns = 3;
        gInclude = new Group(gScript, SWT.NONE);
        gInclude.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false, 4, 1));
        gInclude.setText("Include Files");
        gInclude.setLayout(gridLayout1);

        butIsLifeFile = new Button(gInclude, SWT.CHECK);
        butIsLifeFile.setText("in live Folder");
        tInclude = new Text(gInclude, SWT.BORDER);
        tInclude.addFocusListener(new FocusAdapter() {
          public void focusGained(final FocusEvent e) {
            tFilename.selectAll();
          }
        });
        tInclude.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
View Full Code Here

    group.setLayout(gridLayout);
    label1 = new Label(group, SWT.NONE);
    label1.setLayoutData(new GridData(86, SWT.DEFAULT));
    label1.setText("Process Class:");
    tProcessClass = new Text(group, SWT.BORDER);
    tProcessClass.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
        //tProcessClass.selectAll();
      }
    });
    tProcessClass.addTraverseListener(new TraverseListener() {
      public void keyTraversed(final TraverseEvent e) {
        if(!listener.isValidClass(tProcessClass.getText()) || dom.isLifeElement()) {
           e.doit = false;
           return;
         }
       
        traversed(e);
        /*if (e.keyCode == SWT.CR) {   
          e.doit = false;
          applyClass();
          //setInput(false);
          //bNew.setEnabled(!bApply.getEnabled());
        }*/
      }
    });
    bApply = new Button(group, SWT.NONE);
    label5 = new Label(group, SWT.NONE);
    label5.setText("Max Processes:");
    GridData gridData4 = new GridData(GridData.FILL, GridData.CENTER, false, false);
    gridData4.widthHint = 20;
    sMaxProcesses = new Spinner(group, SWT.NONE);
    sMaxProcesses.addTraverseListener(new TraverseListener() {
      public void keyTraversed(final TraverseEvent e) {
        traversed(e);
        /*if (e.keyCode == SWT.CR) {
          applyClass();

          //bNew.setEnabled(!bApply.getEnabled());
        }*/
      }     
    });
    sMaxProcesses.setMaximum(99999999);
    sMaxProcesses.setLayoutData(gridData4);
    sMaxProcesses.setEnabled(false);
    sMaxProcesses.addKeyListener(new org.eclipse.swt.events.KeyAdapter() {
      public void keyPressed(org.eclipse.swt.events.KeyEvent e) {
        if (e.keyCode == SWT.CR) {
          applyClass();
         
          bNew.setEnabled(!bApply.getEnabled());
        }
      }
    });
    
    sMaxProcesses.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
      public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
        bApply.setEnabled(true);
      }
    });
    label10 = new Label(group, SWT.NONE);
    final GridData gridData_2 = new GridData(GridData.END, GridData.CENTER, false, false);
    gridData_2.widthHint = 79;
    label10.setLayoutData(gridData_2);
    label10.setText("Scheduler ID:");
    tSpoolerID = new Text(group, SWT.BORDER);
    tSpoolerID.addTraverseListener(new TraverseListener() {
      public void keyTraversed(final TraverseEvent e) {
        traversed(e);
        /*if (e.keyCode == SWT.CR) {
          //tSpoolerID.addSelectionListener(getSelectionListener());
       
          applyClass();
         
        }*/
      }
    });
   
    tSpoolerID.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
        tSpoolerID.selectAll();
      }
    });
    tSpoolerID.setLayoutData(new org.eclipse.swt.layout.GridData(GridData.FILL, GridData.CENTER, true, false));
    tSpoolerID.setEnabled(false);
    /*tSpoolerID.addKeyListener(new org.eclipse.swt.events.KeyAdapter() {
      public void keyPressed(org.eclipse.swt.events.KeyEvent e) {
       
        if (e.keyCode == SWT.CR) {
         
          System.out.println("not do it");
          applyClass();
         
          bNew.setEnabled(!bApply.getEnabled());
         
        }
      }
    });
    */
    tSpoolerID.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
      public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
        //System.out.println("modify ");
        bApply.setEnabled(true);
      }
    });
    new Label(group, SWT.NONE);

    final Label remoteExecutionOnLabel = new Label(group, SWT.NONE);
    remoteExecutionOnLabel.setText("Executed by Scheduler on host:");

    tRemoteHost = new Text(group, SWT.BORDER);
    tRemoteHost.addTraverseListener(new TraverseListener() {
      public void keyTraversed(final TraverseEvent e) {
        traversed(e);
        /*if (e.keyCode == SWT.CR) {
          applyClass();

          //bNew.setEnabled(!bApply.getEnabled());
        }*/
      }
    });
    tRemoteHost.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
        tRemoteHost.selectAll();
      }
    });
    tRemoteHost.addModifyListener(new ModifyListener() {
      public void modifyText(final ModifyEvent e) {
        bApply.setEnabled(true);
      }
    });
    tRemoteHost.setEnabled(false);
    /*tRemoteHost.addKeyListener(new KeyAdapter() {
      public void keyPressed(final KeyEvent e) {
        if (e.keyCode == SWT.CR) {
          applyClass();
          bNew.setEnabled(!bApply.getEnabled());         
        }

      }
    });
    */
    tRemoteHost.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

    final Label portLabel = new Label(group, SWT.NONE);
    final GridData gridData_1 = new GridData(GridData.CENTER, GridData.CENTER, false, false);
    gridData_1.horizontalIndent = 5;
    portLabel.setLayoutData(gridData_1);
    portLabel.setText("at Port");

    tRemotePort = new Text(group, SWT.BORDER);
    tRemotePort.addTraverseListener(new TraverseListener() {
      public void keyTraversed(final TraverseEvent e) {
        traversed(e);
        /*if (e.keyCode == SWT.CR) {
          applyClass();

          //bNew.setEnabled(!bApply.getEnabled());
        }*/
      }
    });
    tRemotePort.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
        tRemotePort.selectAll();
      }
    });
    tRemotePort.addModifyListener(new ModifyListener() {
View Full Code Here

      public void widgetSelected(final SelectionEvent e) {
        checkParameter = true;
        showDetails(null);
      }
    });
    butDetails.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
       
        if(checkParameter) {
          listener.fillChains(tChains);
          checkParameter = false;
View Full Code Here

          }
        }
      });
      butDetailsJob.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false));
      butDetailsJob.setText("Parameter");
      butDetailsJob.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
         
          if(checkParameter) {
            listener.fillChain(tNodes);
            checkParameter = false;
          }
           
        }
      });
      butAddMissingNodes = new Button(gNodes, SWT.NONE);
      butAddMissingNodes.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          try {
            if(tNodes.getSelectionCount() > 0) {
              TableItem item = tNodes.getSelection()[0];
              if(!listener.checkForState(item.getText(3))) {
                listener.selectNode(null);

                listener.applyNode(true, item.getText(3), "", "", "", "", false,"", "");

              }

              if(!listener.checkForState(item.getText(4))) {
                listener.selectNode(null);
                listener.applyNode(true, item.getText(4), "", "", "", "", false,"", "");           
              }

              listener.fillChain(tNodes);
              bApplyNode.setEnabled(false);
              bRemoveNode.setEnabled(false);           
              listener.selectNode(null);     
              fillNode(true);
              enableNode(false);
              //listener.applyNode(bFullNode.getSelection() || bEndNode.getSelection(), tState.getText(), cJob.getText(), tDelay.getText(), cNextState.getText(), cErrorState.getText(),bRemoveFile.getSelection(),tMoveTo.getText(), cOnError.getText());
            }
          } catch (Exception ex) {
            try {
              new ErrorLog("error in " + sos.util.SOSClassUtil.getMethodName() , ex);
            } catch(Exception ee) {
              //tu nichts
           
          }
        }
      });
      butAddMissingNodes.setEnabled(false);
      butAddMissingNodes.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      butAddMissingNodes.setText("Add Missing Nodes");

      bRemoveNode = new Button(gNodes, SWT.NONE);
      bRemoveNode.setEnabled(false);
      bRemoveNode.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          if (tNodes.getSelectionCount() > 0) {

            int c = MainWindow.message(getShell(), "Do you want remove the job node from this job chain?", SWT.ICON_QUESTION | SWT.YES | SWT.NO );
            if(c != SWT.YES)
              return;



            int index = tNodes.getSelectionIndex();
            listener.deleteNode(tNodes);
            tNodes.remove(index);
            if (index >= tNodes.getItemCount())
              index--;
            boolean empty = tNodes.getItemCount() == 0;

            fillNode(empty);
            enableNode(!empty);
            bRemoveNode.setEnabled(!empty);
            if (!empty) {
              tNodes.select(index);
              listener.selectNode(tNodes);
            } else {
              listener.selectNode(null);
            }
          }
        }
      });
      bRemoveNode.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
      bRemoveNode.setText("Remove Node");
      gFileOrderSource = new Group(jobChainGroup, SWT.NONE);
      final GridData gridData_10 = new GridData(GridData.FILL, GridData.CENTER, true, false);
      gridData_10.heightHint = 169;
      gFileOrderSource.setLayoutData(gridData_10);
      gFileOrderSource.setText("File Order Source");
      final GridLayout gridLayout_1 = new GridLayout();
      gridLayout_1.marginTop = 5;
      gridLayout_1.marginBottom = 5;
      gridLayout_1.numColumns = 5;
      gFileOrderSource.setLayout(gridLayout_1);

      final Label directoryLabel = new Label(gFileOrderSource, SWT.NONE);
      directoryLabel.setFont(SWTResourceManager.getFont("", 8, SWT.NONE));
      directoryLabel.setText("Directory");

      tDirectory = new Text(gFileOrderSource, SWT.BORDER);
      tDirectory.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          tDirectory.selectAll();
        }
      });
      tDirectory.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyFileOrderSource.setEnabled(isValidSource());
          if (bApplyFileOrderSource.getEnabled())
            getShell().setDefaultButton(bApplyFileOrderSource);
        }
      });
      tDirectory.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {


        }
      });
      tDirectory.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

      final Label delay_after_errorLabel = new Label(gFileOrderSource, SWT.NONE);
      delay_after_errorLabel.setText("Delay after error");


      tDelayAfterError = new Text(gFileOrderSource, SWT.BORDER);
      tDelayAfterError.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          tDelayAfterError.selectAll();
        }
      });
      tDelayAfterError.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyFileOrderSource.setEnabled(isValidSource());
          if (bApplyFileOrderSource.getEnabled())
            getShell().setDefaultButton(bApplyFileOrderSource);

        }
      });
      tDelayAfterError.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

      bApplyFileOrderSource = new Button(gFileOrderSource, SWT.NONE);
      bApplyFileOrderSource.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          applyFileOrderSource();
        }
      });
      bApplyFileOrderSource.setEnabled(false);
      bApplyFileOrderSource.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      bApplyFileOrderSource.setText("Apply File Order Source");

      final Label regexLabel = new Label(gFileOrderSource, SWT.NONE);
      regexLabel.setFont(SWTResourceManager.getFont("", 8, SWT.NONE));
      regexLabel.setText("Regex");


      tRegex = new Text(gFileOrderSource, SWT.BORDER);
      tRegex.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          tRegex.selectAll();   
        }
      });
      tRegex.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyFileOrderSource.setEnabled(isValidSource());
          if (bApplyFileOrderSource.getEnabled())
            getShell().setDefaultButton(bApplyFileOrderSource);
        }
      });
      tRegex.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

      final Label repeatLabel = new Label(gFileOrderSource, SWT.NONE);
      repeatLabel.setText("Repeat");

      tRepeat = new Text(gFileOrderSource, SWT.BORDER);
      tRepeat.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          tRepeat.selectAll();
        }
      });
      tRepeat.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyFileOrderSource.setEnabled(isValidSource());
          if (bApplyFileOrderSource.getEnabled())
            getShell().setDefaultButton(bApplyFileOrderSource);

        }
      });
      tRepeat.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
      new Label(gFileOrderSource, SWT.NONE);

      final Label maxLabel = new Label(gFileOrderSource, SWT.NONE);
      maxLabel.setText("Max");

      tMax = new Text(gFileOrderSource, SWT.BORDER);
      tMax.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          tMax.selectAll();
        }
      });
      tMax.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyFileOrderSource.setEnabled(isValidSource());
          if (bApplyFileOrderSource.getEnabled())
            getShell().setDefaultButton(bApplyFileOrderSource);

        }
      });
      tMax.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

      final Label stateLabel = new Label(gFileOrderSource, SWT.NONE);
      stateLabel.setText("Next state");

      tNextState = new Text(gFileOrderSource, SWT.BORDER);
      tNextState.addFocusListener(new FocusAdapter() {
        public void focusGained(final FocusEvent e) {
          tNextState.selectAll();
        }
      });
      tNextState.addModifyListener(new ModifyListener() {
View Full Code Here

    lblJob = new Label(gDescription, SWT.NONE);
    lblJob.setLayoutData(new GridData(73, SWT.DEFAULT));
    lblJob.setText("Job / Order ID");

    tJob = new Text(gDescription, SWT.BORDER);
    tJob.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
        tJob.selectAll();
      }
    });
    tJob.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
      public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
        if(type == Editor.JOB){
          listener.setJob(tJob.getText());
        } else {
          listener.setOrderId(tJob.getText());
        }

      }
    });
    final GridData gridData_3 = new GridData(GridData.FILL, GridData.CENTER, true, false);
    gridData_3.widthHint = 150;
    tJob.setLayoutData(gridData_3);
    final Label startAtLabel = new Label(gDescription, SWT.NONE);
    startAtLabel.setLayoutData(new GridData());
    startAtLabel.setText("Start at");

    tStartAt = new Text(gDescription, SWT.BORDER);
    tStartAt.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
        tStartAt.selectAll();
      }
    });
    tStartAt.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
      public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
        listener.setAt(tStartAt.getText());

      }
    });   
    final GridData gridData_4 = new GridData(GridData.FILL, GridData.CENTER, true, false);
    gridData_4.widthHint = 150;
    tStartAt.setLayoutData(gridData_4);

    priorityLabel = new Label(gDescription, SWT.NONE);
    final GridData gridData_11 = new GridData();
    priorityLabel.setLayoutData(gridData_11);
    priorityLabel.setText("Priority");

    tPriority = new Text(gDescription, SWT.BORDER);
    tPriority.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
        tPriority.selectAll();
      }
    });
    tPriority.setEnabled(false);
    tPriority.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
      public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
        listener.setPriority(tPriority.getText());

      }
    });
    tPriority.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
    titleLabel = new Label(gDescription, SWT.NONE);
    titleLabel.setLayoutData(new GridData());
    titleLabel.setText("Title");

    tTitle = new Text(gDescription, SWT.BORDER);
    tTitle.addFocusListener(new FocusAdapter() {
      public void focusGained(final FocusEvent e) {
        tTitle.selectAll();   
      }
    });
    tTitle.setEnabled(false);
View Full Code Here

      {
        final Label lblLanguage = new Label(jobGroup, SWT.NONE);
        lblLanguage.setText("Language");
      }
      txtLanguage = new Text(jobGroup, SWT.BORDER);
      txtLanguage.addFocusListener(new FocusAdapter() {
        public void focusLost(final FocusEvent e) {
          if(txtLanguage.getEnabled()) {
            if(txtLanguage.getText() != null && txtLanguage.getText().length() > 0) {
              if(!(txtLanguage.getText().equalsIgnoreCase("") ||
                  txtLanguage.getText().equalsIgnoreCase("java") ||
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.FocusAdapter

Copyright © 2018 www.massapicom. 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.