Skip to content

Commit

Permalink
used a little more forceful approach to remove focus highlight border
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Clewlow authored and Eugene Clewlow committed Oct 29, 2022
1 parent 87ac73a commit ed4978b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/com/eclewlow/sequential/prophet6/Prophet6SoundLibrarian.java
Expand Up @@ -139,6 +139,9 @@ public Component prepareRenderer(TableCellRenderer renderer, int row, int column
returnComp.setBackground(bg);
bg = null;
}

JComponent jcomp = (JComponent) returnComp;
jcomp.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));

return returnComp;
};
Expand All @@ -153,10 +156,6 @@ public DragDropList() {

setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

UIManager.put("Table.dropLineColor", Color.cyan);
UIManager.put("Table.dropLineShortColor", Color.cyan);
UIManager.put("Table.focusCellHighlightBorder", BorderFactory.createEmptyBorder(1, 1, 1, 1));

setDragEnabled(true);
setTransferHandler(new MyListDropHandler(this));

Expand Down Expand Up @@ -1332,6 +1331,9 @@ public Component prepareRenderer(TableCellRenderer renderer, int row, int column
bg = null;
}

JComponent jcomp = (JComponent) returnComp;
jcomp.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));

if (Prophet6SoundLibrarianMergeDragStateManager.getInstance().isDragging()) {
if (mode == MERGE_TABLE_MODE_DESTINATION) {
int selectedRow = getSelectedRow();
Expand Down Expand Up @@ -2049,6 +2051,10 @@ public void run() {
try {
// set the look and feel
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
UIManager.put("Table.dropLineColor", Color.cyan);
UIManager.put("Table.dropLineShortColor", Color.cyan);
UIManager.put("Table.focusCellHighlightBorder", BorderFactory.createEmptyBorder(1, 1, 1, 1));

} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit ed4978b

Please sign in to comment.