Add tooltip to auto-repeat button in selection dialog

This commit is contained in:
Reinhard Pointner 2016-12-15 17:30:46 +08:00
parent a56f4d25ad
commit ff659a3439
1 changed files with 2 additions and 1 deletions

View File

@ -82,10 +82,11 @@ public class SelectDialog<T> extends JDialog {
// add repeat button
if (autoRepeatEnabled) {
autoRepeatCheckBox.setSelected(autoRepeatSelected);
autoRepeatCheckBox.addChangeListener(evt -> autoRepeatCheckBox.setToolTipText(autoRepeatCheckBox.isSelected() ? "Select and remember for next time" : "Select once and ask again next time"));
autoRepeatCheckBox.setCursor(getPredefinedCursor(HAND_CURSOR));
autoRepeatCheckBox.setIcon(ResourceManager.getIcon("button.repeat"));
autoRepeatCheckBox.setSelectedIcon(ResourceManager.getIcon("button.repeat.selected"));
autoRepeatCheckBox.setSelected(autoRepeatSelected);
c.add(autoRepeatCheckBox, "pos 1al select.y n select.y2");
}