Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.ExpandBar


      public void handleEvent(Event arg0) {
        loadEntries(true);
      }
    });

    bar = new ExpandBar(composite, SWT.V_SCROLL);
    bar.setLayoutData("span, w 100%-20px !,h 100%-50px !");

    cursor = col.getCollection().find().limit(maxElements);
    loadEntries(false);
View Full Code Here


  protected Control createContents(Composite parent) {
    noDefaultAndApplyButton();
    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");
   
View Full Code Here

  @Override
  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");
View Full Code Here

        scrolledComposite.setMinSize(CharacterProfessionsView.this
            .computeSize(r.width, SWT.DEFAULT));
      }
    });

    this.professionsExpandBar = new ExpandBar(scrolledComposite, SWT.NONE);
    this.professionsExpandBar.setSpacing(5);
    scrolledComposite.setContent(this.professionsExpandBar);
    refresh();
  }
View Full Code Here

    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());

    // Création de l'ExpandBar principale
    final ExpandBar mainExpandBar = new ExpandBar(shell, SWT.NONE);

    // Crée un composite qui sera stocké dans l'expandBar principale
    final Composite mainComposite = new Composite(mainExpandBar, SWT.NONE);
    GridLayout mainCompositeLayout = new GridLayout(2, true);
    mainComposite.setLayout(mainCompositeLayout);

    // Label label = new Label(mainComposite, SWT.NONE);
    // label.setImage(display.getSystemImage(SWT.ICON_WARNING));
    // label = new Label(mainComposite, SWT.NONE);
    // label.setText("SWT.ICON_WARNING");

    // Création des ExpandBar secondaires stockées dans le composite de
    // l'ExpandBar principale
    /**
     * ExpandBar secondaire dans le composite principal
     */

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

    final Composite secondaryComposite = new Composite(secondaryExpandBar,
        SWT.NONE);
    secondaryComposite.setLayout(new GridLayout(2, true));

    final Composite secondaryComposite2 = new Composite(secondaryExpandBar,
        SWT.NONE);
    secondaryComposite2.setLayout(new GridLayout(2, true));

    final Composite secondaryComposite3 = new Composite(secondaryExpandBar,
        SWT.NONE);
    secondaryComposite3.setLayout(new GridLayout(2, true));

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

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

    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
     */

    // label = new Label(mainComposite, SWT.NONE);
    // label.setImage(display.getSystemImage(SWT.ICON_QUESTION));
    // label = new Label(mainComposite, SWT.NONE);
    // 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

  public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());

    final ExpandBar professionExpandBar = new ExpandBar(shell, SWT.V_SCROLL);

    // Début Profession 1

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

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

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

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

  protected List<ExpandSelectionListener> listeners;

  public ExpandMenu(Composite comp, int style){
    super(comp, style);
    setLayout(new FillLayout());
    bar = new ExpandBar(this, SWT.V_SCROLL);
    bar.setBackground(new org.eclipse.swt.graphics.Color(getDisplay(), 255, 255, 255));
    bar.setSpacing(7);       
    bar.setCursor(new Cursor(getDisplay(), SWT.CURSOR_HAND));
    bar.setFont(UIDATA.FONT_8VB);
    listeners = new ArrayList<ExpandSelectionListener>();
View Full Code Here

  @Override
  public void createPartControl(Composite parent) {
    // parent.setLayout(new FillLayout());
    // parent = new ScrolledComposite(parent, SWT.V_SCROLL);

    ExpandBar bar = new ExpandBar(parent, SWT.V_SCROLL);

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

  public static final String ID = NavigatorView.class.getName();

  @Override
  public void createPartControl(Composite parent) {

    ExpandBar bar = new ExpandBar(parent, SWT.V_SCROLL);

    // Els� elem
    Composite composite = new Composite(bar, SWT.NONE);
    GridLayout layout = new GridLayout(1, true);
    GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
    layout.marginLeft = layout.marginTop = layout.marginRight = layout.marginBottom = 10;
    layout.verticalSpacing = 10;
    composite.setLayout(layout);

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

      @Override
      public void widgetSelected(SelectionEvent e) {
        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

      style |= SWT.BORDER;
    if (verticalButton.getSelection())
      style |= SWT.V_SCROLL;

    /* Create the example widgets */
    expandBar1 = new ExpandBar(expandBarGroup, style);

    // First item
    Composite composite = new Composite(expandBar1, SWT.NONE);
    composite.setLayout(new GridLayout());
    new Button(composite, SWT.PUSH).setText("SWT.PUSH");
View Full Code Here

TOP

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

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.