本文整理了Java中org.eclipse.ui.forms.widgets.Hyperlink.setUnderlined()
方法的一些代码示例,展示了Hyperlink.setUnderlined()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hyperlink.setUnderlined()
方法的具体详情如下:
包路径:org.eclipse.ui.forms.widgets.Hyperlink
类名称:Hyperlink
方法名:setUnderlined
[英]Sets the underlined state. It is not necessary to call this method when in a hyperlink group.
[中]设置带下划线的状态。在超链接组中时,不必调用此方法。
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
public void setEditable(boolean editable) {
fText.setEditable(editable);
if (fLabel instanceof Hyperlink)
((Hyperlink) fLabel).setUnderlined(editable);
if (fBrowse != null)
fBrowse.setEnabled(editable);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
/**
* Sets the hyperlink underline mode.
*
* @param mode
* the new hyperlink underline mode
* @see HyperlinkSettings
*/
@Override
public void setHyperlinkUnderlineMode(int mode) {
super.setHyperlinkUnderlineMode(mode);
if (links != null) {
for (int i = 0; i < links.size(); i++) {
Hyperlink label = links.get(i);
label.setUnderlined(mode == UNDERLINE_ALWAYS);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
/**
* Sets the hyperlink underline mode.
*
* @param mode
* the new hyperlink underline mode
* @see HyperlinkSettings
*/
@Override
public void setHyperlinkUnderlineMode(int mode) {
super.setHyperlinkUnderlineMode(mode);
if (links != null) {
for (int i = 0; i < links.size(); i++) {
Hyperlink label = links.get(i);
label.setUnderlined(mode == UNDERLINE_ALWAYS);
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
private void onMouseExit(Event e) {
Hyperlink link = (Hyperlink) e.widget;
if (isActiveBackgroundSet)
link.setBackground(previousBackground);
if (isActiveForegroundSet)
link.setForeground(previousForeground);
if (getHyperlinkUnderlineMode() == UNDERLINE_HOVER)
link.setUnderlined(false);
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
private void onMouseExit(Event e) {
Hyperlink link = (Hyperlink) e.widget;
if (isActiveBackgroundSet)
link.setBackground(previousBackground);
if (isActiveForegroundSet)
link.setForeground(previousForeground);
if (getHyperlinkUnderlineMode() == UNDERLINE_HOVER)
link.setUnderlined(false);
}
@Override
代码示例来源:origin: org.eclipse/org.eclipse.team.ui
link.setUnderlined(true);
link.setUnderlined(true);
代码示例来源:origin: org.eclipse.platform/org.eclipse.team.ui
link.setUnderlined(true);
link.setUnderlined(true);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
/**
* Adds a hyperlink to the group to be jointly managed. Hyperlink will be
* managed until it is disposed. Settings like colors, cursors and modes
* will affect all managed hyperlinks.
*
* @param link
*/
public void add(Hyperlink link) {
if (isBackgroundSet)
link.setBackground(getBackground());
if (isForegroundSet)
link.setForeground(getForeground());
if (getHyperlinkUnderlineMode() == UNDERLINE_ALWAYS)
link.setUnderlined(true);
hook(link);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
/**
* Adds a hyperlink to the group to be jointly managed. Hyperlink will be
* managed until it is disposed. Settings like colors, cursors and modes
* will affect all managed hyperlinks.
*
* @param link
*/
public void add(Hyperlink link) {
if (isBackgroundSet)
link.setBackground(getBackground());
if (isForegroundSet)
link.setForeground(getForeground());
if (getHyperlinkUnderlineMode() == UNDERLINE_ALWAYS)
link.setUnderlined(true);
hook(link);
}
代码示例来源:origin: org.eclipse.mylyn.commons/workbench
todayLink.setUnderlined(true);
todayLink.setForeground(CommonColors.HYPERLINK_WIDGET);
GridDataFactory.fillDefaults().span(2, 1).grab(true, false).align(SWT.CENTER, SWT.TOP).applyTo(todayLink);
代码示例来源:origin: org.eclipse.egit/ui
private void createHeadLink(final Repository repository, Composite composite) throws IOException {
final ObjectId objectId = repository
.resolve(repository.getFullBranch());
if (objectId == null) {
Text headLabel = createLabeledReadOnlyText(composite, UIText.GitProjectPropertyPage_LabelId);
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);
}
});
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
private void onMouseEnter(Event e) {
Hyperlink link = (Hyperlink) e.widget;
previousBackground = link.getBackground();
previousForeground = link.getForeground();
if (isActiveBackgroundSet)
link.setBackground(getActiveBackground());
if (isActiveForegroundSet)
link.setForeground(getActiveForeground());
if (getHyperlinkUnderlineMode() == UNDERLINE_HOVER)
link.setUnderlined(true);
link.setCursor(getHyperlinkCursor());
}
private void onMouseExit(Event e) {
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ui
layout.horizontalSpan = 2;
link.setLayoutData(layout);
link.setUnderlined(true);
Color color = new Color(parent.getDisplay(),new RGB(0,0,255) );
link.setForeground(color);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
private void onMouseEnter(Event e) {
Hyperlink link = (Hyperlink) e.widget;
previousBackground = link.getBackground();
previousForeground = link.getForeground();
if (isActiveBackgroundSet)
link.setBackground(getActiveBackground());
if (isActiveForegroundSet)
link.setForeground(getActiveForeground());
if (getHyperlinkUnderlineMode() == UNDERLINE_HOVER)
link.setUnderlined(true);
link.setCursor(getHyperlinkCursor());
}
private void onMouseExit(Event e) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
if (messageHyperlink == null) {
messageHyperlink = new Hyperlink(FormHeading.this, SWT.NULL);
messageHyperlink.setUnderlined(true);
messageHyperlink.setBackground(getBackground());
messageHyperlink.setText(message);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
if (messageHyperlink == null) {
messageHyperlink = new Hyperlink(FormHeading.this, SWT.NULL);
messageHyperlink.setUnderlined(true);
messageHyperlink.setBackground(getBackground());
messageHyperlink.setText(message);
内容来源于网络,如有侵权,请联系作者删除!