@Override public void paintComponent(Graphics g) { super.paintComponent(g); if (focused) { Color bdr = UIManager.getColor("Tree.selectionBorderColor"); //NOI18N if (bdr == null) { //Button focus color doesn't work on win classic - better to //get the color from a value we know will work - Tim if (getForeground().equals(Color.BLACK)) { //typical bdr = getBackground().darker(); } else { bdr = getForeground().darker(); } } g.setColor(bdr); g.drawRect(1, 1, getWidth() - 3, getHeight() - 3); g.setColor(bdr); } }
nullPanel = new NullPanel(node); nullPanel.setOpaque(true); } else { nullPanel.setNode(node); ((Container) focusOwner).isAncestorOf(table)); nullPanel.setBackground(tableHasFocus ? table.getSelectionBackground() : TreeTable.getUnfocusedSelectedBackground()); nullPanel.setForeground(table.getSelectionForeground().darker()); } else { nullPanel.setBackground(table.getBackground()); nullPanel.setForeground(table.getForeground()); nullPanel.setFocused (hasFocus); return nullPanel;
nullPanel = new NullPanel(n); nullPanel.setOpaque(true); } else { nullPanel.setNode(n); (focusOwner instanceof Container && ((Container) focusOwner).isAncestorOf(table)); nullPanel.setBackground( tableHasFocus ? table.getSelectionBackground() : TreeTable.getUnfocusedSelectedBackground() ); nullPanel.setForeground(table.getSelectionForeground().darker()); } else { nullPanel.setBackground(table.getBackground()); nullPanel.setForeground(table.getForeground()); nullPanel.setFocused(hasFocus);
nullPanel = new NullPanel(node); nullPanel.setOpaque(true); } else { nullPanel.setNode(node); ((Container) focusOwner).isAncestorOf(table)); nullPanel.setBackground(tableHasFocus ? table.getSelectionBackground() : TreeTable.getUnfocusedSelectedBackground()); nullPanel.setForeground(table.getSelectionForeground().darker()); } else { nullPanel.setBackground(table.getBackground()); nullPanel.setForeground(table.getForeground()); nullPanel.setFocused (hasFocus); return nullPanel;
public void paintComponent (Graphics g) { super.paintComponent(g); if (focused) { Color bdr = UIManager.getColor("Tree.selectionBorderColor"); //NOI18N if (bdr == null) { //Button focus color doesn't work on win classic - better to //get the color from a value we know will work - Tim if (getForeground().equals(Color.BLACK)) { //typical bdr = getBackground().darker(); } else { bdr = getForeground().darker(); } } g.setColor(bdr); g.drawRect(1, 1, getWidth() - 3, getHeight() - 3); g.setColor (bdr); } }
public void paintComponent (Graphics g) { super.paintComponent(g); if (focused) { Color bdr = UIManager.getColor("Tree.selectionBorderColor"); //NOI18N if (bdr == null) { //Button focus color doesn't work on win classic - better to //get the color from a value we know will work - Tim if (getForeground().equals(Color.BLACK)) { //typical bdr = getBackground().darker(); } else { bdr = getForeground().darker(); } } g.setColor(bdr); g.drawRect(1, 1, getWidth() - 3, getHeight() - 3); g.setColor (bdr); } }