Package org.eclipse.ui.forms.widgets

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


                    .setText( NLS
                        .bind(
                            Messages.getString( "AttributeTypeDescriptionDetailsPage.UsedAsMayCount" ), new Object[] { usedAsMays.size() } ) ); //$NON-NLS-1$
                for ( ObjectClass 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( NLS.bind( Messages
View Full Code Here


    public void linkEntered(final HyperlinkEvent e) {}

    public void linkExited(HyperlinkEvent e) {}

    private void showPopup(final HyperlinkEvent e) {
        Hyperlink link = (Hyperlink) e.getSource();
        link.setToolTipText(null);

        if (popupDialog != null)
            popupDialog.close();
        popupDialog = new MessagesPopupDialog(link, (IMessage[]) e.data, part);
        popupDialog.open();
View Full Code Here

        if (prefs.getBrowserSelection() == JpmPreferences.PREF_BROWSER_EXTERNAL) {
            external = true;
            Composite composite = new Composite(parent, SWT.NONE);
            composite.setLayout(new GridLayout(2, false));
            new Label(composite, SWT.NONE).setText("JPM is configured to open in an external browser.");
            Hyperlink linkToPrefs = new Hyperlink(composite, SWT.NONE);
            linkToPrefs.setText("Open Preference Page");
            linkToPrefs.setUnderlined(true);
            linkToPrefs.addHyperlinkListener(new HyperlinkAdapter() {
                @Override
                public void linkActivated(HyperlinkEvent e) {
                    PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getViewSite().getShell(), "bndtools.prefPages.jpm", new String[] {
                        "bndtools.prefPages.jpm"
                    }, null);
View Full Code Here

        messageLabel.setBackground(getDisplay().
                getSystemColor(SWT.COLOR_LIST_BACKGROUND));
        messageLabel.setText(EditorMessages.getString(RESOURCE_PREFIX +
                "label.message")); //$NON-NLS-1$

        hyperlink = new Hyperlink(displayArea, SWT.NONE);
        hyperlink.setBackground(getDisplay().
                getSystemColor(SWT.COLOR_LIST_BACKGROUND));

        activeLinkForeground =
                JFaceColors.getActiveHyperlinkText(getDisplay());
View Full Code Here

        noErrors = new Label(displayArea, SWT.LEFT);
        setDefaultColour(noErrors);
        noErrors.setText(EditorMessages.getString(RESOURCE_PREFIX + "errors.none"));

        hyperlink = new Hyperlink(displayArea, SWT.NONE);
        setDefaultColour(hyperlink);

        final Color activeLinkForeground =
                JFaceColors.getActiveHyperlinkText(getDisplay());
        final Color inactiveLinkForeground =
View Full Code Here

  private void createControl(Composite parent, FormToolkit toolkit, String labelText, int style, String browseText,
      boolean linkLabel, int indent, int tcolspan)
    {
    if (linkLabel)
      {
      Hyperlink link = toolkit.createHyperlink(parent, labelText, SWT.NULL);
      fLabel = link;
      }
    else
      {
      if (labelText != null)
View Full Code Here

            Composite bshComposite = new Composite(tabFolder, SWT.BORDER);
            bshComposite.setLayout(new GridLayout());
            bshComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
            tabs[1].setControl(bshComposite);

            Hyperlink hl3 = new Hyperlink(bshComposite, SWT.NONE);
            hl3.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
            hl3.setText(Messages.getString("button.insert_variable"));
            hyperlinkGroup.add(hl3);

            bshCodeText = new StyledText(bshComposite, SWT.BORDER | SWT.MULTI);
            bshCodeText.setLayoutData(new GridData(GridData.FILL_BOTH));
            bshCodeText.addLineStyleListener(new JavaHighlightTextStyling(bshVariableNames));

            hl3.addHyperlinkListener(new HyperlinkAdapter() {
                @Override
                public void linkActivated(HyperlinkEvent e) {
                    ChooseVariableDialog dialog = new ChooseVariableDialog(bshVariableNames);
                    String variableName = dialog.openDialog();
                    if (variableName != null) {
View Full Code Here

        protected void createDialogHeader(Composite parent) {
            Composite composite = new Composite(parent, SWT.NONE);
            composite.setLayout(new GridLayout(3, false));
            composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

            Hyperlink hl1 = new Hyperlink(composite, SWT.NONE);
            hl1.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END));
            hl1.setText(Messages.getString("help"));
            hl1.addHyperlinkListener(new HyperlinkAdapter() {
                @Override
                public void linkActivated(HyperlinkEvent e) {
                    try {
                        String lang = Locale.getDefault().getLanguage();
                        InputStream is = FormulaCellEditorProvider.class.getResourceAsStream("FormulaHelp_" + lang);
                        if (is == null) {
                            is = FormulaCellEditorProvider.class.getResourceAsStream("FormulaHelp");
                        }
                        String help = IOUtils.readStream(is);
                        HelpDialog dialog = new HelpDialog(help);
                        dialog.open();
                    } catch (IOException ex) {
                        DesignerLogger.logError("Unable to find help file", ex);
                    }
                }
            });
            hyperlinkGroup.add(hl1);

            Hyperlink hl2 = new Hyperlink(composite, SWT.NONE);
            hl2.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
            hl2.setText(Messages.getString("button.insert_function"));
            hl2.addHyperlinkListener(new HyperlinkAdapter() {
                @Override
                public void linkActivated(HyperlinkEvent e) {
                    ChooseFunctionDialog dialog = new ChooseFunctionDialog();
                    String function = dialog.openDialog();
                    if (function != null) {
                        styledText.insert(function);
                        styledText.setFocus();
                        styledText.setCaretOffset(styledText.getCaretOffset() + function.length());
                    }
                }
            });
            hyperlinkGroup.add(hl2);

            Hyperlink hl3 = new Hyperlink(composite, SWT.NONE);
            hl3.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
            hl3.setText(Messages.getString("button.insert_variable"));
            hl3.addHyperlinkListener(new HyperlinkAdapter() {
                @Override
                public void linkActivated(HyperlinkEvent e) {
                    ChooseVariableDialog dialog = new ChooseVariableDialog(variableNames);
                    String variableName = dialog.openDialog();
                    if (variableName != null) {
View Full Code Here

    private static HyperlinkGroup hyperlinkGroup = new HyperlinkGroup(Display.getCurrent());
   
    public static Composite createHeader(Composite parent, final DataImporter importer) {
        Composite composite = new Composite(parent, SWT.NONE);
        composite.setLayout(new GridLayout(2, true));
        Hyperlink editSettingsLink = createLink(composite, Messages.getString("button.ConnectionSettings"));
        final Hyperlink syncItemsLink = createLink(composite, Messages.getString("button.Synchronize"));
        editSettingsLink.addHyperlinkListener(new HyperlinkAdapter() {

            @Override
            public void linkActivated(HyperlinkEvent e) {
                SyncSettingsWizardPage page = importer.createConnectionSettingsWizardPage();
                SyncSettingsWizard wizard = new SyncSettingsWizard(page);
                ConnectionSettingsDialog dialog = new ConnectionSettingsDialog(wizard);
                dialog.open();
                syncItemsLink.setEnabled(importer.isConfigured());
            }
           
        });
        syncItemsLink.addHyperlinkListener(new HyperlinkAdapter() {
            @Override
            public void linkActivated(HyperlinkEvent e) {
                try {
                    importer.synchronize();
                } catch (Exception ex) {
                    DesignerLogger.logError(Messages.getString("error.Synchronize"), ex);
                }
            }
        });
        syncItemsLink.setEnabled(importer.isConfigured());
        return composite;
    }
View Full Code Here

        syncItemsLink.setEnabled(importer.isConfigured());
        return composite;
    }
   
    private static Hyperlink createLink(Composite parent, String msg) {
        Hyperlink link = new Hyperlink(parent, SWT.NONE);
        link.setText(msg);
        hyperlinkGroup.add(link);
        return link;
    }
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.