gbc.anchor = GridBagConstraints.BASELINE_TRAILING;
JLabel autoBackupLabel = new JLabel(Language.INSTANCE.localize("backup.label.autobackup") + ":") {
public JToolTip createToolTip() {
JToolTip tip = super.createToolTip();
Border border = new CustomLineBorder(5, App.THEME.getHoverBorderColor(), 2);
tip.setBorder(border);
return tip;
}
};
autoBackupLabel.setIcon(helpIcon);
autoBackupLabel.setToolTipText(Language.INSTANCE.localize("backup.label.autobackup.tooltip"));
panel.add(autoBackupLabel, gbc);
JCheckBox autoBackup = new JCheckBox() {
public JToolTip createToolTip() {
JToolTip tip = super.createToolTip();
Border border = new CustomLineBorder(5, App.THEME.getHoverBorderColor(), 2);
tip.setBorder(border);
return tip;
}
};
autoBackup.setToolTipText(Language.INSTANCE.localize("backup.label.autobackup.tooltip"));
autoBackup.setSelected(App.settings.getAutoBackup());
autoBackup.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
App.settings.setAutoBackup(e.getStateChange() == ItemEvent.SELECTED);
}
});
panel.add(autoBackup, getGBCForField());
JLabel notifyLabel = new JLabel(Language.INSTANCE.localize("backup.label.notify") + ":") {
public JToolTip createToolTip() {
JToolTip tip = super.createToolTip();
Border border = new CustomLineBorder(5, App.THEME.getHoverBorderColor(), 2);
tip.setBorder(border);
return tip;
}
};
notifyLabel.setIcon(helpIcon);
notifyLabel.setToolTipText(Language.INSTANCE.localize("backup.label.notify.tooltip"));
panel.add(notifyLabel, getGBCForLabel());
JCheckBox notify = new JCheckBox() {
public JToolTip createToolTip() {
JToolTip tip = super.createToolTip();
Border border = new CustomLineBorder(5, App.THEME.getHoverBorderColor(), 2);
tip.setBorder(border);
return tip;
}
};
notify.setToolTipText(Language.INSTANCE.localize("backup.label.notify.tooltip"));