本文整理了Java中org.eclipse.ui.forms.widgets.Hyperlink.setLayoutData()
方法的一些代码示例,展示了Hyperlink.setLayoutData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hyperlink.setLayoutData()
方法的具体详情如下:
包路径:org.eclipse.ui.forms.widgets.Hyperlink
类名称:Hyperlink
方法名:setLayoutData
暂无
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
private void createAdvancedLink(Composite parent, FormToolkit toolkit) {
advancedLink = toolkit.createHyperlink(parent, Messages.FederatedSearchPart_advanced, SWT.NULL);
advancedLink.addHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
doAdvanced();
}
});
TableWrapData td = new TableWrapData();
td.colspan = 2;
advancedLink.setLayoutData(td);
}
代码示例来源:origin: org.eclipse.egit/ui
private Hyperlink createHeadHyperLink(Composite composite,
String labelText) {
createLabel(composite, labelText);
Hyperlink hyperlink = new Hyperlink(composite, SWT.NONE);
hyperlink.setLayoutData(GridDataFactory.fillDefaults().create());
return hyperlink;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro
private Hyperlink createStaticPage(Composite parent) {
Form mainForm = toolkit.createForm(parent);
Composite body = mainForm.getBody();
GridLayout gl = new GridLayout();
body.setLayout(gl);
String label = Messages.StaticHTML_welcome;
Hyperlink link = toolkit.createHyperlink(body, label, SWT.WRAP);
link.setFont(PageStyleManager.getHeaderFont());
GridData gd = new GridData(GridData.GRAB_HORIZONTAL
| GridData.GRAB_VERTICAL);
gd.horizontalAlignment = GridData.CENTER;
gd.verticalAlignment = GridData.CENTER;
link.setLayoutData(gd);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
Hyperlink link = (Hyperlink) e.getSource();
Util.openBrowser((String) link.getHref());
return;
}
});
return link;
}
代码示例来源:origin: inspectIT/inspectIT
/**
* Creates links for given commands on the parent composite.
*
* @param parent
* Parent composite.
* @param toolkit
* {@link FormToolkit} to use.
* @param commandMap
* IDs of the commands to display. Only active ones will be displayed.
*/
private void createLinks(Composite parent, FormToolkit toolkit, Map<String, String> commandMap) {
for (Map.Entry<String, String> entry : commandMap.entrySet()) {
Command command = commandService.getCommand(entry.getKey());
if (command.isDefined() && (null != command.getHandler()) && command.getHandler().isEnabled()) {
toolkit.createLabel(parent, "", SWT.NONE).setImage(arrow);
Hyperlink link = toolkit.createHyperlink(parent, entry.getValue(), SWT.WRAP);
link.addHyperlinkListener(new CommandHyperlinkListener(command));
link.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
}
}
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor.forms.common
public void createStandardLinkText ( final Composite parent, final String linkFactory, final String attributeName, final String label, final String textMessage, final ConfigurationEditorInput input, final Object valueType )
{
this.toolkit.createLabel ( parent, label + ":" );
final Text text = this.toolkit.createText ( parent, "" );
text.setMessage ( textMessage );
text.setLayoutData ( new GridData ( GridData.FILL, GridData.BEGINNING, true, true ) );
text.setToolTipText ( textMessage );
final IObservableValue value = Observables.observeMapEntry ( input.getDataMap (), attributeName, valueType );
this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), value );
final Hyperlink link = this.toolkit.createHyperlink ( parent, "link", SWT.NONE );
link.setLayoutData ( new GridData ( GridData.FILL, GridData.BEGINNING, false, false ) );
link.addHyperlinkListener ( new HyperlinkAdapter () {
@Override
public void linkActivated ( final HyperlinkEvent e )
{
EditorHelper.handleOpen ( PlatformUI.getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), input.getConnectionUri (), linkFactory, text.getText () );
}
} );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor.forms.common
public void createStandardLinkText ( final Composite parent, final String linkFactory, final String attributeName, final String label, final String textMessage, final ConfigurationEditorInput input, final Object valueType )
{
this.toolkit.createLabel ( parent, label + ":" );
final Text text = this.toolkit.createText ( parent, "" );
text.setMessage ( textMessage );
text.setLayoutData ( new GridData ( GridData.FILL, GridData.BEGINNING, true, true ) );
text.setToolTipText ( textMessage );
final IObservableValue value = Observables.observeMapEntry ( input.getDataMap (), attributeName, valueType );
this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), value );
final Hyperlink link = this.toolkit.createHyperlink ( parent, "link", SWT.NONE );
link.setLayoutData ( new GridData ( GridData.FILL, GridData.BEGINNING, false, false ) );
link.addHyperlinkListener ( new HyperlinkAdapter () {
@Override
public void linkActivated ( final HyperlinkEvent e )
{
EditorHelper.handleOpen ( PlatformUI.getWorkbench ().getActiveWorkbenchWindow ().getActivePage (), input.getConnectionUri (), linkFactory, text.getText () );
}
} );
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
@Override
public void createDetails(Composite parent) {
FormToolkit toolkit = getManagedForm().getToolkit();
createMinOccurComp(parent, toolkit);
createMaxOccurComp(parent, toolkit);
fRefLabel = toolkit.createLabel(parent, PDEUIMessages.SchemaElementReferenceDetails_reference);
fRefLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
fReferenceLink = toolkit.createHyperlink(parent, "", SWT.NONE); //$NON-NLS-1$
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
fReferenceLink.setLayoutData(gd);
setText(PDEUIMessages.SchemaElementReferenceDetails_title);
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.server.ui
editDefaults.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
whs.setHelp(editDefaults, ContextIds.EDITOR_AUTOPUBLISH_DEFAULT);
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ui
GridData layout = new GridData(GridData.HORIZONTAL_ALIGN_END);
layout.horizontalSpan = 2;
link.setLayoutData(layout);
link.setUnderlined(true);
Color color = new Color(parent.getDisplay(),new RGB(0,0,255) );
代码示例来源:origin: inspectIT/inspectIT
Hyperlink copyLink = toolkit.createHyperlink(actionsComposite, "Copy", SWT.WRAP);
copyLink.addHyperlinkListener(new CopyHyperlinkListener());
copyLink.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
代码示例来源:origin: org.eclipse/org.eclipse.wst.server.ui
link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
GridData data = new GridData();
data.horizontalSpan = 2;
link.setLayoutData(data);
link.addHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
GridData gd = new GridData();
gd.horizontalSpan = 2;
link.setLayoutData(gd);
gd = new GridData();
gd.horizontalSpan = 2;
link.setLayoutData(gd);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro
td = new TableWrapData(TableWrapData.LEFT, TableWrapData.BOTTOM);
td.grabVertical = true;
linkControl.setLayoutData(td);
内容来源于网络,如有侵权,请联系作者删除!