From be681a635852704f8c8563278d3ed33b113fc290 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 22 Nov 2015 21:38:30 +0100 Subject: [PATCH] Changed growl to use painting instead of lots of components. No longer need this --- src/dorkbox/util/growl/GrowlCloseAdapter.java | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 src/dorkbox/util/growl/GrowlCloseAdapter.java diff --git a/src/dorkbox/util/growl/GrowlCloseAdapter.java b/src/dorkbox/util/growl/GrowlCloseAdapter.java deleted file mode 100644 index 6cb30ba..0000000 --- a/src/dorkbox/util/growl/GrowlCloseAdapter.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2015 dorkbox, llc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package dorkbox.util.growl; - -import javax.swing.Box; -import javax.swing.JLabel; -import java.awt.Color; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; - -class GrowlCloseAdapter extends MouseAdapter { - private GrowlPopup growlPopup; - private Color foreground; - - public - GrowlCloseAdapter(final GrowlPopup growlPopup) { - this.growlPopup = growlPopup; - } - - @Override - public - void mouseEntered(final MouseEvent e) { - Box source = (Box) e.getSource(); - JLabel label = (JLabel) source.getComponent(0); - foreground = label.getForeground(); - label.setForeground(Color.RED); - } - - @Override - public - void mouseExited(final MouseEvent e) { - Box source = (Box) e.getSource(); - JLabel label = (JLabel) source.getComponent(0); - label.setForeground(foreground); - } - - @Override - public - void mouseReleased(final MouseEvent e) { - growlPopup.close(); - } -}