Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #345 from ggalmazor/issue_339_change_fg_color_on_e…
Browse files Browse the repository at this point in the history
…mpty_conf_buttons

Issue 339 Change color of conf override button to green when it's not empty
  • Loading branch information
yanokwa authored Feb 5, 2018
2 parents f70c128 + 6e1b7f9 commit d6639dc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import static org.opendatakit.briefcase.ui.export.components.FormsTableView.HEADERS;
import static org.opendatakit.briefcase.ui.export.components.FormsTableView.TYPES;

import java.awt.Color;
import java.awt.Font;
import java.awt.Insets;
import java.util.ArrayList;
Expand All @@ -39,6 +40,7 @@
import org.opendatakit.briefcase.ui.reused.FontUtils;

public class FormsTableViewModel extends AbstractTableModel {
private static final Color NO_CONF_OVERRIDE_COLOR = new Color(0, 128, 0);
private final List<Runnable> onChangeCallbacks = new ArrayList<>();
private final Map<FormStatus, JButton> detailButtons = new HashMap<>();
private final Map<FormStatus, JButton> confButtons = new HashMap<>();
Expand Down Expand Up @@ -121,7 +123,7 @@ private void updateDetailButton(FormStatus form, JButton button) {
}

private void updateConfButton(FormStatus form, JButton button) {
button.setForeground(forms.hasConfiguration(form) ? DARK_GRAY : LIGHT_GRAY);
button.setForeground(forms.hasConfiguration(form) ? NO_CONF_OVERRIDE_COLOR : DARK_GRAY);
}

@Override
Expand Down

0 comments on commit d6639dc

Please sign in to comment.