< prev index next >

src/java.desktop/share/classes/com/sun/beans/editors/ColorEditor.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -29,10 +29,11 @@
 import java.beans.*;
 
 public class ColorEditor extends Panel implements PropertyEditor {
     private static final long serialVersionUID = 1781257185164716054L;
 
+    @SuppressWarnings("deprecation")
     public ColorEditor() {
         setLayout(null);
 
         ourWidth = hPad;
 

@@ -67,14 +68,16 @@
     public void setValue(Object o) {
         Color c = (Color)o;
         changeColor(c);
     }
 
+    @SuppressWarnings("deprecation")
     public Dimension preferredSize() {
         return new Dimension(ourWidth, 40);
     }
 
+    @SuppressWarnings("deprecation")
     public boolean keyUp(Event e, int key) {
         if (e.target == text) {
             try {
                 setAsText(text.getText());
             } catch (IllegalArgumentException ex) {

@@ -105,10 +108,11 @@
             throw new IllegalArgumentException(s);
         }
 
     }
 
+    @SuppressWarnings("deprecation")
     public boolean action(Event e, Object arg) {
         if (e.target == choser) {
             changeColor(colors[choser.getSelectedIndex()]);
         }
         return false;
< prev index next >