本文整理汇总了Java中com.intellij.ui.HyperlinkLabel.setHyperlinkText方法的典型用法代码示例。如果您正苦于以下问题:Java HyperlinkLabel.setHyperlinkText方法的具体用法?Java HyperlinkLabel.setHyperlinkText怎么用?Java HyperlinkLabel.setHyperlinkText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.HyperlinkLabel
的用法示例。
在下文中一共展示了HyperlinkLabel.setHyperlinkText方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createNdkDownloadLink
import com.intellij.ui.HyperlinkLabel; //导入方法依赖的package包/类
private void createNdkDownloadLink() {
myNdkDownloadHyperlinkLabel = new HyperlinkLabel();
myNdkDownloadHyperlinkLabel.setHyperlinkText("", "Download", " Android NDK.");
myNdkDownloadHyperlinkLabel.addHyperlinkListener(new HyperlinkAdapter() {
@Override
protected void hyperlinkActivated(HyperlinkEvent e) {
List<IPkgDesc> requested = ImmutableList.of(PkgDesc.Builder.newNdk(FullRevision.NOT_SPECIFIED).create());
SdkQuickfixWizard wizard = new SdkQuickfixWizard(null, null, requested);
wizard.init();
if (wizard.showAndGet()) {
File ndk = IdeSdks.getAndroidNdkPath();
if (ndk != null) {
myNdkLocationTextField.setText(ndk.getPath());
}
validateState();
}
}
});
}
示例2: configureHyperLinkLabelForClassName
import com.intellij.ui.HyperlinkLabel; //导入方法依赖的package包/类
private static void configureHyperLinkLabelForClassName(final RenderingParameters renderingParameters,
HyperlinkLabel link,
@Nullable final String className) {
link.setOpaque(false);
if (className == null) {
return;
}
link.setHyperlinkText(className.substring(1 + className.lastIndexOf('.')));
link.addHyperlinkListener(new HyperlinkListener() {
@Override
public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {
PsiClass psiClass = NavigationEditorUtils.getPsiClass(renderingParameters.configuration.getModule(), className);
if (psiClass != null) {
AndroidRootComponent.launchEditor(renderingParameters, psiClass.getContainingFile(), false);
}
}
});
}
示例3: configureHyperlinkForXMLFile
import com.intellij.ui.HyperlinkLabel; //导入方法依赖的package包/类
private static void configureHyperlinkForXMLFile(final RenderingParameters renderingParameters,
HyperlinkLabel link,
@Nullable final String linkText,
@Nullable final String xmlFileName,
final boolean isMenu) {
link.setOpaque(false);
link.setHyperlinkText(linkText == null ? "" : linkText);
link.addHyperlinkListener(new HyperlinkListener() {
@Override
public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {
PsiFile layoutXmlFile =
NavigationView.getLayoutXmlFile(isMenu, xmlFileName, renderingParameters.configuration, renderingParameters.project);
AndroidRootComponent.launchEditor(renderingParameters, layoutXmlFile, false);
}
});
}
示例4: ConfigurableHandler
import com.intellij.ui.HyperlinkLabel; //导入方法依赖的package包/类
public ConfigurableHandler(HyperlinkLabel label,
final UnnamedConfigurable serverConfigurable,
C serverConfiguration,
ServerType<C> serverType) {
myServerConfigurable = serverConfigurable;
myServerConfiguration = serverConfiguration;
myServerType = serverType;
label.setHyperlinkText("Upload Public SSH Key");
label.addHyperlinkListener(this);
myLabel = label;
}
示例5: createNdkResetLink
import com.intellij.ui.HyperlinkLabel; //导入方法依赖的package包/类
private void createNdkResetLink() {
myNdkResetHyperlinkLabel = new HyperlinkLabel();
myNdkResetHyperlinkLabel.setHyperlinkText("", "Select", " default NDK");
myNdkResetHyperlinkLabel.addHyperlinkListener(new HyperlinkAdapter() {
@Override
protected void hyperlinkActivated(HyperlinkEvent e) {
// known non-null since otherwise we won't show the link
//noinspection ConstantConditions
myNdkLocationTextField.setText(IdeSdks.getAndroidNdkPath().getPath());
}
});
}
示例6: createHyperlinkLabel
import com.intellij.ui.HyperlinkLabel; //导入方法依赖的package包/类
@NotNull
private static HyperlinkLabel createHyperlinkLabel(@NotNull String beforeLinkText,
@NotNull String linkText,
@NotNull String afterLinkText,
@NotNull String target) {
HyperlinkLabel label = new HyperlinkLabel();
label.setHyperlinkText(beforeLinkText, linkText, afterLinkText);
label.setHyperlinkTarget(target);
return label;
}