Package org.eclipse.nebula.widgets.pshelf

Examples of org.eclipse.nebula.widgets.pshelf.PShelfItem


  _shelf = new PShelf(parent, SWT.NONE);

  // Optionally, change the renderer
  // shelf.setRenderer(new RedmondShelfRenderer());

  PShelfItem professorsShelf = new PShelfItem(_shelf, SWT.NONE);
  professorsShelf.setText("Преподователи");
  professorsShelf.getBody().setLayout(getGridLayout());

  // Create the first Group
  Group semesterGroup = new Group(professorsShelf.getBody(),
    SWT.SHADOW_IN);
  semesterGroup.setText("Семестр");
  semesterGroup.setLayout(new RowLayout(SWT.VERTICAL));
  semesterGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  _fallBtn = new Button(semesterGroup, SWT.RADIO);
  _fallBtn.setText("Осень");
  _fallBtn.setSelection(true);
 
  _springBtn = new Button(semesterGroup, SWT.RADIO);
  _springBtn.setText("Весна");

  String matchesPercentages[] = { "50", "75", "100" };
  Group matchesPercentagesGroup = new Group(professorsShelf.getBody(),
    SWT.SHADOW_IN);
  matchesPercentagesGroup.setText("Процент совпадения");
  matchesPercentagesGroup.setLayout(new GridLayout());
  matchesPercentagesGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  _matchesPercentagesCombo = new Combo(matchesPercentagesGroup,
    SWT.DROP_DOWN | SWT.READ_ONLY);
  _matchesPercentagesCombo.setItems(matchesPercentages);
  _matchesPercentagesCombo.select(2);
  _matchesPercentagesCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
 
  _findProfessorsBtn = new Button(professorsShelf.getBody(),
    SWT.FLAT);
  _findProfessorsBtn.setText("Поиск преподователей");
  _findProfessorsBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

  //==============================================================

  PShelfItem scheduleSheld = new PShelfItem(_shelf, SWT.NONE);
  scheduleSheld.setText("Расписание");
  scheduleSheld.getBody().setLayout(getGridLayout());

  Group fromDateGroup = new Group(scheduleSheld.getBody(),
    SWT.SHADOW_IN);
  fromDateGroup.setText("Дата начала");
  fromDateGroup.setLayout(new GridLayout());
  fromDateGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  _fromCdt = new CDateTime(fromDateGroup, CDT.BORDER | CDT.DROP_DOWN);
  _fromCdt.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

  Group toDateGroup = new Group(scheduleSheld.getBody(),
    SWT.SHADOW_IN);
  toDateGroup.setText("Дата окончания");
  toDateGroup.setLayout(new GridLayout());
  toDateGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  _toCdt = new CDateTime(toDateGroup, CDT.BORDER | CDT.DROP_DOWN);
  _toCdt.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
 
  _generateScheduleBtn = new Button(scheduleSheld.getBody(), SWT.FLAT);
  _generateScheduleBtn.setText("Сформировать расписание");
  _generateScheduleBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        _generateScheduleBtn.setEnabled(false);
 
        listeners();
View Full Code Here


  _shelf = new PShelf(parent, SWT.NONE);

  // Optionally, change the renderer
  // shelf.setRenderer(new RedmondShelfRenderer());

  PShelfItem professorsScheduleShelf = new PShelfItem(_shelf, SWT.NONE);
  professorsScheduleShelf.setText("Расписание преподователей");
  professorsScheduleShelf.getBody().setLayout(getGridLayout());

  Button uploadScheduleBtn = new Button(professorsScheduleShelf.getBody(), SWT.FLAT);
  uploadScheduleBtn.setText("Общее");
  uploadScheduleBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  uploadScheduleBtn.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
