Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.ExpandListener


    // label.setText("SWT.ICON_QUESTION");

    mainItem
        .setHeight(mainComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);

    secondaryExpandBar.addExpandListener(new ExpandListener() {
      public void itemCollapsed(ExpandEvent event) {
        System.out.println(event.item);
        mainItem.setHeight(mainItem.getHeight()
            - secondaryComposite.computeSize(SWT.DEFAULT,
                SWT.DEFAULT).y);
View Full Code Here


    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() {
      public void itemCollapsed(ExpandEvent event) {
        System.out.println(event.item);
        professionExpandBarItem1.setHeight(professionExpandBarItem1
            .getHeight()
            - p2attributeExpandBarComposite.computeSize(
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.ExpandListener

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.