Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Table


          apply();
      }
    });
    txtRegExp.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));

    tableWatchDirectory = new Table(jobGroup, SWT.FULL_SELECTION | SWT.BORDER);
    final GridData gridData_7 = new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1);
    tableWatchDirectory.setLayoutData(gridData_7);
    optionlistener.fillDirectories(tableWatchDirectory);
    tableWatchDirectory.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {
View Full Code Here


    });
    final GridData gridData_9 = new GridData(GridData.FILL, GridData.BEGINNING, false, false);
    butApplyParam.setLayoutData(gridData_9);
    butApplyParam.setText("Apply");

    tableParams = new Table(parameterGroup, SWT.FULL_SELECTION | SWT.BORDER);
    tableParams.setEnabled(false);
    tableParams.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {
       
        if(tableParams.getSelectionCount() > 0) {         
View Full Code Here

     * This method initializes table
     */
    private void createTable() {
        GridData gridData2 = new org.eclipse.swt.layout.GridData(GridData.FILL, GridData.FILL, true, true, 1, 3);
        gridData2.widthHint = 204;
        table = new Table(commandsGroup, SWT.BORDER | SWT.FULL_SELECTION);
        table.addMouseListener(new MouseAdapter() {
          public void mouseDoubleClick(final MouseEvent e) {
            if(table.getSelectionCount() > 0)
          ContextMenu.goTo(table.getSelection()[0].getText(0), _dom, Editor.JOB_COMMAND);
          }
View Full Code Here

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

        });
        label = new Label(group1, SWT.SEPARATOR | SWT.HORIZONTAL);
        label.setText("Label"); // Generated
        label.setLayoutData(gridData1); // Generated
        tSettings = new Table(group1, SWT.BORDER);
        tSettings.setHeaderVisible(true); // Generated
        tSettings.setLayoutData(gridData2); // Generated
        tSettings.setLinesVisible(true); // Generated
        tSettings.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
View Full Code Here

            }
        });
        label4 = new Label(group, SWT.SEPARATOR | SWT.HORIZONTAL);
        label4.setText("Label"); // Generated
        label4.setLayoutData(gridData1); // Generated
        tProfiles = new Table(group, SWT.BORDER);
        tProfiles.setHeaderVisible(true); // Generated
        tProfiles.setLayoutData(gridData11); // Generated
        tProfiles.setLinesVisible(true); // Generated
        tProfiles.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
View Full Code Here

                tName.setFocus();
              
            }
        });
        GridData gridData11 = new GridData(GridData.FILL, GridData.FILL, true, true, 4, 1);
        tAuthors = new Table(authorsGroup, SWT.FULL_SELECTION | SWT.BORDER);
        tAuthors.setHeaderVisible(true); // Generated
        tAuthors.setLinesVisible(true); // Generated
        tAuthors.setLayoutData(gridData11); // Generated
        tAuthors.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
View Full Code Here

            }
        });
        label7 = new Label(group, SWT.SEPARATOR | SWT.HORIZONTAL);
        label7.setText("Label"); // Generated
        label7.setLayoutData(gridData4); // Generated
        tSections = new Table(group, SWT.BORDER);
        tSections.setHeaderVisible(true); // Generated
        tSections.setLayoutData(gridData1); // Generated
        tSections.setLinesVisible(true); // Generated
        tSections.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
            public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
