/** * 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, "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 ); } } ); } }
/** * 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 ); } } ); } }
/** * @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.addSelectionListener(openUrl); lblNewLabel.setFont(SWTResourceManager.getFont("Arial", 20, SWT.NORMAL)); 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>");
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.left = new FormAttachment( 0, 0 ); fdAscLink.top = new FormAttachment( wOutput, margin ); wAscLink.setLayoutData( fdAscLink ); this.wAscLink.setText( BaseMessages.getString( PKG, "SapInputDialog.Provided.Info" ) ); lastControl = wAscLink;
fdAscLink.bottom = new FormAttachment( wlPosition, -2 * margin ); wAscLink.setLayoutData( fdAscLink ); this.wAscLink.setText( BaseMessages.getString( PKG, "OlapInputDialog.Provided.Info" ) );
fdGaCustomProfileReference.left = new FormAttachment( wGaCustomProfile, 0 ); fdGaCustomProfileReference.right = new FormAttachment( 100, 0 ); wGaCustomProfileReference.setLayoutData( fdGaCustomProfileReference ); fdQuDimensionsReference.left = new FormAttachment( wQuDimensions, 0 ); fdQuDimensionsReference.right = new FormAttachment( 100, 0 ); wQuDimensionsReference.setLayoutData( fdQuDimensionsReference ); fdQuMetricsReference.left = new FormAttachment( wQuMetrics, 0 ); fdQuMetricsReference.right = new FormAttachment( 100, 0 ); wQuMetricsReference.setLayoutData( fdQuMetricsReference ); fdQuFiltersReference.left = new FormAttachment( wQuFilters, 0 ); fdQuFiltersReference.right = new FormAttachment( 100, 0 ); wQuFiltersReference.setLayoutData( fdQuFiltersReference ); fdQuSortReference.left = new FormAttachment( wQuSort, 0 ); fdQuSortReference.right = new FormAttachment( 100, 0 ); wQuSortReference.setLayoutData( fdQuSortReference ); fdQuCustomSegmentReference.left = new FormAttachment( wQuCustomSegment, 0 ); fdQuCustomSegmentReference.right = new FormAttachment( 100, 0 ); wQuCustomSegmentReference.setLayoutData( fdQuCustomSegmentReference ); fdQuSamplingLevelReference.left = new FormAttachment( wQuDimensions, 0 ); fdQuSamplingLevelReference.right = new FormAttachment( 100, 0 ); wQuSamplingLevelReference.setLayoutData( fdQuSamplingLevelReference ); fdlReturn.left = new FormAttachment( 0, 0 );
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 Link createLink(Composite composite, ListenerMix listener) { Link link= new Link(composite, SWT.WRAP); GridData layoutData= new GridData(SWT.FILL, SWT.CENTER, true, false); layoutData.widthHint= convertWidthInCharsToPixels(80); link.setLayoutData(layoutData); link.addSelectionListener(listener); return link; }
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 createRemindSection(Composite parent) { remindLink = new Link(parent, SWT.MULTI | SWT.WRAP | SWT.RIGHT); updateRemindText(); remindLink.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), PreferenceConstants.PREF_PAGE_AUTO_UPDATES, null, null); dialog.open(); } }); remindLink.setLayoutData(new GridData(GridData.FILL_BOTH)); }
public static Link createLink(Composite parent, String text, Font font, int hspan, int fill) { Link l = new Link(parent, SWT.UNDERLINE_LINK); l.setFont(font); l.setText(text); GridData gd = new GridData(fill); gd.horizontalSpan = hspan; l.setLayoutData(gd); return l; }
public static Link createLink(Composite parent, String text, Font font, int hspan, int fill) { Link l = new Link(parent, SWT.UNDERLINE_LINK); l.setFont(font); l.setText(text); GridData gd = new GridData(fill); gd.horizontalSpan = hspan; l.setLayoutData(gd); return l; }
private void createPreferencePageLink(Composite composite, String label, final Map<String, String> targetInfo) { final Link link= new Link(composite, SWT.NONE); link.setText(label); link.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false, 2, 1)); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, targetInfo); } }); }
private void createPreferencePageLink(Composite composite, String label, final Map<String, String> targetInfo) { final Link link= new Link(composite, SWT.NONE); link.setText(label); link.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false, 2, 1)); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, targetInfo); } }); }
private Link createLink(Composite composite, ListenerMix listener) { Link link= new Link(composite, SWT.WRAP); GridData layoutData= new GridData(SWT.FILL, SWT.CENTER, true, false); layoutData.widthHint= convertWidthInCharsToPixels(80); link.setLayoutData(layoutData); link.addSelectionListener(listener); return link; }
private Link createHelpLink(Composite parent) { Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS); ((GridLayout) parent.getLayout()).numColumns++; link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER)); link.setText("<a>"+IDialogConstants.HELP_LABEL+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$ link.setToolTipText(IDialogConstants.HELP_LABEL); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { helpPressed(); } }); return link; }
private Link createHelpLink(Composite parent) { Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS); ((GridLayout) parent.getLayout()).numColumns++; link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER)); link.setText("<a>"+IDialogConstants.HELP_LABEL+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$ link.setToolTipText(IDialogConstants.HELP_LABEL); link.addSelectionListener(widgetSelectedAdapter(e -> helpPressed())); return link; }