Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.TableItem


    table.removeAll();

    if (_list != null) {
      for (Iterator it = _list.iterator(); it.hasNext();) {
        Element e = (Element) it.next();
        TableItem item = new TableItem(table, SWT.NONE);
        if(Utils.getAttributeValue("single_start", e).length() > 0)
          item.setText(0, "");
        else
          item.setText(0, Utils.isAttributeValue("let_run", e) ? "Yes" : "No");
        item.setText(1, Utils.getAttributeValue("begin", e));
        item.setText(2, Utils.getAttributeValue("end", e));
        item.setText(3, Utils.getAttributeValue("repeat", e));
        item.setText(4, Utils.getAttributeValue("single_start", e));
        item.setText(5, Utils.getAttributeValue("absolute_repeat", e));
        item.setData(e);
        String whenHoliday = Utils.getAttributeValue("when_holiday", e).length() == 0 ? "suppress execution" : Utils.getAttributeValue("when_holiday", e);
        item.setText(6, whenHoliday);


      }
    }       
    ArrayList remList = new ArrayList();
    for(int i =0; i < _listOfAt.size(); i++) {
      Element at = (Element)_listOfAt.get(i);
      String sAT = Utils.getAttributeValue("at", at);

      if(sAT != null && sAT.length()> 0) {
        String date = sAT.substring(0, 10);       
        String time = sAT.substring((sAT.indexOf(" ") > -1 ? sAT.indexOf(" ") + 1 : sAT.length()));
        if(time.length()==0) {
          //at ohne Zeitangabe werden gel�scht
          remList.add(at);
        } else {         
          if(date.equalsIgnoreCase(Utils.getAttributeValue("date", _parent)) ||
              Utils.getAttributeValue("at", _parent).startsWith(date)){
            TableItem item = new TableItem(table, SWT.NONE);       
            item.setText(0, "No");
            item.setText(1, "");
            item.setText(2, "");
            item.setText(3, "");                        
            item.setText(4, time);
            item.setData(at);
           
          }
        }
      }
    }
View Full Code Here


            addParam();
            return;
          }
        }
         
        TableItem item = (TableItem) e.item;
        if (item == null)
          return;
        tParaName.setText(item.getText(0));
        tParaValue.setText(item.getText(1));
        bRemove.setEnabled(tParameter.getSelectionCount() > 0);
        if(type == Editor.JOB) {
          //txtParameterDescription.setText(listener.getParameterDescription(item.getText(0)));
          try {
            txtParameterDescription.setText(sosString.parseToString(item.getData("parameter_description_" + Options.getLanguage())));
          } catch(Exception ew) {}
        }       
        bApply.setEnabled(false);
      }
    });
View Full Code Here

    label4_1.setText("Label");

    tableEnvironment = new Table(group_2, SWT.FULL_SELECTION | SWT.BORDER);
    tableEnvironment.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {
        TableItem item = (TableItem) e.item;
        if (item == null)
          return;
        setEnvironment(item);
        /*txtEnvName.setText(item.getText(0));
        txtEnvValue.setText(item.getText(1));
 
View Full Code Here

      }
    });
    tableIncludeParams.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {

        TableItem item = (TableItem) e.item;
        if (item == null)
          return;
        setInclude(item);
        /*
        txtIncludeFilename.setText(item.getText(0));
 
View Full Code Here

    });
    tParameter.setHeaderVisible(true);
    tParameter.setLinesVisible(true);
    tParameter.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        TableItem item = (TableItem) e.item;
        if (item == null)
          return;
       
        setParams(item);
       
View Full Code Here

   
    tableHttpUsers = new Table(group_1, SWT.FULL_SELECTION | SWT.BORDER);
    tableHttpUsers.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {
        if (tableHttpUsers.getSelectionCount() > 0) {
          TableItem item = tableHttpUsers.getItem(tableHttpUsers.getSelectionIndex());
          txtUsername.setText(item.getText(0));
          txtPassword.setText("");
          txtMD5Password.setText(item.getText(1));
          butApplyHttpUser.setEnabled(false);
          butEncrypt.setEnabled(false);
          txtUsername.setFocus();
        }
        butRemoveHttpUser.setEnabled(tableHttpUsers.getSelectionCount() > 0);
View Full Code Here

        items[i].setText(1, passw);
        found = true;
      }
    }
    if (!found) {
      TableItem item = new TableItem(tableHttpUsers, SWT.NONE);
      item.setText(new String[] { name,passw });
    }
   
    tableHttpUsers.deselectAll();
    txtPassword.setText("");
    txtMD5Password.setText("");
View Full Code Here

      }
    });
    tableIncludeParams.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {

        TableItem item = (TableItem) e.item;
        if (item == null)
          return;
        txtIncludeFilename.setText(item.getText(0));
        txtIncludeNode.setText(item.getText(1));
        if(type == Editor.JOB || type == Editor.COMMANDS || type == Editor.JOB_COMMANDS)
          butIsLifeFile.setSelection(item.getText(2).equalsIgnoreCase("live_file"));               
        butRemoveInclude.setEnabled(tableIncludeParams.getSelectionCount() > 0);                              
        butIncludesApply.setEnabled(false);

        butOpenInclude.setEnabled(true && !isRemoteConnection);       
      }
View Full Code Here

    });
    tParameter.setHeaderVisible(true);
    tParameter.setLinesVisible(true);
    tParameter.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        TableItem item = (TableItem) e.item;
        if (item == null)
          return;
        tParaName.setText(item.getText(0));
        if (tParaName.getText().equals("<from>"))
          cSource.setText(item.getText(1));
        tParaValue.setText(item.getText(1));               

        bRemove.setEnabled(tParameter.getSelectionCount() > 0);
        bApply.setEnabled(false);
      }
    });
View Full Code Here

    if (_list != null) {
      for (Iterator it = _list.iterator(); it.hasNext();) {
        Object o = it.next();
        if (o instanceof Element) {
          Element e = (Element) o;
          TableItem item = new TableItem(table, SWT.NONE);
          item.setData(e);
          String name = Utils.getAttributeValue("name", e);
          if(!Utils.isElementEnabled("job", _dom, e)) {
            item.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_GRAY));           
          } else {
            item.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));
          }
          item.setChecked(!isEnabled(e));
          item.setText(1, name);
          item.setText(2, Utils.getAttributeValue("title", e));
          item.setText(3, Utils.getAttributeValue("spooler_id", e));
          item.setText(4, Utils.getAttributeValue("process_class", e));
          item.setText(5, Utils.isAttributeValue("order", e) ? "Yes" : "No");
        }
      }
    }

  }
View Full Code Here

TOP

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

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.