Package org.eclipse.ui.forms.widgets

Examples of org.eclipse.ui.forms.widgets.ExpandableComposite


    }
    return null;
  }

  protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) {
    ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
    excomposite.setText(label);
    excomposite.setExpanded(false);
    excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
    excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
    excomposite.addExpansionListener(new ExpansionAdapter() {
      public void expansionStateChanged(ExpansionEvent e) {
        expandedStateChanged((ExpandableComposite) e.getSource());
      }
    });
    fExpandables.add(excomposite);
View Full Code Here


    makeScrollableCompositeAware(excomposite);
    return excomposite;
  }

  protected Composite createStyleSectionWithContentComposite(Composite parent, String label, int nColumns) {
    ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
    excomposite.setText(label);
    excomposite.setExpanded(false);
    excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
    excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
    excomposite.addExpansionListener(new ExpansionAdapter() {
      public void expansionStateChanged(ExpansionEvent e) {
        expandedStateChanged((ExpandableComposite) e.getSource());
      }
    });
    fExpandables.add(excomposite);
    makeScrollableCompositeAware(excomposite);

    Composite inner = new Composite(excomposite, SWT.NONE);
    inner.setFont(excomposite.getFont());
    inner.setLayout(new GridLayout(nColumns, false));
    excomposite.setClient(inner);
    return inner;
  }
View Full Code Here

    return null;
  }

  protected void storeSectionExpansionStates(IDialogSettings section) {
    for (int i = 0; i < fExpandables.size(); i++) {
      ExpandableComposite comp = (ExpandableComposite) fExpandables.get(i);
      section.put(SETTINGS_EXPANDED + String.valueOf(i), comp.isExpanded());
    }
  }
View Full Code Here

    }
  }

  protected void restoreSectionExpansionStates(IDialogSettings settings) {
    for (int i= 0; i < fExpandables.size(); i++) {
      ExpandableComposite excomposite= (ExpandableComposite) fExpandables.get(i);
      if (settings == null) {
        excomposite.setExpanded(i == 0); // only expand the first node by default
      } else {
        excomposite.setExpanded(settings.getBoolean(SETTINGS_EXPANDED + String.valueOf(i)));
      }
    }
  }
View Full Code Here

    layout.verticalSpacing = 0;
  }

  private Composite resetPanel( Composite panel )
  {
    ExpandableComposite pc = (ExpandableComposite) panel.getParent();
    panel.dispose();
    panel = toolkit.createComposite( pc );
    pc.setClient( panel );
    TableWrapLayout layout = new TableWrapLayout();
    panel.setLayout( layout );
    return panel;
  }
View Full Code Here

    }


    protected ExpandableComposite createExpandableSection( Composite parent, String label, int nColumns )
    {
        ExpandableComposite excomposite = new ExpandableComposite( parent, SWT.NONE, ExpandableComposite.TWISTIE
            | ExpandableComposite.CLIENT_INDENT );
        excomposite.setText( label );
        excomposite.setExpanded( false );
        excomposite.setFont( JFaceResources.getFontRegistry().getBold( JFaceResources.DIALOG_FONT ) );
        excomposite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, false, nColumns, 1 ) );
        excomposite.addExpansionListener( new ExpansionAdapter()
        {
            public void expansionStateChanged( ExpansionEvent e )
            {
                ExpandableComposite excomposite = ( ExpandableComposite ) e.getSource();
                excomposite.getParent().setSize( excomposite.getParent().computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
            }
        } );
        return excomposite;
    }
View Full Code Here

        }
    }

    private  void createAnnotationList(Composite parent) {
        ExpandableComposite exp = new ExpandableComposite(parent, SWT.NONE,
                ExpandableComposite.TREE_NODE
                | ExpandableComposite.COMPACT
                | ExpandableComposite.EXPANDED
//                | ExpandableComposite.NO_TITLE
//                | ExpandableComposite.FOCUS_TITLE
//                | ExpandableComposite.TITLE_BAR
//                | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT
                //| ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT
                );
        exp.addExpansionListener(expansionListener);
        exp.setText("Navigation");
        annotationList = new List(exp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);

        GridData data = new GridData(GridData.FILL_HORIZONTAL);
        exp.setLayoutData(data);
        exp.setClient(annotationList);
        exp.setBackground(parent.getBackground());
        exp.setFont(JFaceResources.getDialogFont());
        annotationList.setFont(JFaceResources.getDialogFont());
        annotationList.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent evnt) {
                selectInEditor(false);
View Full Code Here

    return WidgetFactory.builder(toolkit).createExpandableComposite(parent);
  }
 
  public ExpandableComposite createExpandableComposite(Composite parent, int style) {
    if (toolkit == null) {
      return new ExpandableComposite(parent, style);
    } else {
      return toolkit.createExpandableComposite(parent, style);
    }
  }
View Full Code Here

    return WidgetFactory.builder(toolkit).createExpandableComposite(parent, style);
  }
 
  public ExpandableComposite createExpandableComposite(Composite parent, int style, int expansionStyle) {
    if (toolkit == null) {
      return new ExpandableComposite(parent, style, expansionStyle);
    } else {
      ExpandableComposite ec = new ExpandableComposite(parent, style | toolkit.getOrientation(),
          expansionStyle);
      ec.setMenu(parent.getMenu());
      toolkit.adapt(ec, true, true);
      return ec;
    }
  }
View Full Code Here

    }


    protected ExpandableComposite createExpandableSection( Composite parent, String label, int nColumns )
    {
        ExpandableComposite excomposite = new ExpandableComposite( parent, SWT.NONE, ExpandableComposite.TWISTIE
            | ExpandableComposite.CLIENT_INDENT );
        excomposite.setText( label );
        excomposite.setExpanded( false );
        excomposite.setFont( JFaceResources.getFontRegistry().getBold( JFaceResources.DIALOG_FONT ) );
        excomposite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, false, nColumns, 1 ) );
        excomposite.addExpansionListener( new ExpansionAdapter()
        {
            public void expansionStateChanged( ExpansionEvent e )
            {
                ExpandableComposite excomposite = ( ExpandableComposite ) e.getSource();
                excomposite.getParent().setSize( excomposite.getParent().computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
            }
        } );
        return excomposite;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.forms.widgets.ExpandableComposite

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.