Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Table


    final Group jobchainsGroup = new Group(sashForm, SWT.NONE);
    jobchainsGroup.setText("Job Chains");
    final GridLayout gridLayout_2 = new GridLayout();
    gridLayout_2.numColumns = 2;
    jobchainsGroup.setLayout(gridLayout_2);
    tChains = new Table(jobchainsGroup, SWT.BORDER);
    tChains.addMouseListener(new MouseAdapter() {
      public void mouseDoubleClick(final MouseEvent e) {
        if(tChains.getSelectionCount() > 0)
          ContextMenu.goTo(tChains.getSelection()[0].getText(0), _dom, Editor.JOB_CHAIN);
      }
View Full Code Here


      dumm2.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false));
      dumm2.setVisible(false);
      dumm2.setEnabled(false);
      dumm2.setText("Remove Order File Source");

      tNodes = new Table(gNodes, SWT.FULL_SELECTION | SWT.BORDER);   
   
      tNodes.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          //test
          //cNextState.setVisible(true);
          //txtStateText.setVisible(false);
          selectNodes();       
        }
      });
      tNodes.setLinesVisible(true);
      tNodes.setHeaderVisible(true);
      final GridData gridData4 = new GridData(GridData.CENTER, GridData.FILL, true, true, 5, 4);
      gridData4.heightHint = 112;
      tNodes.setLayoutData(gridData4);

      final TableColumn tableColumn3 = new TableColumn(tNodes, SWT.NONE);
      tableColumn3.setWidth(90);
      tableColumn3.setText("State");

      final TableColumn newColumnTableColumn_3 = new TableColumn(tNodes, SWT.NONE);
      newColumnTableColumn_3.setWidth(100);
      newColumnTableColumn_3.setText("Node");

      final TableColumn tableColumn4 = new TableColumn(tNodes, SWT.NONE);
      tableColumn4.setWidth(200);
      tableColumn4.setText("Job/Dir");

      final TableColumn tableColumn5 = new TableColumn(tNodes, SWT.NONE);
      tableColumn5.setWidth(90);
      tableColumn5.setText("Next State");

      final TableColumn tableColumn6 = new TableColumn(tNodes, SWT.NONE);
      tableColumn6.setWidth(90);
      tableColumn6.setText("Error State");

      final TableColumn newColumnTableColumn_4 = new TableColumn(tNodes, SWT.NONE);
      newColumnTableColumn_4.setWidth(100);
      newColumnTableColumn_4.setText("On Error");

      final Composite composite_1 = new Composite(gNodes, SWT.NONE);
      composite_1.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      final GridLayout gridLayout_5 = new GridLayout();
      gridLayout_5.marginWidth = 0;
      gridLayout_5.marginHeight = 0;
      gridLayout_5.numColumns = 3;
      composite_1.setLayout(gridLayout_5);

      butUp = new Button(composite_1, SWT.NONE);
      butUp.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {

          if (tNodes.getSelectionCount() > 0) {
            int index = tNodes.getSelectionIndex();
            if(index > 0) {                     
              listener.changeUp(tNodes, true, bFullNode.getSelection() || bEndNode.getSelection(), tState.getText(), cJob.getText(), tDelay.getText(), cNextState.getText(), cErrorState.getText(),bRemoveFile.getSelection(),tMoveTo.getText(), index, reorderButton.getSelection());
              selectNodes();         
            }
          }
        }
      });

      butUp.setImage(ResourceManager.getImageFromResource("/sos/scheduler/editor/icon_up.gif"));

      butDown = new Button(composite_1, SWT.NONE);
      butDown.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          if (tNodes.getSelectionCount() > 0) {
            int index = tNodes.getSelectionIndex();
            if(index == tNodes.getItemCount()-1) {
              //System.out.println("Datensatz ist bereits ganz unten.");
            } else if(index >= 0) {                       
              listener.changeUp(tNodes, false, bFullNode.getSelection() || bEndNode.getSelection(), tState.getText(), cJob.getText(), tDelay.getText(), cNextState.getText(), cErrorState.getText(),bRemoveFile.getSelection(),tMoveTo.getText(), index, reorderButton.getSelection());
              selectNodes();           
            }
          }
        }
      });
      butDown.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      butDown.setImage(ResourceManager.getImageFromResource("/sos/scheduler/editor/icon_down.gif"));

      reorderButton = new Button(composite_1, SWT.CHECK);
      reorderButton.setSelection(true);
      reorderButton.setText("Reorder");

      /*final Button butIUp = new Button(composite_1, SWT.NONE);
    butIUp.setLayoutData(new GridData());
    butIUp.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {
        if (tNodes.getSelectionCount() > 0) {
          int index = tNodes.getSelectionIndex();
          if(index > 0) {                     
            listener.changeInsertUp(tNodes,
                true,
                bFullNode.getSelection() || bEndNode.getSelection(),
                tState.getText(),
                cJob.getText(),
                tDelay.getText(),
                cNextState.getText(),               
                cErrorState.getText(),
                bRemoveFile.getSelection(),
                tMoveTo.getText(),
                index);
            selectNodes();         
          }
        }
      }
    });
    butIUp.setText("iup");
       */

      butDetailsJob = new Button(gNodes, SWT.NONE);
      butDetailsJob.setEnabled(false);
      butDetailsJob.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
         
          if(tNodes.getSelectionCount() > 0) {            
            showDetails(tNodes.getSelection()[0].getText(0), cJob.getText());
           
            //tNodes.deselectAll();
            //selectNodes();
            //butDetailsJob.setEnabled(false);
         
          checkParameter = true;
          }
        }
      });
      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() {
        public void modifyText(final ModifyEvent e) {
          bApplyFileOrderSource.setEnabled(isValidSource());
          if (bApplyFileOrderSource.getEnabled())
            getShell().setDefaultButton(bApplyFileOrderSource);

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

      tFileOrderSource = new Table(gFileOrderSource, SWT.BORDER);
      tFileOrderSource.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          if (tFileOrderSource.getSelectionCount() > 0) {
            listener.selectFileOrderSource(tFileOrderSource);
            bApplyFileOrderSource.setEnabled(false);
View Full Code Here

    gridLayout.numColumns = 2;
    group = new Group(this, SWT.NONE);
    group.setText("Web Services");
   
    GridData gridData1 = new org.eclipse.swt.layout.GridData(GridData.FILL, GridData.FILL, true, true, 1, 3);
    tServices = new Table(group, SWT.BORDER | SWT.FULL_SELECTION);
    tServices.addMouseListener(new MouseAdapter() {
      public void mouseDoubleClick(final MouseEvent e) {
        if(tServices.getSelectionCount() > 0)
          ContextMenu.goTo(tServices.getSelection()[0].getText(0), _dom, Editor.WEBSERVICE);
      }
View Full Code Here

        applyLockUse();
      }
    });
    new Label(group1, SWT.NONE);
    GridData gridData30 = new org.eclipse.swt.layout.GridData(GridData.FILL, GridData.FILL, true, true, 3, 3);
    this.tLockUseTable = new Table(group1, SWT.BORDER | SWT.FULL_SELECTION);
    this.tLockUseTable.setHeaderVisible(true);
    this.tLockUseTable.setLayoutData(gridData30);
    this.tLockUseTable.setLinesVisible(true);
    this.tLockUseTable.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
View Full Code Here

      }
    });
    bApplyHttpDirectory.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
    bApplyHttpDirectory.setText("Apply");

    tHttpDirectory = new Table(group_1, SWT.FULL_SELECTION | SWT.BORDER);
    tHttpDirectory.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {
        if (tHttpDirectory.getSelectionCount() > 0) {
          TableItem item = tHttpDirectory.getItem(tHttpDirectory.getSelectionIndex());
          tUrlPath.setText(item.getText(0));
View Full Code Here

            }
        });
        label = new Label(composite1, SWT.SEPARATOR | SWT.HORIZONTAL);
        label.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false, 5, 1));
        label.setText("Label"); // Generated
        tDatabases = new Table(composite1, SWT.FULL_SELECTION | SWT.BORDER);
        TableColumn tableColumn2 = new TableColumn(tDatabases, SWT.NONE);
        tableColumn2.setWidth(300); // Generated
        tableColumn2.setText("Name"); // Generated
        TableColumn tableColumn3 = new TableColumn(tDatabases, SWT.NONE);
        tableColumn3.setWidth(173); // Generated