//    openShedule();
      }
     
  });
 

  Button uploadProfessorsLoadBtn = new Button(professorsScheduleShelf.getBody(), SWT.FLAT);
  uploadProfessorsLoadBtn.setText("Частное");
  uploadProfessorsLoadBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  uploadProfessorsLoadBtn.addSelectionListener(new SelectionAdapter() {

      @Override
View Full Code Here

  _shelf = new PShelf(parent, SWT.NONE);

  // Optionally, change the renderer
  // shelf.setRenderer(new RedmondShelfRenderer());

  PShelfItem upload = new PShelfItem(_shelf, SWT.NONE);
  upload.setText("Загрузка");
  upload.getBody().setLayout(getGridLayout());

  Button uploadScheduleBtn = new Button(upload.getBody(), SWT.FLAT);
  uploadScheduleBtn.setText("Расписание");
  uploadScheduleBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  uploadScheduleBtn.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
    openShedule();
      }
     
  });
 

  Button uploadProfessorsLoadBtn = new Button(upload.getBody(), SWT.FLAT);
  uploadProfessorsLoadBtn.setText("Нагрузка");
  uploadProfessorsLoadBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  uploadProfessorsLoadBtn.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
    openProfessorsLoad();
      }
     
  });
 
  PShelfItem download = new PShelfItem(_shelf, SWT.NONE);
  download.setText("Выгрузка");
  download.getBody().setLayout(getGridLayout());

  Button downloadScheduleBtn = new Button(download.getBody(), SWT.FLAT);
  downloadScheduleBtn.setText("Расписание");
  downloadScheduleBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
  PShelfItem lectureRooms = new PShelfItem(_shelf, SWT.NONE);
  lectureRooms.setText("Аудитории");
  lectureRooms.getBody().setLayout(getGridLayout());

  Button lectureRoomsAutocompleteBtn = new Button(lectureRooms.getBody(),
    SWT.FLAT);
  lectureRoomsAutocompleteBtn.setText("Автозаполнение");
  lectureRoomsAutocompleteBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    }
View Full Code Here

    parent.setLayout(new FillLayout());

    PShelf shelf = new PShelf(parent, SWT.NONE);
    shelf.setRenderer(new RedmondShelfRenderer());

    PShelfItem item1 = new PShelfItem(shelf, SWT.NONE);
    item1.setText("Tag Search");

    item1.getBody().setLayout(new FillLayout());

    final Table table = new Table(item1.getBody(), SWT.NONE);
    TableColumn col1 = new TableColumn(table, SWT.NONE);
    TableColumn col2 = new TableColumn(table, SWT.NONE);
    col1.setWidth(125);
    col2.setWidth(120);
    col1.setText("Criteria");
    String[] criterias = { "Tag Name", "Tag Attributes" };
    TableItem item = new TableItem(table, SWT.NONE);
    item.setText(new String[] { "Tag Name", "Enter tag name to search" });
    item = new TableItem(table, SWT.NONE);
    item.setText(new String[] { "Tag body contains", "Enter values to search tag body for" });
    item = new TableItem(table, SWT.NONE);
    item.setText(new String[] { "Attributes", "Enter attributes to search" });
    item = new TableItem(table, SWT.NONE);
    item.setText(new String[] { "Attribute values contain", "Enter attributes values to search for" });
    col1.pack();
    col2.pack();
    final TableEditor editor = new TableEditor(table);
    editor.horizontalAlignment = SWT.LEFT;
    editor.grabHorizontal = true;
    editor.minimumWidth = 50;
    // editing the second column
    final int EDITABLECOLUMN = 1;
    table.setHeaderVisible(true);
    table.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        // Clean up any previous editor control
        Control oldEditor = editor.getEditor();
        if (oldEditor != null)
          oldEditor.dispose();

        // Identify the selected row
        TableItem item = (TableItem) e.item;
        if (item == null)
          return;

        // The control that will be the editor must be a child of the
        // Table
        Text newEditor = new Text(table, SWT.NONE);
        newEditor.setText(item.getText(EDITABLECOLUMN));
        newEditor.addModifyListener(new ModifyListener() {
          public void modifyText(ModifyEvent me) {
            Text text = (Text) editor.getEditor();
            editor.getItem().setText(EDITABLECOLUMN, text.getText());
          }
        });
        newEditor.selectAll();
        newEditor.setFocus();
        editor.setEditor(newEditor, item, EDITABLECOLUMN);
      }
    });

    PShelfItem item2 = new PShelfItem(shelf, SWT.NONE);
    item2.setText("CFScript Search");

    item2.getBody().setLayout(new FillLayout());

    Text text = new Text(item2.getBody(), SWT.WRAP);
    text.setText("Not implemented");

    setControl(parent);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.pshelf.PShelfItem

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.