Java Code Examples for com.intellij.ui.HyperlinkLabel#setToolTipText()
The following examples show how to use
com.intellij.ui.HyperlinkLabel#setToolTipText() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FlutterSampleActionsPanel.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 6 votes |
FlutterSampleActionsPanel(@NotNull List<FlutterSample> samples) { super(EditorColors.GUTTER_BACKGROUND); icon(FlutterIcons.Flutter); text("View hosted code sample"); for (int i = 0; i < samples.size(); i++) { if (i != 0) { myLinksPanel.add(new JSeparator(SwingConstants.VERTICAL)); } final FlutterSample sample = samples.get(i); final HyperlinkLabel label = createActionLabel(sample.getClassName(), () -> browseTo(sample)); label.setToolTipText(sample.getHostedDocsUrl()); } }
Example 2
Source File: FlutterSampleActionsPanel.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 6 votes |
FlutterSampleActionsPanel(@NotNull List<FlutterSample> samples) { super(EditorColors.GUTTER_BACKGROUND); icon(FlutterIcons.Flutter); text("View hosted code sample"); for (int i = 0; i < samples.size(); i++) { if (i != 0) { myLinksPanel.add(new JSeparator(SwingConstants.VERTICAL)); } final FlutterSample sample = samples.get(i); final HyperlinkLabel label = createActionLabel(sample.getClassName(), () -> browseTo(sample)); label.setToolTipText(sample.getHostedDocsUrl()); } }
Example 3
Source File: DependencyDetail.java From intellij-spring-assistant with MIT License | 5 votes |
private HyperlinkLabel newHyperLink(DependencyLink dependencyLink, String bootVersion) { String title = dependencyLink.getTitle(); String href = dependencyLink.getHrefAfterReplacement(bootVersion); String text = title != null ? title : href; HyperlinkLabel hyperlinkLabel = new HyperlinkLabel(text); hyperlinkLabel.setToolTipText(text); hyperlinkLabel.setHyperlinkTarget(href); hyperlinkLabel.setFont(smallFont()); hyperlinkLabel.setBackground(JBColor.RED); hyperlinkLabel.setForeground(JBColor.YELLOW); return hyperlinkLabel; }
Example 4
Source File: FlutterPubspecNotificationProvider.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
FlutterPubspecActionsPanel(@NotNull Project project, @NotNull VirtualFile file) { super(EditorColors.GUTTER_BACKGROUND); this.project = project; myFile = file; icon(FlutterIcons.Flutter); text("Flutter commands"); // "flutter.pub.get" HyperlinkLabel label = createActionLabel("Pub get", () -> runPubGet(false)); label.setToolTipText("Install referenced packages"); // "flutter.pub.upgrade" label = createActionLabel("Pub upgrade", () -> runPubGet(true)); label.setToolTipText("Upgrade referenced packages to the latest versions"); // If the SDK is the right version, add a 'flutter pub outdated' command. final FlutterSdk sdk = FlutterSdk.getFlutterSdk(project); if (sdk != null && sdk.getVersion().isPubOutdatedSupported()) { // "flutter.pub.outdated" label = createActionLabel("Pub outdated", this::runPubOutdated); label.setToolTipText("Analyze packages to determine which ones can be upgraded"); } myLinksPanel.add(new JSeparator(SwingConstants.VERTICAL)); label = createActionLabel("Flutter doctor", "flutter.doctor"); label.setToolTipText("Validate installed tools and their versions"); }
Example 5
Source File: FlutterPubspecNotificationProvider.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
FlutterPubspecActionsPanel(@NotNull Project project, @NotNull VirtualFile file) { super(EditorColors.GUTTER_BACKGROUND); this.project = project; myFile = file; icon(FlutterIcons.Flutter); text("Flutter commands"); // "flutter.pub.get" HyperlinkLabel label = createActionLabel("Pub get", () -> runPubGet(false)); label.setToolTipText("Install referenced packages"); // "flutter.pub.upgrade" label = createActionLabel("Pub upgrade", () -> runPubGet(true)); label.setToolTipText("Upgrade referenced packages to the latest versions"); // If the SDK is the right version, add a 'flutter pub outdated' command. final FlutterSdk sdk = FlutterSdk.getFlutterSdk(project); if (sdk != null && sdk.getVersion().isPubOutdatedSupported()) { // "flutter.pub.outdated" label = createActionLabel("Pub outdated", this::runPubOutdated); label.setToolTipText("Analyze packages to determine which ones can be upgraded"); } myLinksPanel.add(new JSeparator(SwingConstants.VERTICAL)); label = createActionLabel("Flutter doctor", "flutter.doctor"); label.setToolTipText("Validate installed tools and their versions"); }
Example 6
Source File: DiffNotifications.java From consulo with Apache License 2.0 | 5 votes |
@Nonnull public static JPanel createNotification(@Nonnull String text, @Nullable final Color background, boolean showHideAction) { final EditorNotificationPanel panel = new EditorNotificationPanel(background); panel.text(text); if (showHideAction) { HyperlinkLabel link = panel.createActionLabel("Hide", () -> panel.setVisible(false)); link.setToolTipText("Hide this notification"); } return panel; }