Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.ExpandItem


    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    layout.marginLeft = layout.marginTop = layout.marginRight = layout.marginBottom = 10;
    composite.setLayout(layout);

    final ExpandItem expandItem = new ExpandItem(bar, SWT.NONE, 0);

    for (Object key : o.keySet()) {
      if (key == "_id" || key == "_ns")
        continue;
      Label keyLabel = new Label(composite, SWT.FILL);
      keyLabel.setText(key.toString());
      Label valueLabel = new Label(composite, SWT.WRAP);
      Object value = o.get(key);
      valueLabel.setText(String.valueOf(value));
    }
    Object value;
    switch (collType) {
      case SYSINDEX :
        value = o.get("ns").toString() + "." + o.get("name").toString();
        break;
      default :
        value = o.get("_id");
        break;
    }
    expandItem.setText(String.valueOf(value));
    expandItem.setControl(composite);
    expandItem.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
  }
View Full Code Here


    Composite control = new Composite(parent, SWT.NONE);
    control.setLayout(new FillLayout(SWT.VERTICAL));
   
    ExpandBar expandBar = new ExpandBar(control, SWT.NONE);
   
    ExpandItem projectPropertiesExpanditem = new ExpandItem(expandBar, SWT.NONE);
    projectPropertiesExpanditem.setExpanded(true);
    projectPropertiesExpanditem.setText("Project Properties");
   
    Composite composite = new Composite(expandBar, SWT.NONE);
    projectPropertiesExpanditem.setControl(composite);
    composite.setLayout(new GridLayout(2, false));
   
    Label lblName = new Label(composite, SWT.NONE);
    lblName.setAlignment(SWT.RIGHT);
    lblName.setSize(594, 59);
    lblName.setText("Name");
   
    nameText = new Text(composite, SWT.BORDER);
    GridData gd_nameText = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gd_nameText.widthHint = 300;
    nameText.setLayoutData(gd_nameText);
    nameText.setSize(594, 67);
    nameText.setEditable(false);
   
    Label lblLibraryName = new Label(composite, SWT.NONE);
    lblLibraryName.setAlignment(SWT.RIGHT);
    lblLibraryName.setSize(594, 79);
    lblLibraryName.setText("Library Name");
   
    libraryNameText = new Text(composite, SWT.BORDER);
    libraryNameText.setEditable(false);
    GridData gd_libraryNameText = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_libraryNameText.widthHint = 95;
    libraryNameText.setLayoutData(gd_libraryNameText);
    libraryNameText.setSize(594, 94);
   
    Label lblType = new Label(composite, SWT.NONE);
    lblType.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblType.setText("Type");
   
    combo = new Combo(composite, SWT.NONE);
    combo.setVisibleItemCount(3);
    combo.setItems(new String[] {"APPLICATION", "LIBRARY", "SERVER"});
    GridData gd_combo = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_combo.widthHint = 198;
    combo.setLayoutData(gd_combo);
    new Label(composite, SWT.NONE);
   
    btnCheckButton = new Button(composite, SWT.CHECK);
    btnCheckButton.setSize(594, 118);
    btnCheckButton.setText("Restricted Availability");
    new Label(composite, SWT.NONE);
   
    btnMultithreaded = new Button(composite, SWT.CHECK);
    btnMultithreaded.setText("Multithreaded");
    new Label(composite, SWT.NONE);
   
    btnInternal = new Button(composite, SWT.CHECK);
    btnInternal.setEnabled(false);
    btnInternal.setText("Internal");
   
    Label lblCompatibilityLevel = new Label(composite, SWT.NONE);
    lblCompatibilityLevel.setSize(594, 158);
    lblCompatibilityLevel.setText("Compatibility Level");
   
    compatabilitySpinner = new Spinner(composite, SWT.BORDER);
    compatabilitySpinner.addModifyListener(dirtyListener);
    GridData gd_compatabilitySpinner = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_compatabilitySpinner.widthHint = 37;
    compatabilitySpinner.setLayoutData(gd_compatabilitySpinner);
   
    Label lblUuid = new Label(composite, SWT.NONE);
    lblUuid.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblUuid.setText("UUID");
   
    uuidText = new Text(composite, SWT.BORDER);
    uuidText.setEditable(false);
    uuidText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
   
    Label lblStart = new Label(composite, SWT.NONE);
    lblStart.setText("Start");
    new Label(composite, SWT.NONE);
   
    Label lblStartClass = new Label(composite, SWT.NONE);
    lblStartClass.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblStartClass.setBounds(0, 0, 49, 13);
    lblStartClass.setText("Class");
   
    txtStartclass = new Text(composite, SWT.BORDER);
    txtStartclass.addModifyListener(dirtyListener);
    GridData gd_txtStartclass = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gd_txtStartclass.widthHint = 300;
    txtStartclass.setLayoutData(gd_txtStartclass);
   
    Label lblStartMethod = new Label(composite, SWT.NONE);
    lblStartMethod.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblStartMethod.setText("Method");
   
    txtStartmethod = new Text(composite, SWT.BORDER);
    txtStartmethod.addModifyListener(dirtyListener);
    GridData gd_txtStartmethod = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
    gd_txtStartmethod.widthHint = 300;
    txtStartmethod.setLayoutData(gd_txtStartmethod);
    projectPropertiesExpanditem.setHeight(projectPropertiesExpanditem.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
   
    ExpandItem supplierPlansExpanditem = new ExpandItem(expandBar, SWT.NONE);
    supplierPlansExpanditem.setExpanded(true);
    supplierPlansExpanditem.setImage(ResourceManager.getPluginImage("Tool", "icons/package.gif"));
    supplierPlansExpanditem.setText("Supplier Plans");
   
    Composite composite_1 = new Composite(expandBar, SWT.NONE);
    supplierPlansExpanditem.setControl(composite_1);
   
    Button editSuppButton = new Button(composite_1, SWT.NONE);
    editSuppButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        Set<ToolPlan> allPlans = ToolProjectSupport.getAllPlansForProject(model.getProject());
        Set<ToolPlan> supplierPlans = model.getSupplierPlansAsToolPlans();
        ListSelectionDialog supplierDialog = new ListSelectionDialog(getShell(),
            allPlans,
            new IStructuredContentProvider(){

          @Override
          public void dispose() {
           
          }

          @Override
          public void inputChanged(Viewer arg0, Object arg1,
              Object arg2) {
           
          }

         

          @Override
          public Object[] getElements(Object parent) {
            if (parent instanceof Set<?>){
              return ((Set<?>)parent).toArray();
            }
            return null;
          }

         
         
        },
        new LabelProvider(),
        "Select suppier plans from list");
        supplierDialog.setInitialSelections(supplierPlans.toArray());
        supplierDialog.setTitle("Supplier Plans");
        int act = supplierDialog.open();
        switch (act){
        case Dialog.OK:
          /*
           * 1. clear the existing suppliers,
           * 2. write the selected ones
           * 3. rewrite the prx file
           */
          Object[] sups = supplierDialog.getResult();
          model.clearSuppliers();
          for (Object elem : sups){
            String name = ((ToolPlan)elem).getToolName();
            model.addSupplierPlan(name);
          }
          model.setDirty(true);
          supplierPlanTreeViewer.setInput(model.getSupplierPlansAsToolPlans());
          break;
        case Dialog.CANCEL:
          break;
        }

      }
    });
    editSuppButton.setBounds(0, 0, 94, 30);
    formToolkit.adapt(editSuppButton, true, true);
    editSuppButton.setText("Edit");
    composite_1.setLayout(new GridLayout(2, false));
   
    supplierPlanTreeViewer = new TreeViewer(composite_1, SWT.BORDER);
    Tree supplierPlanTree = supplierPlanTreeViewer.getTree();
    supplierPlanTree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    new Label(composite_1, SWT.NONE);
    new Label(composite_1, SWT.NONE);
    supplierPlanTreeViewer.setContentProvider(new ITreeContentProvider() {
     
      @Override
      public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
       
      }
     
      @Override
      public void dispose() {
       
      }
     
      @Override
      public boolean hasChildren(Object parent) {
        return false;
      }
     
      @Override
      public Object getParent(Object child) {
        return null;
      }
     
      @Override
      public Object[] getElements(Object parent) {
        if (parent instanceof Set<?>){
          return ((Set<?>)parent).toArray();
        }
        return null;
      }
     
      @Override
      public Object[] getChildren(Object parent) {
        return getElements(parent);
      }
    });
    supplierPlanTreeViewer.setLabelProvider(new LabelProvider());
    supplierPlansExpanditem.setHeight(supplierPlansExpanditem.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
    if (this.model != null){
      bind();
    }
    m_bindingContext = initDataBindings();
    return control;
View Full Code Here

  public void createPartControl(Composite parent) {
    parent.setLayout(new FillLayout(SWT.VERTICAL));
   
    ExpandBar expandBar = new ExpandBar(parent, SWT.NONE);
   
    ExpandItem projectPropertiesExpanditem = new ExpandItem(expandBar, SWT.NONE);
    projectPropertiesExpanditem.setImage(ResourceManager.getPluginImage("Tool", "icons/package.gif"));
    projectPropertiesExpanditem.setExpanded(true);
    projectPropertiesExpanditem.setText("Project Properties");
   
    Composite composite = new Composite(expandBar, SWT.NONE);
    projectPropertiesExpanditem.setControl(composite);
    composite.setLayout(new GridLayout(2, false));
   
    Label lblName = new Label(composite, SWT.NONE);
    lblName.setAlignment(SWT.RIGHT);
    lblName.setSize(594, 59);
    lblName.setText("Name");
   
    nameText = new Text(composite, SWT.BORDER);
    GridData gd_nameText = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_nameText.widthHint = 334;
    nameText.setLayoutData(gd_nameText);
    nameText.setSize(594, 67);
    nameText.setEditable(false);
   
    Label lblLibraryName = new Label(composite, SWT.NONE);
    lblLibraryName.setAlignment(SWT.RIGHT);
    lblLibraryName.setSize(594, 79);
    lblLibraryName.setText("Library Name");
   
    libraryNameText = new Text(composite, SWT.BORDER);
    GridData gd_libraryNameText = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_libraryNameText.widthHint = 95;
    libraryNameText.setLayoutData(gd_libraryNameText);
    libraryNameText.setSize(594, 94);
   
    Label lblType = new Label(composite, SWT.NONE);
    lblType.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblType.setText("Type");
   
    combo = new Combo(composite, SWT.NONE);
    combo.setVisibleItemCount(3);
    combo.setItems(new String[] {"APPLICATION", "LIBRARY", "SERVER"});
    GridData gd_combo = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_combo.widthHint = 198;
    combo.setLayoutData(gd_combo);
    new Label(composite, SWT.NONE);
   
    btnCheckButton = new Button(composite, SWT.CHECK);
    btnCheckButton.setSize(594, 118);
    btnCheckButton.setText("Restricted Availability");
    new Label(composite, SWT.NONE);
   
    btnMultithreaded = new Button(composite, SWT.CHECK);
    btnMultithreaded.setText("Multithreaded");
    new Label(composite, SWT.NONE);
   
    btnInternal = new Button(composite, SWT.CHECK);
    btnInternal.setText("Internal");
   
    Label lblCompatibilityLevel = new Label(composite, SWT.NONE);
    lblCompatibilityLevel.setSize(594, 158);
    lblCompatibilityLevel.setText("Compatibility Level");
   
    Spinner compatabilitySpinner = new Spinner(composite, SWT.BORDER);
    GridData gd_compatabilitySpinner = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_compatabilitySpinner.widthHint = 37;
    compatabilitySpinner.setLayoutData(gd_compatabilitySpinner);
   
    Label lblStart = new Label(composite, SWT.NONE);
    lblStart.setText("Start");
    new Label(composite, SWT.NONE);
   
    Label lblStartClass = new Label(composite, SWT.NONE);
    lblStartClass.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblStartClass.setBounds(0, 0, 49, 13);
    lblStartClass.setText("Class");
   
    txtStartclass = new Text(composite, SWT.BORDER);
    GridData gd_txtStartclass = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_txtStartclass.widthHint = 350;
    txtStartclass.setLayoutData(gd_txtStartclass);
   
    Label lblStartMethod = new Label(composite, SWT.NONE);
    lblStartMethod.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
    lblStartMethod.setText("Method");
   
    txtStartmethod = new Text(composite, SWT.BORDER);
    GridData gd_txtStartmethod = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
    gd_txtStartmethod.widthHint = 350;
    txtStartmethod.setLayoutData(gd_txtStartmethod);
    projectPropertiesExpanditem.setHeight(projectPropertiesExpanditem.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
   
    ExpandItem supplierPlansExpanditem = new ExpandItem(expandBar, SWT.NONE);
    supplierPlansExpanditem.setExpanded(true);
    supplierPlansExpanditem.setImage(ResourceManager.getPluginImage("Tool", "icons/package.gif"));
    supplierPlansExpanditem.setText("Supplier Plans");
   
    Composite composite_1 = new Composite(expandBar, SWT.NONE);
    supplierPlansExpanditem.setControl(composite_1);
   
    Button editSuppButton = new Button(composite_1, SWT.NONE);
    editSuppButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
//        TwoPaneElementSelector elementSelector = new TwoPaneElementSelector(getShell(), new LabelProvider(), new LabelProvider());
//        elementSelector.setTitle("SupplierPlans");
//        elementSelector.setElements(model.getSupplierPlansAsList().toArray());
//        elementSelector.setLowerListLabel("Lower List");
//        elementSelector.setUpperListLabel("Upper List");
//        elementSelector.setMultipleSelection(true);
//        //elementSelector.setInitialSelections(new String[] {"One", "Two"});
//        elementSelector.open();

//        SupplierPlanDialog.show(model.getSupplierPlansAsList(), new ArrayList<ToolPlan>());
      }
    });
    editSuppButton.setBounds(0, 0, 94, 30);
    formToolkit.adapt(editSuppButton, true, true);
    editSuppButton.setText("Edit");
    composite_1.setLayout(new GridLayout(2, false));
   
    supplierPlanTreeViewer = new TreeViewer(composite_1, SWT.BORDER);
    Tree supplierPlanTree = supplierPlanTreeViewer.getTree();
    supplierPlanTree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
    new Label(composite_1, SWT.NONE);
    new Label(composite_1, SWT.NONE);
    supplierPlanTreeViewer.setContentProvider(new ContentProvider(ContentProvider.SUPPLIERS));
    supplierPlanTreeViewer.setLabelProvider(new LabelProvider());
    supplierPlansExpanditem.setHeight(supplierPlansExpanditem.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
   
    constantsExpanditem = new ExpandItem(expandBar, SWT.NONE);
    constantsExpanditem.setImage(ResourceManager.getPluginImage("Tool", "icons/constant.gif"));
    constantsExpanditem.setText("Constants");
   
    Composite composite_2 = new Composite(expandBar, SWT.NONE);
    constantsExpanditem.setControl(composite_2);
View Full Code Here

  @Override
  public void refresh() {
    int itemOrder = 0;
    for (ProfessionPresenter professionPresenter : this.presenter
        .getProfessionPresenters()) {
      ExpandItem professionItem = new ExpandItem(
          this.professionsExpandBar, SWT.NONE, itemOrder);
      professionItem.setText(professionPresenter.getProfessionName());
      ProfessionView professionView = new ProfessionView(
          this.professionsExpandBar, professionPresenter);
      professionItem.setHeight(professionView.computeSize(SWT.DEFAULT,
          SWT.DEFAULT).y);
      professionItem.setControl(professionView);
      itemOrder = itemOrder + 1;
    }

  }
View Full Code Here

    Label labelSec3 = new Label(secondaryComposite3, SWT.NONE);
    labelSec3.setImage(display.getSystemImage(SWT.ICON_INFORMATION));
    labelSec3 = new Label(secondaryComposite3, SWT.NONE);
    labelSec3.setText("SWT.ICON_INFORMATION");

    final ExpandItem mainItem = new ExpandItem(mainExpandBar, SWT.NONE, 0);
    mainItem.setText("Main Item");
    mainItem.setControl(mainComposite);

    final ExpandItem secondaryItem = new ExpandItem(secondaryExpandBar,
        SWT.NONE, 0);
    secondaryItem.setText("Secondary item 1");
    secondaryItem.setHeight(secondaryComposite.computeSize(SWT.DEFAULT,
        SWT.DEFAULT).y);
    secondaryItem.setControl(secondaryComposite);

    final ExpandItem secondaryItem2 = new ExpandItem(secondaryExpandBar,
        SWT.NONE, 0);
    secondaryItem2.setText("Secondary item 2");
    secondaryItem2.setHeight(secondaryComposite2.computeSize(SWT.DEFAULT,
        SWT.DEFAULT).y);
    secondaryItem2.setControl(secondaryComposite2);

    final ExpandItem secondaryItem3 = new ExpandItem(secondaryExpandBar,
        SWT.NONE, 0);
    secondaryItem3.setText("Secondary item 3");
    secondaryItem3.setHeight(secondaryComposite3.computeSize(SWT.DEFAULT,
        SWT.DEFAULT).y);
    secondaryItem3.setControl(secondaryComposite3);

    /**
     * Fin ExpandBar secondaire
     */

 
View Full Code Here

    final Composite attributeExpandBarComposite2 = new Composite(
        p1attributeExpandBar, SWT.NONE);
    attributeExpandBarComposite2.setLayout(new GridLayout(2, true));

    final ExpandItem p1ExpandBarItem = new ExpandItem(professionExpandBar,
        SWT.NONE, 0);
    p1ExpandBarItem.setText("Profession 1");
    p1ExpandBarItem.setControl(p1ExpandBarComposite);

    final ExpandItem p1a1ExpandBarItem = new ExpandItem(
        p1attributeExpandBar, SWT.NONE, 0);
    p1a1ExpandBarItem.setText("Profession 1 Attribute 1");
    p1a1ExpandBarItem.setHeight(p1attributeExpandBarComposite.computeSize(
        SWT.DEFAULT, SWT.DEFAULT).y);
    p1a1ExpandBarItem.setControl(p1attributeExpandBarComposite);

    final ExpandItem attributeExpandBarItem2 = new ExpandItem(
        p1attributeExpandBar, SWT.NONE, 0);
    attributeExpandBarItem2.setText("Profession 1 Attribute 2");
    attributeExpandBarItem2.setHeight(attributeExpandBarComposite2
        .computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
    attributeExpandBarItem2.setControl(attributeExpandBarComposite2);

    p1ExpandBarItem.setHeight(p1ExpandBarComposite.computeSize(SWT.DEFAULT,
        SWT.DEFAULT).y);

    p1attributeExpandBar.addExpandListener(new ExpandListener() {
      public void itemCollapsed(ExpandEvent event) {
        System.out.println(event.item);
        p1ExpandBarItem.setHeight(p1ExpandBarItem.getHeight()
            - p1attributeExpandBarComposite.computeSize(
                SWT.DEFAULT, SWT.DEFAULT).y);
        System.out.println("itemCollapsed "
            + p1ExpandBarItem.getHeight());

      }

      public void itemExpanded(ExpandEvent event) {
        System.out.println(event.item);
        p1ExpandBarItem.setHeight(p1ExpandBarComposite.computeSize(
            SWT.DEFAULT, SWT.DEFAULT).y
            + p1attributeExpandBarComposite.computeSize(
                SWT.DEFAULT, SWT.DEFAULT).y);
        System.out.println("itemExpanded "
            + p1ExpandBarItem.getHeight());
      }
    });

    // Fin profession 1

    // Début Profession 2

    final Composite p2ExpandBarComposite = new Composite(
        professionExpandBar, SWT.NONE);
    GridLayout p2ExpandBarCompositeLayout1 = new GridLayout(2, true);
    p2ExpandBarComposite.setLayout(p2ExpandBarCompositeLayout1);

    final ExpandBar attributeExpandBar1 = new ExpandBar(
        p2ExpandBarComposite, SWT.NONE);
    attributeExpandBar1.setLayoutData(new GridData(GridData.FILL,
        GridData.FILL, true, true, 2, 1));

    final Composite p2attributeExpandBarComposite = new Composite(
        attributeExpandBar1, SWT.NONE);
    p2attributeExpandBarComposite.setLayout(new GridLayout(2, true));

    final Composite attributeExpandBarComposite21 = new Composite(
        attributeExpandBar1, SWT.NONE);
    attributeExpandBarComposite21.setLayout(new GridLayout(2, true));

    final ExpandItem professionExpandBarItem1 = new ExpandItem(
        professionExpandBar, SWT.NONE, 0);
    professionExpandBarItem1.setText("Profession 2");
    professionExpandBarItem1.setControl(p2ExpandBarComposite);

    final ExpandItem p1a1ExpandBarItem1 = new ExpandItem(
        attributeExpandBar1, SWT.NONE, 0);
    p1a1ExpandBarItem1.setText("Profession 2 Attribute 1");
    p1a1ExpandBarItem1.setHeight(p2attributeExpandBarComposite.computeSize(
        SWT.DEFAULT, SWT.DEFAULT).y);
    p1a1ExpandBarItem1.setControl(p2attributeExpandBarComposite);

    final ExpandItem attributeExpandBarItem21 = new ExpandItem(
        attributeExpandBar1, SWT.NONE, 0);
    attributeExpandBarItem21.setText("Profession 2 Attribute 2");
    attributeExpandBarItem21.setHeight(attributeExpandBarComposite21
        .computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
    attributeExpandBarItem21.setControl(attributeExpandBarComposite21);

    professionExpandBarItem1.setHeight(p2ExpandBarComposite.computeSize(
        SWT.DEFAULT, SWT.DEFAULT).y);

    attributeExpandBar1.addExpandListener(new ExpandListener() {
View Full Code Here

    }  
    return composite;
  }
 
  public void createExpandItem(String title, Composite composite) {
    ExpandItem item = new ExpandItem(bar, SWT.NONE, bar.getItemCount());  
//  if(imgGroup != null) item.setImage(imgGroup);
    item.setText(title);
    item.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
    item.setControl(composite);
  }
View Full Code Here

    // area for individual files being ignored
    Composite composite = new Composite(bar, SWT.NONE);
    new IndividualFiltersSubView(composite);

    ExpandItem item1 = new ExpandItem(bar, SWT.NONE);
    item1.setControl(composite);
    item1.setText("Individually Ignored Items");
    item1.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);

    // area for files ignored by a pattern
    composite = new Composite(bar, SWT.NONE);
    new GeneralFiltersSubView().createPartControl(composite);

    ExpandItem item2 = new ExpandItem(bar, SWT.NONE);
    item2.setControl(composite);
    item2.setText("Items Ignored by Instruction");
    item2.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
  }
View Full Code Here

        EditorUtils.openRelaciosEditor();
      }
    });
    button.setLayoutData(data);

    ExpandItem szervezesItem = new ExpandItem(bar, SWT.NONE, 0);
    szervezesItem.setText("Rel�ci�s");
    szervezesItem.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
    szervezesItem.setControl(composite);
    // szalonItem.setImage(szalonImage);

    // M�sodik elem
    composite = new Composite(bar, SWT.NONE);
    layout.marginLeft = layout.marginTop = layout.marginRight = layout.marginBottom = 10;
    layout.verticalSpacing = 10;
    composite.setLayout(layout);

    button = new Button(composite, SWT.PUSH);
    button.setText("Panel megnyit�sa");
    button.setLayoutData(data);
    button.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        EditorUtils.openObjektumRelactiosEditor();
      }
    });

    ExpandItem penzugyItem = new ExpandItem(bar, SWT.NONE, 1);
    penzugyItem.setText("Objektumrel�ci�s");
    penzugyItem.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
    penzugyItem.setControl(composite);

    bar.setSpacing(8);

  }
