Java Code Examples for com.intellij.ui.components.JBLabel#setText()
The following examples show how to use
com.intellij.ui.components.JBLabel#setText() .
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: FrameRenderingDisplay.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
private static void updateTargetLabelForRefreshRate(@Nullable Double fps, @NotNull Double defaultRefreshRate, JBLabel targetLabel) { if (fps == null) { fps = defaultRefreshRate; } final double targetFrameTime = Math.floor(1000.0f / fps); final String targetFrameTimeText = Math.round(targetFrameTime) + "ms"; targetLabel.setText(targetFrameTimeText); targetLabel .setToolTipText("Targeting " + targetFrameTimeText + " per frame will\nresult in " + Math.round(fps) + " frames per second. "); SwingUtilities.invokeLater(targetLabel::repaint); }
Example 2
Source File: FrameRenderingDisplay.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
private static void updateTargetLabelForRefreshRate(@Nullable Double fps, @NotNull Double defaultRefreshRate, JBLabel targetLabel) { if (fps == null) { fps = defaultRefreshRate; } final double targetFrameTime = Math.floor(1000.0f / fps); final String targetFrameTimeText = Math.round(targetFrameTime) + "ms"; targetLabel.setText(targetFrameTimeText); targetLabel .setToolTipText("Targeting " + targetFrameTimeText + " per frame will\nresult in " + Math.round(fps) + " frames per second. "); SwingUtilities.invokeLater(targetLabel::repaint); }
Example 3
Source File: TestConfigurationEditor.java From buck with Apache License 2.0 | 4 votes |
public TestConfigurationEditor() { root = new JPanel(new GridBagLayout()); final JBLabel targetLabel = new JBLabel(); targetLabel.setText("Targets"); mTargets = new JBTextField(); mTargets.getEmptyText().setText("Specify buck targets to test"); final JBLabel testSelectorLabel = new JBLabel(); testSelectorLabel.setText("Test selectors (--test-selectors)"); mTestSelectors = new JBTextField(); mTestSelectors .getEmptyText() .setText("Select tests to run using <class>, <#method> or <class#method>."); final JBLabel additionalParamsLabel = new JBLabel(); additionalParamsLabel.setText("Additional params"); mAdditionalParams = new JBTextField(); mAdditionalParams.getEmptyText().setText("May be empty"); final GridBagConstraints constraints = new GridBagConstraints( 0, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, JBUI.emptyInsets(), 0, 0); constraints.insets = JBUI.insetsRight(8); root.add(targetLabel, constraints); constraints.gridx = 1; constraints.gridy = 0; constraints.weightx = 1; constraints.fill = GridBagConstraints.HORIZONTAL; root.add(mTargets, constraints); constraints.gridx = 0; constraints.gridy = 1; constraints.weightx = 0; constraints.fill = GridBagConstraints.NONE; root.add(testSelectorLabel, constraints); constraints.gridx = 1; constraints.gridy = 1; constraints.weightx = 1; constraints.fill = GridBagConstraints.HORIZONTAL; root.add(mTestSelectors, constraints); constraints.gridx = 0; constraints.gridy = 2; constraints.weightx = 0; constraints.fill = GridBagConstraints.NONE; root.add(additionalParamsLabel, constraints); constraints.gridx = 1; constraints.gridy = 2; constraints.weightx = 1; constraints.fill = GridBagConstraints.HORIZONTAL; root.add(mAdditionalParams, constraints); }