@Override public void mouseEntered(MouseEvent evt) { evt.getComponent().setCursor(new Cursor(Cursor.HAND_CURSOR)); if (container.getSelectedItem() == null || item != container.getSelectedItem()) { item.setBackground(Color.YELLOW); } item.getNameLabel().setForeground(Color.red); item.getYearLabel().setForeground(Color.red); }
@Override public void mouseExited(MouseEvent evt) { evt.getComponent().setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); if (container.getSelectedItem() == null || item != container.getSelectedItem()) { item.setBackground(container.getStyleCache().get(item.getXGUI_Item().getKey())); } item.getNameLabel().setForeground(Color.black); item.getYearLabel().setForeground(Color.black); }
@Override public void mouseReleased(MouseEvent evt) { item.getNameLabel().setFont(new Font("serif", 2, 16)); item.getYearLabel().setFont(new Font("serif", 1, 12)); }