当前位置: 首页>>代码示例>>Java>>正文


Java JBCheckBox.setToolTipText方法代码示例

本文整理汇总了Java中com.intellij.ui.components.JBCheckBox.setToolTipText方法的典型用法代码示例。如果您正苦于以下问题:Java JBCheckBox.setToolTipText方法的具体用法?Java JBCheckBox.setToolTipText怎么用?Java JBCheckBox.setToolTipText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ui.components.JBCheckBox的用法示例。


在下文中一共展示了JBCheckBox.setToolTipText方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getOptionsPanel

import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
@NotNull
private JPanel getOptionsPanel() {
    //  isEnabled
    cbEnabled = new JBCheckBox();
    cbEnabled.setSelected(directory.isEnabled());
    cbEnabled.addItemListener(e -> setEnabled(cbEnabled.isSelected()));
    cbEnabled.setToolTipText(Localizer.get("tooltip.IfCheckedElementWillBeCreated"));

    // Script
    jlScript = new IconLabel(
            Localizer.get("tooltip.ColoredWhenItemHasScript"),
            PluginIcons.SCRIPT,
            PluginIcons.SCRIPT_DISABLED
    );

    // CustomPath
    jlCustomPath = new IconLabel(
            Localizer.get("tooltip.ColoredWhenItemHasCustomPath"),
            PluginIcons.CUSTOM_PATH,
            PluginIcons.CUSTOM_PATH_DISABLED
    );

    // WriteRules
    jlWriteRules = new IconLabelCustom<Directory>(Localizer.get("tooltip.WriteRules"), directory) {
        @Override
        public void onUpdateIcon(Directory item) {
            setIcon(item.getWriteRules().toIcon());
        }
    };

    updateOptionIcons();

    JPanel optionsPanel = new JPanel(new MigLayout(new LC().insets("0").gridGap("2pt","0")));
    optionsPanel.add(cbEnabled, new CC());
    optionsPanel.add(jlScript, new CC());
    optionsPanel.add(jlCustomPath, new CC());
    optionsPanel.add(jlWriteRules, new CC());
    return optionsPanel;
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:40,代码来源:DirectoryWrapper.java

示例2: getOptionsPanel

import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
@NotNull
private JPanel getOptionsPanel() {
    JPanel optionsPanel = new JPanel(new MigLayout(new LC().insets("0").gridGap("2pt","0")));

    cbEnabled = new JBCheckBox();
    cbEnabled.setSelected(file.isEnabled());
    cbEnabled.addItemListener(e -> setEnabled(cbEnabled.isSelected()));
    cbEnabled.setToolTipText(Localizer.get("tooltip.IfCheckedElementWillBeCreated"));

    // Script
    jlScript = new IconLabel(
            Localizer.get("tooltip.ColoredWhenItemHasScript"),
            PluginIcons.SCRIPT,
            PluginIcons.SCRIPT_DISABLED
    );

    // CustomPath
    jlCustomPath = new IconLabel(
            Localizer.get("tooltip.ColoredWhenItemHasCustomPath"),
            PluginIcons.CUSTOM_PATH,
            PluginIcons.CUSTOM_PATH_DISABLED
    );

    // WriteRules
    jlWriteRules = new IconLabelCustom<File>(Localizer.get("tooltip.WriteRules"), file) {
        @Override
        public void onUpdateIcon(File item) {
            setIcon(item.getWriteRules().toIcon());
        }
    };

    updateOptionIcons();

    optionsPanel.add(cbEnabled, new CC());
    optionsPanel.add(jlScript, new CC());
    optionsPanel.add(jlCustomPath, new CC());
    optionsPanel.add(jlWriteRules, new CC());
    return optionsPanel;
}
 
开发者ID:CeH9,项目名称:PackageTemplates,代码行数:40,代码来源:FileWrapper.java

示例3: createCenterPanel

import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
@NotNull
public JComponent createCenterPanel() {
  MigLayout migLayout = new MigLayout("flowy,ins 0, fill");
  JPanel contentPane = new JPanel(migLayout);

  myPullCheckBox = new JBCheckBox("Pull", true);
  myPullCheckBox.setMnemonic('p');
  myPullCheckBox.setToolTipText("Pull from the default remote repository");
  myPullCheckBox.setSelected(true);

  myOnlyUpdateButton = new JRadioButton("Only Update", true);
  myOnlyUpdateButton.setMnemonic('u');
  myOnlyUpdateButton.setToolTipText("Update to the head of the current branch");

  myMergeRadioButton = new JRadioButton("Merge", false);
  myMergeRadioButton.setMnemonic('m');
  myMergeRadioButton.setToolTipText("Merge if pulling resulted in extra heads");
  myMergeRadioButton.addItemListener(new ItemListener() {
    @Override
    public void itemStateChanged(ItemEvent e) {
      updateEnabledStates();
    }
  });

  myCommitAfterMergeCheckBox = new JCheckBox("Commit after merge without conflicts", false);
  myCommitAfterMergeCheckBox.setMnemonic('c');
  myCommitAfterMergeCheckBox.setToolTipText("Commit automatically after the merge");
  myCommitAfterMergeCheckBox.setSelected(false);

  myRebaseRadioButton = new JRadioButton("Rebase", false);
  myRebaseRadioButton.setToolTipText("Rebase changesets to a branch tip as destination");
  myRebaseRadioButton.setMnemonic('r');


  contentPane.add(myPullCheckBox, "left");
  JPanel strategyPanel = new JPanel(migLayout);
  strategyPanel.setBorder(IdeBorderFactory.createTitledBorder("Update Strategy", false));
  strategyPanel.add(myOnlyUpdateButton, "left");
  strategyPanel.add(myMergeRadioButton, "left");
  strategyPanel.add(myCommitAfterMergeCheckBox, "gapx 5%");
  strategyPanel.add(myRebaseRadioButton, "left");
  contentPane.add(strategyPanel);
  ButtonGroup group = new ButtonGroup();
  group.add(myOnlyUpdateButton);
  group.add(myRebaseRadioButton);
  group.add(myMergeRadioButton);
  updateEnabledStates();
  return contentPane;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:50,代码来源:HgUpdateDialog.java


注:本文中的com.intellij.ui.components.JBCheckBox.setToolTipText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。