private void setVersion(@Nullable String version) { if (version == null) { myVersionLabel.setText("N/A"); myVersionLabel.setForeground(JBColor.RED); } else { myVersionLabel.setText(version); myVersionLabel.setForeground(myDefaultLabelColor); } ((CardLayout)myVersionPanel.getLayout()).show(myVersionPanel, VERSION_RESULT); }
private void setVersion(@Nullable String version) { if (version == null) { myVersionLabel.setText("N/A"); myVersionLabel.setForeground(JBColor.RED); } else { myVersionLabel.setText(version); myVersionLabel.setForeground(myDefaultLabelColor); } ((CardLayout) myVersionPanel.getLayout()).show(myVersionPanel, VERSION_RESULT); }
private void initComboValues(@NotNull Module module) { if (!module.isDisposed()) { String sdkVersion = GoSdkService.getInstance(module.getProject()).getSdkVersion(module); if (!GoVendoringUtil.vendoringCanBeDisabled(sdkVersion)) { myErrorMessageLabel.setIcon(AllIcons.General.BalloonWarning); myErrorMessageLabel.setText("Go " + sdkVersion + " doesn't support disabling vendor experiment"); myErrorMessageLabel.setVisible(true); myVendoringEnabledCombo.setEnabled(false); } else if (!GoVendoringUtil.supportsVendoring(sdkVersion) && sdkVersion != null) { myErrorMessageLabel.setIcon(AllIcons.General.BalloonWarning); myErrorMessageLabel.setText("Go " + sdkVersion + " doesn't support vendor experiment"); myErrorMessageLabel.setVisible(true); myVendoringEnabledCombo.setEnabled(true); } else { myErrorMessageLabel.setVisible(false); myVendoringEnabledCombo.setEnabled(true); } myDefaultComboText = "Default for SDK (" + (GoVendoringUtil.supportsVendoringByDefault(sdkVersion) ? ENABLED : DISABLED) + ")"; //noinspection unchecked myVendoringEnabledComboModel.update(ContainerUtil.newArrayList(myDefaultComboText, ENABLED, DISABLED)); } }
@Override public void run(@NotNull ProgressIndicator indicator) { try { UIUtil.invokeLaterIfNeeded(() -> loadingDecorator.startLoading(false)); final MongoQueryOptions queryOptions = wayPoint.getQueryOptions(); if (!useCachedResults) { currentResults = mongoManager.findMongoDocuments( configuration, wayPoint.getCollection(), queryOptions); } UIUtil.invokeLaterIfNeeded(() -> { resultPanel.updateResultView(currentResults, pagination); rowCountLabel.setText(String.format("%s documents", currentResults.getDocuments().size())); initActions(resultPanel.resultTreeTableView); }); } catch (final Exception ex) { UIUtil.invokeLaterIfNeeded(() -> { errorPanel.invalidate(); errorPanel.removeAll(); errorPanel.add(new ErrorPanel(ex), BorderLayout.CENTER); errorPanel.validate(); errorPanel.setVisible(true); }); } finally { UIUtil.invokeLaterIfNeeded(loadingDecorator::stopLoading); } } });
pageNumberLabel.setVisible(false); } else { pageNumberLabel.setText( String.format("Page %d/%d", pagination.getPageNumber(),
@NotNull private JBLabel getLabel() { JBLabel label = new JBLabel(); label.setText(LABEL); label.setLabelFor(path); return label; }
@Override public void loadFrom(@NotNull XLineBreakpoint<CloudLineBreakpointProperties> breakpoint) { XBreakpointBase lineBreakpointImpl = breakpoint instanceof XBreakpointBase ? (XBreakpointBase) breakpoint : null; Breakpoint javaBreakpoint = BreakpointManager.getJavaBreakpoint(breakpoint); CloudLineBreakpoint cloudBreakpoint = null; if (javaBreakpoint instanceof CloudLineBreakpoint) { cloudBreakpoint = (CloudLineBreakpoint) javaBreakpoint; } if (cloudBreakpoint == null || lineBreakpointImpl == null) { return; } errorPanel.setVisible(cloudBreakpoint.hasError()); if (cloudBreakpoint.hasError()) { errorLabel.setForeground(JBColor.RED); errorDescription.setText(cloudBreakpoint.getErrorMessage()); } }
public void showTooltip(GraphEntity entity, VisualItem item, MouseEvent e) { if (balloon != null && !balloon.isDisposed()) { balloon.hide(); } balloonPopupBuilder.setTitle(getTooltipTitle(entity)); balloonLabel.setText(getTooltipText(entity)); balloon = balloonPopupBuilder.createBalloon(); Container panel = e.getComponent().getParent(); final int magicNumber = 15; int heightOffset = balloon.getPreferredSize().height / 2 + magicNumber; int widthOffset; if (e.getX() > panel.getWidth() / 2) { widthOffset = balloon.getPreferredSize().width / 2; } else { widthOffset = panel.getWidth() - balloon.getPreferredSize().width / 2; } balloon.show(new RelativePoint(panel, new Point(widthOffset, heightOffset)), Balloon.Position.below); }
private void checkBackgroundSessions() { boolean hasUnselectedBackgroundSessions = isContinued() && !targetMatchesCurrentState(); if (hasUnselectedBackgroundSessions) { warningHeader.setVisible(true); warningMessage.setVisible(true); warningMessage.setText( StackdriverDebuggerBundle.getString("clouddebug.terminate.background")); } }
/** * Checks for custom SDK validation errors and shows error label if they exist. To be removed once * managed SDk feature is rolled out. */ private void updateSdkValidationLabel() { if (!ServiceManager.getService(PluginInfoService.class).shouldEnable(GctFeature.MANAGED_SDK)) { String sdkValidationMessage = CloudSdkPanel.buildSdkMessage( CloudSdkServiceUserSettings.getInstance().getCustomSdkPath(), false); if (sdkValidationMessage != null) { sdkValidationErrorLabel.setText(sdkValidationMessage); sdkValidationErrorLabel.setVisible(true); } else { sdkValidationErrorLabel.setVisible(false); } } else { sdkValidationErrorLabel.setVisible(false); } } }
new Font( warningMessage.getFont().getName(), Font.PLAIN, warningHeader.getFont().getSize() - 1)); warningMessage.setText(StackdriverDebuggerBundle.getString("clouddebug.sourcedoesnotmatch"));
warningHeader.setVisible(true); warningMessage.setVisible(true); warningMessage.setText(StackdriverDebuggerBundle.getString("clouddebug.no.matching.sha")); } else if (syncResult.needsSync()) { setOkText(false); warningMessage.setVisible(true); if (syncResult.getRepositoryType() != null) { warningMessage.setText( StackdriverDebuggerBundle.getString( "clouddebug.repositories.are.not.supported", syncResult.getRepositoryType())); } else { warningMessage.setText( StackdriverDebuggerBundle.getString("clouddebug.no.remote.repository"));