< prev index next >

src/java.desktop/share/classes/com/sun/beans/editors/FontEditor.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 FontEditor extends Panel implements java.beans.PropertyEditor {
     private static final long serialVersionUID = 6732704486002715933L;
 
+    @SuppressWarnings("deprecation")
     public FontEditor() {
         setLayout(null);
 
         toolkit = Toolkit.getDefaultToolkit();
         fonts = toolkit.getFontList();

@@ -60,10 +61,11 @@
 
         resize(300,40);
     }
 
 
+    @SuppressWarnings("deprecation")
     public Dimension preferredSize() {
         return new Dimension(300, 40);
     }
 
     public void setValue(Object o) {

@@ -91,10 +93,11 @@
                 break;
             }
         }
     }
 
+    @SuppressWarnings("deprecation")
     private void changeFont(Font f) {
         font = f;
         if (sample != null) {
             remove(sample);
         }

@@ -122,10 +125,11 @@
 
         return "new java.awt.Font(\"" + font.getName() + "\", " +
                    font.getStyle() + ", " + font.getSize() + ")";
     }
 
+    @SuppressWarnings("deprecation")
     public boolean action(Event e, Object arg) {
         String family = familyChoser.getSelectedItem();
         int style = styles[styleChoser.getSelectedIndex()];
         int size = pointSizes[sizeChoser.getSelectedIndex()];
         try {
< prev index next >