diff --git a/src/org/opendatakit/briefcase/ui/FormTransferTable.java b/src/org/opendatakit/briefcase/ui/FormTransferTable.java index 05659049e..30a7c8221 100644 --- a/src/org/opendatakit/briefcase/ui/FormTransferTable.java +++ b/src/org/opendatakit/briefcase/ui/FormTransferTable.java @@ -16,6 +16,9 @@ package org.opendatakit.briefcase.ui; +import static java.awt.Color.DARK_GRAY; +import static java.awt.Color.LIGHT_GRAY; + import java.awt.Component; import java.awt.Dimension; import java.awt.Font; @@ -122,7 +125,8 @@ public static class DetailButton extends JButton implements ActionListener { // Use custom fonts instead of png for easier scaling this.setFont(ic_receipt); // custom font that overrides  with a receipt icon this.setToolTipText("View this form's status history"); - this.setMargin(new Insets(0,0,0,0)); + this.setForeground(LIGHT_GRAY); + this.setMargin(new Insets(0, 0, 0, 0)); this.status = status; this.addActionListener(this); log.debug("creating details button"); @@ -384,6 +388,13 @@ public void formsAvailableFromServer(RetrieveAvailableFormsSucceededEvent event) } } + @EventSubscriber(eventClass = FormStatusEvent.class) + public void onFormStatusEvent(FormStatusEvent event) { + ((FormTransferTableModel) dataModel).buttonMap.forEach((form, button) -> + button.setForeground(form.getStatusHistory().isEmpty() ? LIGHT_GRAY : DARK_GRAY) + ); + } + public List getSelectedForms() { FormTransferTableModel model = (FormTransferTableModel) this.dataModel; return model.getSelectedForms();