Package org.eclipse.ui.forms.widgets

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


      timeEntryComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      timeEntryComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TITLE));
      timeEntryComposite.setBackground(bgColor);
     
     
      final AbstractHyperlink titleLink = createTitle(timeEntryComposite, toolkit, bgColor);

      final Composite detailsComposite = toolkit.createComposite(timeEntryComposite);
      timeEntryComposite.setClient(detailsComposite);

      GridLayout gl = new GridLayout(4, false);
      detailsComposite.setLayout(gl);
      GridData gd = new GridData();
      gd.horizontalSpan = 4;
      detailsComposite.setLayoutData(gd);

      /* Expand: Click on caret */
      timeEntryComposite.addExpansionListener(new ExpansionAdapter() {
        @Override
        public void expansionStateChanged(ExpansionEvent event) {
          expandTimeEntry(toolkit, detailsComposite, event.getState());
        }
      });

      /* Expand: Click on title */
      titleLink.addHyperlinkListener(new HyperlinkAdapter() {
        @Override
        public void linkActivated(HyperlinkEvent e) {
          boolean expand = !timeEntryComposite.isExpanded();
          timeEntryComposite.setExpanded(expand);
          expandTimeEntry(toolkit, detailsComposite, expand);
View Full Code Here

TOP

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

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.