View Full Code Here

        });

        butApply.setText("Apply");
      }

      tableDescParameters = new Table(textParameterGroup, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
      tableDescParameters.addMouseListener(new MouseAdapter() {
        public void mouseDoubleClick(final MouseEvent e) {
          addParams();
        }
      });
      tableDescParameters.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          if(tableDescParameters.getSelectionCount() > -1) { 
            txtDescription.setText((tableDescParameters.getSelection()[0].getData("parameter_description_" + Options.getLanguage()) != null? tableDescParameters.getSelection()[0].getData("parameter_description_" + Options.getLanguage()).toString(): "") );
          }
        }
      });
      tableDescParameters.setLinesVisible(true);
      tableDescParameters.setHeaderVisible(true);
      final GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1);
      gridData.widthHint = 245;
      tableDescParameters.setLayoutData(gridData);

      final TableColumn newColumnTableColumn = new TableColumn(tableDescParameters, SWT.NONE);
      newColumnTableColumn.setWidth(122);
      newColumnTableColumn.setText("Name");

      final TableColumn newColumnTableColumn_1 = new TableColumn(tableDescParameters, SWT.NONE);
      newColumnTableColumn_1.setWidth(145);
      newColumnTableColumn_1.setText("Value");

      final Composite composite_2 = new Composite(textParameterGroup, SWT.NONE);
      final GridData gridData_11 = new GridData(GridData.CENTER, GridData.CENTER, false, false);
      gridData_11.widthHint = 49;
      composite_2.setLayoutData(gridData_11);
      composite_2.setLayout(new GridLayout());

      butPut = new Button(composite_2, SWT.NONE);
      butPut.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          addParams();

        }
      });
      final GridData gridData_13 = new GridData(GridData.FILL, GridData.CENTER, false, false);
      gridData_13.widthHint = 33;
      butPut.setLayoutData(gridData_13);
      butPut.setText(">");

      butPutAll = new Button(composite_2, SWT.NONE);
      butPutAll.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          for(int i = 0; i < tableDescParameters.getItemCount(); i++) {                       

            paramListener.saveParameter(table,
                tableDescParameters.getItem(i).getText(0),
                tableDescParameters.getItem(i).getText(1),
                (tableDescParameters.getItem(i).getData("parameter_description_de") != null?tableDescParameters.getItem(i).getData("parameter_description_de").toString(): ""),
                (tableDescParameters.getItem(i).getData("parameter_description_en") != null?tableDescParameters.getItem(i).getData("parameter_description_en").toString(): ""),
                tableDescParameters.getItem(i).getBackground().equals(Options.getRequiredColor() ));
          }
          tableDescParameters.removeAll();
          butApply.setEnabled(false);
        }
      });
      butPutAll.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      butPutAll.setText(">>");

      butRemove = new Button(composite_2, SWT.NONE);
      butRemove.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {
          removeParams();
        }   
      });
      final GridData gridData_12 = new GridData(GridData.FILL, GridData.CENTER, false, false);
      gridData_12.widthHint = 29;
      butRemove.setLayoutData(gridData_12);
      butRemove.setText("<");

      butRemoveAll = new Button(composite_2, SWT.NONE);
      butRemoveAll.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(final SelectionEvent e) {         
          String remItem= null;
          ArrayList listOfParams = new ArrayList();

          for(int i = 0; i < table.getItemCount();i++){
            TableItem item = table.getItem(i);
            if(item.getBackground().equals(Options.getRequiredColor())) {
              remItem = (remItem!=null?remItem:"") +"\n\t" + item.getText(0);
              //merke die Parameter, die nicht gel�scht werden sollen, weil sie required sind
              HashMap h = new HashMap();
              h.put("name", item.getText(0));
              h.put("default_value", (item.getText(1)!=null?item.getText(1):""));
              h.put("required", "true");
              h.put("parameter_description_de", (item.getData("parameter_description_de")!=null?item.getData("parameter_description_de"):""));
              h.put("parameter_description_en", (item.getData("parameter_description_en")!=null?item.getData("parameter_description_en"):""));
              listOfParams.add(h);

            } else {
              TableItem itemDP =  new TableItem(tableDescParameters, SWT.NONE);
              itemDP.setText(0, item.getText(0));
              itemDP.setText(1, item.getText(1));
              itemDP.setData("parameter_description_de", item.getData("parameter_description_de"));
              itemDP.setData("parameter_description_en", item.getData("parameter_description_en"));
            }

          }
          txtName.setFocus();

          paramListener.fillParams(listOfParams, table, true);

          if(remItem != null) {
            MainWindow.message(jobParameterShell, sos.scheduler.editor.app.Messages.getString("assistent.jobparameter.required") + remItem, SWT.ICON_WARNING | SWT.OK );
          }

          table.redraw();
          table.deselectAll();
          tableDescParameters.deselectAll();

        }
      });
      butRemoveAll.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
      butRemoveAll.setText("<<");

      table = new Table(textParameterGroup, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
      table.addMouseListener(new MouseAdapter() {
        public void mouseDoubleClick(final MouseEvent e) {
          removeParams();
        }
      });
View Full Code Here

            }
        });
        label7 = new Label(group1, SWT.SEPARATOR | SWT.HORIZONTAL);
        label7.setText("Label"); // Generated
        label7.setLayoutData(gridData7); // Generated
        tParams = new Table(group1, SWT.BORDER);
        tParams.setHeaderVisible(true); // Generated
        tParams.setLayoutData(gridData12); // Generated
        tParams.setLinesVisible(true); // Generated
        TableColumn tableColumn = new TableColumn(tParams, SWT.NONE);
        tableColumn.setWidth(200); // Generated
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.