本文整理汇总了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;
}
示例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;
}
示例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;
}