View Full Code Here

        label2.setText("Reference:"); // Generated
        createCReference();
        label3 = new Label(group, SWT.SEPARATOR | SWT.HORIZONTAL);
        label3.setText("Label"); // Generated
        label3.setLayoutData(gridData3); // Generated
        table = new Table(group, SWT.BORDER);
        table.setHeaderVisible(true); // Generated
        table.setLayoutData(gridData1); // Generated
        table.setLinesVisible(true); // Generated
        table.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
View Full Code Here

        client.setLayout( layout );
        toolkit.paintBordersFor( client );
        section.setClient( client );

        // Creatig the Table and Table Viewer
        Table table = toolkit.createTable( client, SWT.NULL );
        GridData gd = new GridData( SWT.FILL, SWT.FILL, true, true, 1, 4 );
        gd.heightHint = 20;
        gd.widthHint = 100;
        table.setLayoutData( gd );
        final SectionPart spart = new SectionPart( section );
        managedForm.addPart( spart );
        viewer = new TableViewer( table );
        viewer.addSelectionChangedListener( new ISelectionChangedListener()
        {
View Full Code Here

        client.setLayout( layout );
        toolkit.paintBordersFor( client );
        section.setClient( client );

        // Creating the Table and Table Viewer
        Table table = toolkit.createTable( client, SWT.NULL );
        GridData gd = new GridData( SWT.FILL, SWT.FILL, true, true, 1, 2 );
        gd.heightHint = 20;
        gd.widthHint = 100;
        table.setLayoutData( gd );
        final SectionPart spart = new SectionPart( section );
        managedForm.addPart( spart );
        viewer = new TableViewer( table );
        viewer.addSelectionChangedListener( new ISelectionChangedListener()
        {
View Full Code Here

        client.setLayout( layout );
        toolkit.paintBordersFor( client );
        section.setClient( client );

        // Creatig the Table and Table Viewer
        Table table = toolkit.createTable( client, SWT.NULL );
        GridData gd = new GridData( SWT.FILL, SWT.FILL, true, true, 1, 2 );
        gd.heightHint = 20;
        gd.widthHint = 100;
        table.setLayoutData( gd );
        final SectionPart spart = new SectionPart( section );
        managedForm.addPart( spart );
        viewer = new TableViewer( table );
        viewer.addSelectionChangedListener( new ISelectionChangedListener()
        {
View Full Code Here

TOP

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

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.