Skip to content

Commit

Permalink
New icons to show clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
QuincyCantu committed Aug 26, 2024
1 parent fa669c3 commit c16170b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions pace-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
<include>log4j2.xml</include>
<include>check_20dp_FILL0_wght400_GRAD0_opsz20.png</include>
<include>close_20dp_FILL0_wght400_GRAD0_opsz20.png</include>
<include>close_hover.png</include>
<include>exclamation_20dp_FILL0_wght400_GRAD0_opsz20.png</include>
<include>keyboard_arrow_up_24dp_FILL0_wght400_GRAD0_opsz24.png</include>
<include>keyboard_arrow_down_24dp_FILL0_wght400_GRAD0_opsz24.png</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import javax.swing.ImageIcon;
Expand Down Expand Up @@ -114,6 +115,21 @@ public void mouseMoved(MouseEvent e) {
int col = table.columnAtPoint(p);
int row = table.rowAtPoint(p);
boolean errorHover = false;

String desc = (table.getValueAt(row,col) instanceof ImageIcon icon) ? icon.getDescription() : null;
if (col == 0 && Objects.equals(desc, "Package validation error")) {
for (int i = 0; i < table.getRowCount(); i++) {
if (i != row) {
ImageIcon imageIcon = getImageIcon("close_20dp_FILL0_wght400_GRAD0_opsz20.png", this.getClass());
imageIcon.setDescription("Package validation error");
table.setValueAt(imageIcon, i, 0);
}
}
ImageIcon imageIcon = getImageIcon("close_hover.png", this.getClass());
imageIcon.setDescription("Package validation error");
table.setValueAt(imageIcon, row, 0);
}

for (ObjectWithRowError exception : exceptions) {
java.lang.Throwable t = exception.throwable();
if (t instanceof FieldException fieldException) {
Expand Down
Binary file added pace-gui/src/main/resources/close_hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c16170b

Please sign in to comment.