Package org.eclipse.ui.forms.widgets

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


            if ( usedFromATDs != null && usedFromATDs.size() > 0 )
            {
                usedFromSection.setText( "Used from (" + usedFromATDs.size() + ")" );
                for ( AttributeTypeDescription atd : usedFromATDs )
                {
                    Hyperlink usedFromLink = toolkit.createHyperlink( usedFromClient, SchemaUtils.toString( atd ), SWT.WRAP );
                    usedFromLink.setHref( atd );
                    usedFromLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                    usedFromLink.setUnderlined( true );
                    usedFromLink.setEnabled( true );
                    usedFromLink.addHyperlinkListener( this );
                }
            }
            else
            {
                usedFromSection.setText( "Used from (0)" );
View Full Code Here


            if ( usedFromATDs != null && !usedFromATDs.isEmpty() )
            {
                usedFromSection.setText( "Used from (" + usedFromATDs.size() + ")" );
                for ( AttributeTypeDescription atd : usedFromATDs )
                {
                    Hyperlink usedFromLink = toolkit.createHyperlink( usedFromClient, SchemaUtils.toString( atd ), SWT.WRAP );
                    usedFromLink.setHref( atd );
                    usedFromLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                    usedFromLink.setUnderlined( true );
                    usedFromLink.setEnabled( true );
                    usedFromLink.addHyperlinkListener( this );
                }
            }
            else
            {
                usedFromSection.setText( "Used from (0)" );
View Full Code Here

                for ( String name : names )
                {
                    if ( getSchema().hasAttributeTypeDescription( name ) )
                    {
                        AttributeTypeDescription mustAtd = getSchema().getAttributeTypeDescription( name );
                        Hyperlink mustLink = toolkit.createHyperlink( mustClient, SchemaUtils.toString( mustAtd ), SWT.WRAP );
                        mustLink.setHref( mustAtd );
                        mustLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                        mustLink.setUnderlined( true );
                        mustLink.setEnabled( true );
                        mustLink.addHyperlinkListener( this );
                    }
                    else
                    {
                        Hyperlink mustLink = toolkit.createHyperlink( mustClient, name, SWT.WRAP );
                        mustLink.setHref( null );
                        mustLink.setUnderlined( false );
                        mustLink.setEnabled( false );
                    }
                }
            }
            else
            {
View Full Code Here

                for ( String name : names )
                {
                    if ( getSchema().hasAttributeTypeDescription( name ) )
                    {
                        AttributeTypeDescription mayAtd = getSchema().getAttributeTypeDescription( name );
                        Hyperlink mayLink = toolkit.createHyperlink( mayClient, SchemaUtils.toString( mayAtd ), SWT.WRAP );
                        mayLink.setHref( mayAtd );
                        mayLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                        mayLink.setUnderlined( true );
                        mayLink.setEnabled( true );
                        mayLink.addHyperlinkListener( this );
                    }
                    else
                    {
                        Hyperlink mayLink = toolkit.createHyperlink( mayClient, name, SWT.WRAP );
                        mayLink.setHref( null );
                        mayLink.setUnderlined( false );
                        mayLink.setEnabled( false );
                    }
                }
            }
            else
            {
View Full Code Here

            if ( derivedAtds != null && derivedAtds.size() > 0 )
            {
                subtypesSection.setText( "Subtypes (" + derivedAtds.size() + ")" );
                for ( AttributeTypeDescription derivedAtd : derivedAtds )
                {
                    Hyperlink subAttributeTypeLink = toolkit.createHyperlink( subClient, SchemaUtils
                        .toString( derivedAtd ), SWT.WRAP );
                    subAttributeTypeLink.setHref( derivedAtd );
                    subAttributeTypeLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                    subAttributeTypeLink.setUnderlined( true );
                    subAttributeTypeLink.setEnabled( true );
                    subAttributeTypeLink.addHyperlinkListener( this );
                }
            }
            else
            {
                subtypesSection.setText( "Subtypes (0)" );
View Full Code Here

            if ( usedAsMusts != null && usedAsMusts.size() > 0 )
            {
                usedAsMustSection.setText( "Used as MUST (" + usedAsMusts.size() + ")" );
                for ( ObjectClassDescription ocd : usedAsMusts )
                {
                    Hyperlink usedAsMustLink = toolkit.createHyperlink( mustClient, SchemaUtils.toString( ocd ),
                        SWT.WRAP );
                    usedAsMustLink.setHref( ocd );
                    usedAsMustLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                    usedAsMustLink.setUnderlined( true );
                    usedAsMustLink.setEnabled( true );
                    usedAsMustLink.addHyperlinkListener( this );
                }
            }
            else
            {
                usedAsMustSection.setText( "Used as MUST (0)" );
View Full Code Here

            if ( usedAsMays != null && usedAsMays.size() > 0 )
            {
                usedAsMaySection.setText( "Used as MAY (" + usedAsMays.size() + ")" );
                for ( ObjectClassDescription ocd : usedAsMays )
                {
                    Hyperlink usedAsMayLink = toolkit
                        .createHyperlink( mayClient, SchemaUtils.toString( ocd ), SWT.WRAP );
                    usedAsMayLink.setHref( ocd );
                    usedAsMayLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                    usedAsMayLink.setUnderlined( true );
                    usedAsMayLink.setEnabled( true );
                    usedAsMayLink.addHyperlinkListener( this );
                }
            }
            else
            {
                usedAsMaySection.setText( "Used as MAY (0)" );
View Full Code Here

                for ( String name : names )
                {
                    if ( schema.hasAttributeTypeDescription( name ) )
                    {
                        AttributeTypeDescription appliesAtd = schema.getAttributeTypeDescription( name );
                        Hyperlink appliesLink = toolkit.createHyperlink( appliesClient, SchemaUtils
                            .toString( appliesAtd ), SWT.WRAP );
                        appliesLink.setHref( appliesAtd );
                        appliesLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                        appliesLink.setUnderlined( true );
                        appliesLink.setEnabled( true );
                        appliesLink.addHyperlinkListener( this );
                    }
                    else
                    {
                        Hyperlink appliesLink = toolkit.createHyperlink( appliesClient, name, SWT.WRAP );
                        appliesLink.setHref( null );
                        appliesLink.setUnderlined( false );
                        appliesLink.setEnabled( false );
                    }
                }
            }
            else
            {
View Full Code Here

    Label addLabel = new Label(optionsArea, SWT.NONE);
    Image addImage = UIIcons.NEW_REPOSITORY.createImage();
    UIUtils.hookDisposal(addLabel, addImage);
    addLabel.setImage(addImage);
    Hyperlink addLink = toolkit.createHyperlink(optionsArea,
        UIText.RepositoriesView_linkAdd, SWT.WRAP);
    addLink.setForeground(linkColor);
    addLink.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        IHandlerService service = CommonUtils.getService(getViewSite(), IHandlerService.class);
        UIUtils.executeCommand(service,
            "org.eclipse.egit.ui.RepositoriesViewAddRepository"); //$NON-NLS-1$
      }
    });
    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL)
        .grab(true, false).applyTo(addLink);

    Label cloneLabel = new Label(optionsArea, SWT.NONE);
    Image cloneImage = UIIcons.CLONEGIT.createImage();
    UIUtils.hookDisposal(cloneLabel, cloneImage);
    cloneLabel.setImage(cloneImage);
    Hyperlink cloneLink = toolkit.createHyperlink(optionsArea,
        UIText.RepositoriesView_linkClone, SWT.WRAP);
    cloneLink.setForeground(linkColor);
    cloneLink.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        IHandlerService service = CommonUtils.getService(getViewSite(), IHandlerService.class);
        UIUtils.executeCommand(service,
            "org.eclipse.egit.ui.RepositoriesViewClone"); //$NON-NLS-1$
      }
    });
    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL)
        .grab(true, false).applyTo(cloneLink);

    Label createLabel = new Label(optionsArea, SWT.NONE);
    Image createImage = UIIcons.CREATE_REPOSITORY.createImage();
    UIUtils.hookDisposal(createLabel, createImage);
    createLabel.setImage(createImage);
    Hyperlink createLink = toolkit.createHyperlink(optionsArea,
        UIText.RepositoriesView_linkCreate, SWT.WRAP);
    createLink.setForeground(linkColor);
    createLink.setText(UIText.RepositoriesView_linkCreate);
    createLink.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        IHandlerService service = CommonUtils.getService(getViewSite(), IHandlerService.class);
        UIUtils.executeCommand(service,
            "org.eclipse.egit.ui.RepositoriesViewCreateRepository"); //$NON-NLS-1$
      }
View Full Code Here

      if (repository.getAllRefs().size() == 0)
        headLabel.setText(UIText.GitProjectPropertyPage_ValueEmptyRepository);
      else
        headLabel.setText(UIText.GitProjectPropertyPage_ValueUnbornBranch);
    } else {
      Hyperlink headLink = createHeadHyperLink(composite, UIText.GitProjectPropertyPage_LabelId);
      headLink.setText(objectId.name());
      headLink.setUnderlined(true);
      headLink.setFont(JFaceResources.getDialogFont());
      headLink.setForeground(JFaceColors.getHyperlinkText(headLink
          .getDisplay()));
      headLink.addHyperlinkListener(new HyperlinkAdapter() {
        @Override
        public void linkActivated(HyperlinkEvent e) {
          RepositoryCommit commit = getCommit(repository, objectId);
          if(commit != null)
            CommitEditor.openQuiet(commit);
View Full Code Here

TOP

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

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.