< prev index next >
src/java.desktop/share/classes/com/sun/beans/editors/FontEditor.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1996, 2012, 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
--- 1,7 ----
/*
! * 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,38 ****
--- 29,39 ----
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,69 ****
--- 61,71 ----
resize(300,40);
}
+ @SuppressWarnings("deprecation")
public Dimension preferredSize() {
return new Dimension(300, 40);
}
public void setValue(Object o) {
*** 91,100 ****
--- 93,103 ----
break;
}
}
}
+ @SuppressWarnings("deprecation")
private void changeFont(Font f) {
font = f;
if (sample != null) {
remove(sample);
}
*** 122,131 ****
--- 125,135 ----
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 >