- for (ComponentSelectionListener componentSelectionListener : componentSelectionListeners.getListeners(ComponentSelectionListener.class)) {
- componentSelectionListener.componentSelected(controlledComponent);
+ for (Component component : getComponents()) {
+ component.setBackground(UIManager.getColor("Panel.background"));
+ }
+ for (FilterSelectionListener filterSelectionListener : filterSelectionListeners.getListeners(FilterSelectionListener.class)) {
+ filterPanel.setBackground(Color.LIGHT_GRAY);
+ filterSelectionListener.filterSelected(filter);
+ }
+ selectedFilter = filterPanel;
+ }
+
+ @Override
+ public void mouseEntered(MouseEvent mouseEvent) {
+ if (filterPanel != selectedFilter) {
+ filterPanel.setBackground(Color.white);
+ }
+ }
+
+ @Override
+ public void mouseExited(MouseEvent mouseEvent) {
+ if (filterPanel != selectedFilter) {
+ filterPanel.setBackground(UIManager.getColor("Panel.background"));