/** * build plugin info cell. */ protected void buildPluginInfoCell() { this.ascLink = new Link( this.dialog, SWT.NONE ); this.ascLink.setText( BaseMessages.getString( PKG, "TeraFastDialog.About.Plugin.Info" ) ); GridData grdData = new GridData(); grdData.horizontalIndent = DEFAULT_INDENT; grdData.verticalIndent = DEFAULT_INDENT; this.ascLink.setLayoutData( grdData ); this.ascLink.addListener( SWT.Selection, new Listener() { public void handleEvent( final Event event ) { Program.launch( event.text ); } } ); } }
/** * build plugin info cell. */ protected void buildPluginInfoCell() { this.ascLink = new Link( this.dialog, SWT.NONE ); this.ascLink.setText( BaseMessages.getString( PKG, "OlapInputDialog.About.Plugin.Info" ) ); GridData grdData = new GridData(); grdData.horizontalIndent = DEFAULT_INDENT; grdData.verticalIndent = DEFAULT_INDENT; this.ascLink.setLayoutData( grdData ); this.ascLink.addListener( SWT.Selection, new Listener() { public void handleEvent( final Event event ) { Program.launch( event.text ); } } ); } }
/** * build plugin info cell. */ protected void buildPluginInfoCell() { this.ascLink = new Link( this.dialog, SWT.NONE ); this.ascLink.setText( BaseMessages.getString( PKG, "SapInputDialog.About.Plugin.Info" ) ); GridData grdData = new GridData(); grdData.horizontalIndent = DEFAULT_INDENT; grdData.verticalIndent = DEFAULT_INDENT; this.ascLink.setLayoutData( grdData ); this.ascLink.addListener( SWT.Selection, new Listener() { public void handleEvent( final Event event ) { Program.launch( event.text ); } } ); } }
/** * @param factory * factory to use. */ protected void buildAscLink( final PluginWidgetFactory factory ) { final Control topControl = this.wReturn; this.wAscLink = new Link( this.shell, SWT.NONE ); this.wAscLink.setText( BaseMessages.getString( PKG, "TeraFastDialog.Provided.Info" ) ); FormData formData = factory.createLabelLayoutData( topControl ); formData.right = null; this.wAscLink.setLayoutData( formData ); }
lblNewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); lblNewLabel.setBounds(0, 0, 61, 17); lblNewLabel.setText("<a href=\"https://github.com/caoxinyu/RedisClient\">RedisClient for Windows</a>"); link.setText("<a href=\"mailto:caoxinyu@gmail.com\">" + RedisClient.i18nFile.getText(I18nFile.CAOXINYU) + "</a>"); new Label(composite, SWT.NONE); link_1.setText("<a href=\"https://github.com/caoxinyu/redisclient/issues?state=open\">" + RedisClient.i18nFile.getText(I18nFile.CLICK) + "</a>"); new Label(composite, SWT.NONE); link_2.setText("<a href=\"https://github.com/caoxinyu/RedisClient/stargazers\">" + RedisClient.i18nFile.getText(I18nFile.CLICK) + "</a>");
private void setHelpLink( Display display, String helpLink, int maxTextWidth, EnvironmentCase environment ) { link = new Link( shell, SWT.SINGLE | SWT.WRAP ); link.setText( helpLink ); if ( environment == EnvironmentCase.MAC_OS_X || environment == EnvironmentCase.MAC_OS_X_THIN ) { FontData[] fD = link.getFont().getFontData(); fD[0].setHeight( 13 ); link.setFont( new Font( display, fD[0] ) ); } FormData fdlink = new FormData(); fdlink.left = new FormAttachment( warningIcon, margin ); // Link should be below description right of icon fdlink.top = new FormAttachment( description, margin ); fdlink.width = maxTextWidth; link.setLayoutData( fdlink ); props.setLook( link ); link.addListener( SWT.Selection, new Listener() { public void handleEvent( Event event ) { if ( Desktop.isDesktopSupported() ) { try { Desktop.getDesktop().browse( new URI( Const.getDocUrl( URI_PATH ) ) ); } catch ( Exception e ) { log.logError( "Error opening external browser", e ); } } } } ); }
fdAscLink.top = new FormAttachment( wOutput, margin ); wAscLink.setLayoutData( fdAscLink ); this.wAscLink.setText( BaseMessages.getString( PKG, "SapInputDialog.Provided.Info" ) ); lastControl = wAscLink;
this.wAscLink.setText( BaseMessages.getString( PKG, "OlapInputDialog.Provided.Info" ) );
.setText( BaseMessages.getString( PKG, "GoogleAnalyticsDialog.Query.Reference.Label" ) ); props.setLook( wGaCustomProfileReference ); wGaCustomProfileReference.addListener( SWT.Selection, new Listener() { wQuDimensionsReference.setText( BaseMessages.getString( PKG, "GoogleAnalyticsDialog.Query.Reference.Label" ) ); props.setLook( wQuDimensionsReference ); wQuDimensionsReference.addListener( SWT.Selection, new Listener() { wQuMetricsReference.setText( BaseMessages.getString( PKG, "GoogleAnalyticsDialog.Query.Reference.Label" ) ); props.setLook( wQuMetricsReference ); wQuMetricsReference.addListener( SWT.Selection, new Listener() { wQuFiltersReference.setText( BaseMessages.getString( PKG, "GoogleAnalyticsDialog.Query.Reference.Label" ) ); props.setLook( wQuFiltersReference ); wQuFiltersReference.addListener( SWT.Selection, new Listener() { wQuSortReference.setText( BaseMessages.getString( PKG, "GoogleAnalyticsDialog.Query.Reference.Label" ) ); props.setLook( wQuSortReference ); wQuSortReference.addListener( SWT.Selection, new Listener() { .setText( BaseMessages.getString( PKG, "GoogleAnalyticsDialog.Query.Reference.Label" ) ); props.setLook( wQuCustomSegmentReference ); wQuCustomSegmentReference.addListener( SWT.Selection, new Listener() { wQuSamplingLevelReference.setText( BaseMessages.getString( PKG, "GoogleAnalyticsDialog.Query.Reference.Label" ) ); props.setLook( wQuSamplingLevelReference ); wQuSamplingLevelReference.addListener( SWT.Selection, new Listener() { wlFields.setText( BaseMessages.getString( PKG, "GoogleAnalyticsDialog.Return.Label" ) );
ectLink.setText("Download more themes or create your own on " + "<a>eclipsecolorthemes.org</a>."); setLinkTarget(ectLink, "http://eclipsecolorthemes.org");
@Override void doSetStringValue(Object source, String value) { ((Link) source).setText(value == null ? "" : value); //$NON-NLS-1$ }
private void updateDetails(ColorTheme theme) { if (theme == null) themeDetails.setVisible(false); else { authorLabel.setText("Created by " + theme.getAuthor()); String website = theme.getWebsite(); if (website == null || website.length() == 0) websiteLink.setVisible(false); else { websiteLink.setText("<a>" + website + "</a>"); for (Listener listener : websiteLink.getListeners( SWT.Selection)) websiteLink.removeListener(SWT.Selection, listener); setLinkTarget(websiteLink, website); websiteLink.setVisible(true); } String id = theme.getId(); Browser browser = getBrowser(); if (browser != null) browser.setUrl( "http://www.eclipsecolorthemes.org/static/themes/java/" + id + ".html"); themeDetails.setVisible(true); authorLabel.pack(); websiteLink.pack(); } }
@Override protected Control createCustomArea( Composite parent ) { Link link = new Link( parent, SWT.WRAP ); link.setText( "Please visit <a>this link</a>." ); return link; }
protected void setDescription(String description) { descriptionLabel.setText(description); parent.layout(true, true); }
private void createPreferencePageLink(Composite composite, String label, final Map<String, String> targetInfo) { final Link link= new Link(composite, SWT.NONE); link.setText(label); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, targetInfo); } }); }
private void addLink(Composite parent) { Link link= new Link(parent, SWT.NONE); link.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false)); link.setText(ReorgMessages.RenameInformationPopup_OptionsLink); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { activateEditor(); fRenameLinkedMode.startFullDialog(); } }); }
/** * Creates the "Example" widgets. */ @Override void createExampleWidgets () { /* Compute the widget style */ int style = getDefaultStyle(); if (borderButton.getSelection ()) style |= SWT.BORDER; /* Create the example widgets */ link1 = new Link (linkGroup, style); link1.setText (ControlExample.getResourceString("LinkText")); }
private void addLink(Composite parent) { Link link= new Link(parent, SWT.NONE); link.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false)); link.setText(ReorgMessages.RenameInformationPopup_OptionsLink); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { activateEditor(); fRenameLinkedMode.startFullDialog(); } }); }
private void updateMatchLocationText() { if (fMatchLocationsLink != null) { int searchFor= getSearchFor(); int totNum= MatchLocations.getTotalNumberOfSettings(searchFor); int currNum= MatchLocations.getNumberOfSelectedSettings(fMatchLocations, searchFor); fMatchLocationsLink.setText(Messages.format(SearchMessages.JavaSearchPage_match_location_link_label, new Object[] { Integer.valueOf(currNum), Integer.valueOf(totNum) })); fMatchLocationsLink.setToolTipText(SearchMessages.JavaSearchPage_match_location_link_label_tooltip); } }
public static Link createLink(Composite parent,int style ,String text){ Link link = new Link( parent, style ); link.setText(text); link.addSelectionListener(new OpenUrlListener()); return link; }