11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.*;
25 import java.awt.image.BufferedImage;
26 import java.beans.PropertyChangeEvent;
27 import java.beans.PropertyChangeListener;
28
29 /*
30 * @test
31 * @summary Check if custom property change listener added
32 * to system tray works correctly
33 * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
34 * @run main PropertyChangeListenerTest
35 */
36
37 public class PropertyChangeListenerTest implements PropertyChangeListener {
38
39 Object property;
40 Object lock = new Object();
41 boolean propertyChanged = false;
42
43 public static void main(String[] args) throws Exception {
44 if (! SystemTray.isSupported()) {
45 System.out.println("SystemTray not supported on the platform under test. " +
46 "Marking the test passed");
47 } else {
48 new PropertyChangeListenerTest().doTest();
49 }
50 }
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.*;
25 import java.awt.image.BufferedImage;
26 import java.beans.PropertyChangeEvent;
27 import java.beans.PropertyChangeListener;
28
29 /*
30 * @test
31 * @key headful
32 * @summary Check if custom property change listener added
33 * to system tray works correctly
34 * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
35 * @run main PropertyChangeListenerTest
36 */
37
38 public class PropertyChangeListenerTest implements PropertyChangeListener {
39
40 Object property;
41 Object lock = new Object();
42 boolean propertyChanged = false;
43
44 public static void main(String[] args) throws Exception {
45 if (! SystemTray.isSupported()) {
46 System.out.println("SystemTray not supported on the platform under test. " +
47 "Marking the test passed");
48 } else {
49 new PropertyChangeListenerTest().doTest();
50 }
51 }
|