View Full Code Here

      return item.getParent();
    } else if (widget instanceof CTabItem) {
      CTabItem item = (CTabItem) widget;
      return item.getParent();
    } else if (widget instanceof ExpandItem) {
      ExpandItem item = (ExpandItem) widget;
      return item.getParent();
    } else if (widget instanceof TabItem) {
      TabItem item = (TabItem) widget;
      return item.getParent();
    } else if (widget instanceof TableColumn) {
      TableColumn item = (TableColumn) widget;
      return item.getParent();
    } else if (widget instanceof TableItem) {
      TableItem item = (TableItem) widget;
      return item.getParent();
    } else if (widget instanceof TableTreeItem) {
      TableTreeItem item = (TableTreeItem) widget;
      return item.getParent();
    } else if (widget instanceof ToolItem) {
      ToolItem item = (ToolItem) widget;
      return item.getParent();
    } else if (widget instanceof TreeColumn) {
      TreeColumn item = (TreeColumn) widget;
      return item.getParent();
    } else if (widget instanceof TreeItem) {
      TreeItem item = (TreeItem) widget;
      return item.getParent();
    } else if (widget instanceof Caret) {
      Caret item = (Caret) widget;
      return item.getParent();
    }
    return null;
  }
View Full Code Here

TOP

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

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.