Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Combo


    private void createCReference() {
        GridData gridData6 = new GridData();
        gridData6.horizontalAlignment = GridData.FILL; // Generated
        gridData6.grabExcessHorizontalSpace = true; // Generated
        gridData6.verticalAlignment = GridData.CENTER; // Generated
        cReference = new Combo(group1, SWT.NONE);
        cReference.setLayoutData(gridData6); // Generated
        cReference.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent e) {
                setApplyStatus();
            }
View Full Code Here


    private void createCOS() {
        GridData gridData2 = new GridData();
        gridData2.horizontalAlignment = GridData.FILL; // Generated
        gridData2.grabExcessHorizontalSpace = true; // Generated
        gridData2.verticalAlignment = GridData.CENTER; // Generated
        cOS = new Combo(group, SWT.READ_ONLY);
        cOS.setLayoutData(gridData2); // Generated
        cOS.addSelectionListener(new org.eclipse.swt.events.SelectionListener() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                setApplyStatus();
            }
View Full Code Here

    private void createCType() {
        GridData gridData3 = new GridData();
        gridData3.horizontalAlignment = GridData.FILL; // Generated
        gridData3.grabExcessHorizontalSpace = true; // Generated
        gridData3.verticalAlignment = GridData.CENTER; // Generated
        cType = new Combo(group, SWT.READ_ONLY);
        cType.setLayoutData(gridData3); // Generated
        cType.addSelectionListener(new org.eclipse.swt.events.SelectionListener() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                setApplyStatus();
            }
View Full Code Here

        GridData gridData4 = new GridData();
        gridData4.widthHint = 100; // Generated
        label2 = new Label(group1, SWT.NONE);
        label2.setLayoutData(new GridData());
        label2.setText("Type:"); // Generated
        cType = new Combo(group1, SWT.READ_ONLY);
        cType.setLayoutData(gridData4); // Generated
        cType.addSelectionListener(new org.eclipse.swt.events.SelectionListener() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
                setApplyResStatus();
            }
View Full Code Here

            final GridLayout gridLayout_1 = new GridLayout();
            group.setLayout(gridLayout_1);
            weekdayTabItem.setControl(group);

            {
              comboWeekDay = new Combo(group, SWT.NONE);
              comboWeekDay.setItems(DaysListener.getWeekdays());             
              createPeriodForm(JobAssistentPeriodForms.WEEK_DAY, group, weekdayTabItem);               
              comboWeekDay.addSelectionListener(new SelectionAdapter() {
                public void widgetSelected(final SelectionEvent e) {

                  discardChanges();
                  if(comboWeekDay.getText() == null || comboWeekDay.getText().length() == 0)
                    return;
                  getListener()
                  addPeriodButton.setEnabled(true);
                  bApply = JobAssistentPeriodForms.WEEK_DAY;
                }
              });
              comboWeekDay.setLayoutData(new GridData(GridData.END, GridData.CENTER, true, false));
            }
          }
        }

        {
          monthDayTabItem = new TabItem(tabFolder, SWT.NONE);
          monthDayTabItem.setText(MONTH_DAY);
          {
            final Group group = new Group(tabFolder, SWT.NONE);
            group.setLayout(new GridLayout());
            monthDayTabItem.setControl(group);
            {
              comboMonth = new Combo(group, SWT.NONE);
              comboMonth.setItems(DaysListener.getMonthdays());
              comboMonth.addSelectionListener(new SelectionAdapter() {
                public void widgetSelected(final SelectionEvent e) {
                  discardChanges();
                  if(comboMonth.getText() == null || comboMonth.getText().length() == 0)
View Full Code Here

        gSource.setText("Source Code");

        lblPrefunction = new Label(gSource, SWT.NONE);
        lblPrefunction.setText("Select predefined functions:");

        cboPrefunction = new Combo(gSource, SWT.READ_ONLY);
        cboPrefunction.setVisibleItemCount(7);
        cboPrefunction.addSelectionListener(new SelectionAdapter() {         
          public void widgetSelected(final SelectionEvent e) {
            if(cboPrefunction.getText().length() > 0) {
              String lan = "function_" + ((type == Editor.MONITOR)? "monitor" : "job") + "_" + listener.getLanguage(listener.getLanguage()) + "_";
View Full Code Here

                }
            }
        });

       
        cboFavorite = new Combo(cLanguage, SWT.NONE);
        cboFavorite.setVisible(type == Editor.MONITOR);
       
       
        cboFavorite.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, true));
        cboFavorite.addSelectionListener(new SelectionAdapter() {
View Full Code Here

        }
      });
      butGoto.setAlignment(SWT.RIGHT);


      cJob = new Combo(gNodes, SWT.BORDER);
      cJob.setVisibleItemCount(9);

      cJob.setMenu(new sos.scheduler.editor.app.ContextMenu(cJob, dom, Editor.JOB).getMenu());
      //Utils.goTo(cJob.getText(), listener.get_dom(), sos.scheduler.editor.app.Editor.JOB);
      /*cJob.addListener(SWT.MenuDetect, new Listener() {
      public void handleEvent(Event e) {
        //e.doit = cJob.getSelectionCount() > 0;
      }
    });
       */
      cJob.addMouseListener(new MouseAdapter() {
        public void mouseDown(final MouseEvent e) {           
          if(refresh) {
            if(listener.getJobs() != null) {
              cJob.setItems(listener.getJobs());           
              refresh = false;
            }
          }
        }

      });
      cJob.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyNode.setEnabled(isValidNode());
          if (bApplyNode.getEnabled())
            getShell().setDefaultButton(bApplyNode);
        }
      });
      cJob.addKeyListener(new KeyAdapter() {
        public void keyPressed(final KeyEvent e) {           
          if (e.keyCode == SWT.CR) {
            applyNode();
          }
        }
      });
      final GridData gridData13 = new GridData(GridData.FILL, GridData.CENTER, true, false, 3, 1);
      gridData13.widthHint = 579;
      cJob.setLayoutData(gridData13);

      final Composite composite = new Composite(gNodes, SWT.NONE);
      composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
      final GridLayout gridLayout_2 = new GridLayout();
      gridLayout_2.marginWidth = 0;
      gridLayout_2.marginHeight = 0;
      gridLayout_2.numColumns = 2;
      composite.setLayout(gridLayout_2);

      butBrowse = new Button(composite, SWT.NONE);
      butBrowse.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
      butBrowse.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          String jobname = IOUtils.openDirectoryFile(MergeAllXMLinDirectory.MASK_JOB);
          if(jobname != null && jobname.length() > 0)
            cJob.setText(jobname);
        }
      });
      butBrowse.setText("Browse");

      if(!listener.get_dom().isLifeElement()) {
        butImportJob = new Button(composite, SWT.NONE);
        final GridData gridData_3 = new GridData(GridData.END, GridData.CENTER, false, false);
        gridData_3.widthHint = 84;
        butImportJob.setLayoutData(gridData_3);
        butImportJob.addSelectionListener(new SelectionAdapter() {
          public void widgetSelected(final SelectionEvent e) {
            JobAssistentImportJobsForm importJobs = new JobAssistentImportJobsForm(listener.get_dom(), update, Editor.JOB_CHAINS);
            importJobs.setJobname(cJob);
            importJobs.showAllImportJobs("order");
            if (!listener.get_dom().isLifeElement())
              update.updateOrders();
            refresh = true;

          }
        });
        butImportJob.setText("Import Job");
      }
      label8 = new Label(gNodes, SWT.NONE);
      label8.setText("Next State:");
      new Label(gNodes, SWT.NONE);

      /*composite_2 = new Composite(gNodes, SWT.NONE);
      composite_2.addListener (SWT.Resize,  new org.eclipse.swt.widgets.Listener () {
          public void handleEvent (Event e) {
            cNextState.setBounds(0, 0, composite_2.getBounds().height, composite_2.getBounds().height);
            txtStateText.setBounds(0, 0, composite_2.getBounds().height, composite_2.getBounds().height);
            }
          });
*/
     
      /*final GridData gridData_2 = new GridData(GridData.FILL, GridData.FILL, true, false);
      gridData_2.minimumWidth = 35;
      composite_2.setLayoutData(gridData_2);

      final Composite composite_4 = new Composite(gNodes, SWT.NONE);
      final GridData gridData_4 = new GridData(GridData.FILL, GridData.FILL, false, false);
      gridData_4.widthHint = 59;
      composite_4.setLayoutData(gridData_4);
      composite_4.setLayout(new GridLayout());
*/
      cNextState = new Combo(gNodes, SWT.NONE);
      cNextState.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
      cNextState.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyNode.setEnabled(isValidNode());
          if (bApplyNode.getEnabled())
            getShell().setDefaultButton(bApplyNode);
        }
      });
      cNextState.addKeyListener(new KeyAdapter() {
        public void keyPressed(final KeyEvent e) {
          if (e.keyCode == SWT.CR) {
            applyNode();
          }
        }
      });
      //cNextState = new Combo(composite_4, SWT.BORDER);
     
      /*cNextState.setBounds(0, 0, composite_2.getBounds().height, composite_2.getBounds().height);
     
      cNextState.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyNode.setEnabled(isValidNode());
          if (bApplyNode.getEnabled())
            getShell().setDefaultButton(bApplyNode);
        }
      });
      cNextState.addKeyListener(new KeyAdapter() {
        public void keyPressed(final KeyEvent e) {
          if (e.keyCode == SWT.CR) {
            applyNode();
          }
        }
      });
*/
      //txtStateText = new Text(composite_2, SWT.BORDER);
      //txtStateText.setBounds(0, 0, composite_2.getBounds().height, composite_2.getBounds().height);

     
      final Label delayLabel = new Label(gNodes, SWT.NONE);
      delayLabel.setText("Delay:");

      tDelay = new Text(gNodes, SWT.BORDER);
      tDelay.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyNode.setEnabled(isValidNode());
          if (bApplyNode.getEnabled())
            getShell().setDefaultButton(bApplyNode);
        }
      });
      tDelay.addKeyListener(new KeyAdapter() {
        public void keyPressed(final KeyEvent e) {
        }
      });
      final GridData gridData_8 = new GridData(GridData.FILL, GridData.CENTER, true, false);
      gridData_8.minimumWidth = 35;
      gridData_8.widthHint = 186;
      tDelay.setLayoutData(gridData_8);

      bNewNode = new Button(gNodes, SWT.NONE);
      bNewNode.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
         
          isInsert = false;
          getShell().setDefaultButton(null);
          tNodes.deselectAll();
          butDetailsJob.setEnabled(false);
          listener.selectNode(null);
          bRemoveNode.setEnabled(false);
          enableNode(true);
          fillNode(true);
          tState.setFocus();
          //test
          //cNextState.setVisible(false);
          //txtStateText.setVisible(true);
          cNextState.setVisibleItemCount(0);
         
         
        }
      });
      bNewNode.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false));
      bNewNode.setText("New Chain &Node");

      label9 = new Label(gNodes, SWT.NONE);
      label9.setText("Error State:");
      new Label(gNodes, SWT.NONE);

      cErrorState = new Combo(gNodes, SWT.NONE);
      cErrorState.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyNode.setEnabled(isValidNode());
          if (bApplyNode.getEnabled())
            getShell().setDefaultButton(bApplyNode);
        }
      });
     
     
     
      cErrorState.addKeyListener(new KeyAdapter() {
        public void keyPressed(final KeyEvent e) {
          if (e.keyCode == SWT.CR) {
            applyNode();
          }
        }
      });
      final GridData gridData15 = new GridData(GridData.FILL, GridData.CENTER, true, false);
      gridData15.widthHint = 80;
      cErrorState.setLayoutData(gridData15);

      final Label onErrorLabel = new Label(gNodes, SWT.NONE);
      onErrorLabel.setText("On Error:");

      cOnError = new Combo(gNodes, SWT.READ_ONLY);
      cOnError.setItems(new String[] {"", "setback", "suspend"});
      cOnError.addModifyListener(new ModifyListener() {
        public void modifyText(final ModifyEvent e) {
          bApplyNode.setEnabled(isValidNode());
          if (bApplyNode.getEnabled())
View Full Code Here

    jobchainLabel = new Label(gDescription, SWT.NONE);
    final GridData gridData_10 = new GridData();
    jobchainLabel.setLayoutData(gridData_10);
    jobchainLabel.setText("Job chain");

    cJobchain = new Combo(gDescription, SWT.NONE);
    cJobchain.setEnabled(false);
    cJobchain.setItems(listener.getJobChains());   
    cJobchain.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
      public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
        if(!event)
          return;
       
        listener.setJobChain(cJobchain.getText())
       
        String curstate = Utils.getAttributeValue("state", listener.getCommand());

          tState.setItems(listener.getStates());                   
          tState.setText(curstate);

               
                String curEndstate =  Utils.getAttributeValue("end_state", listener.getCommand());

                  cboEndstate.setItems(listener.getStates());
                  cboEndstate.setText(curEndstate);

       
      }
    });

    final GridData gridData_8 = new GridData(GridData.FILL, GridData.CENTER, true, false);
    gridData_8.widthHint = 114;
    cJobchain.setLayoutData(gridData_8);
    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);
    tTitle.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
      public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
        listener.setTitle(tTitle.getText());

      }
    });

    final GridData gridData_5 = new GridData(GridData.FILL, GridData.CENTER, true, false);
    gridData_5.widthHint = 150;
    tTitle.setLayoutData(gridData_5);

    stateLabel = new Label(gDescription, SWT.NONE);
    stateLabel.setLayoutData(new GridData());
    stateLabel.setText("State");

    tState = new Combo(gDescription, SWT.BORDER);
    tState.setEnabled(false);
    tState.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
      public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
        if(event)
          listener.setState(tState.getText());
       
      }
    });
    final GridData gridData_2 = new GridData(GridData.FILL, GridData.CENTER, true, false);
    gridData_2.widthHint = 150;
    tState.setLayoutData(gridData_2);

    endStateLabel = new Label(gDescription, SWT.NONE);
    endStateLabel.setLayoutData(new GridData());
    endStateLabel.setText("End State");

    cboEndstate = new Combo(gDescription, SWT.NONE);
    cboEndstate.addModifyListener(new ModifyListener() {
      public void modifyText(final ModifyEvent e) {
        if(event)
          listener.setEndState(cboEndstate.getText());
      }
View Full Code Here

    group1.setText("Use");
    group1.setLayout(gridLayout1);
    lockLabel = new Label(group1, SWT.NONE);
    lockLabel.setText("Lock");

    tLockUse = new Combo(group1, SWT.NONE);
    tLockUse.setEnabled(false);
    tLockUse.addModifyListener(new ModifyListener() {
      public void modifyText(final ModifyEvent e) {
        if (!tLockUse.getText().equals(""))
          getShell().setDefaultButton(bApplyLockUse);
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Combo

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.