From ed4978b0ea960d5eb2128f001e76704d887b8c9b Mon Sep 17 00:00:00 2001 From: Eugene Clewlow Date: Fri, 28 Oct 2022 18:32:25 -0700 Subject: [PATCH] used a little more forceful approach to remove focus highlight border --- .../prophet6/Prophet6SoundLibrarian.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/com/eclewlow/sequential/prophet6/Prophet6SoundLibrarian.java b/src/com/eclewlow/sequential/prophet6/Prophet6SoundLibrarian.java index 43570f0..1fb0862 100644 --- a/src/com/eclewlow/sequential/prophet6/Prophet6SoundLibrarian.java +++ b/src/com/eclewlow/sequential/prophet6/Prophet6SoundLibrarian.java @@ -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; }; @@ -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)); @@ -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(); @@ -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(); }