< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxEditor.java

Print this page
rev 60127 : 8249205: Remove unnecessary trademark symbols


  24  */
  25 
  26 package javax.swing.plaf.metal;
  27 
  28 import javax.swing.*;
  29 import javax.swing.border.*;
  30 import java.io.Serializable;
  31 import java.awt.*;
  32 import java.awt.event.*;
  33 
  34 import javax.swing.plaf.basic.BasicComboBoxEditor;
  35 
  36 /**
  37  * The default editor for Metal editable combo boxes
  38  * <p>
  39  * <strong>Warning:</strong>
  40  * Serialized objects of this class will not be compatible with
  41  * future Swing releases. The current serialization support is
  42  * appropriate for short term storage or RMI between applications running
  43  * the same version of Swing.  As of 1.4, support for long term storage
  44  * of all JavaBeans&trade;
  45  * has been added to the <code>java.beans</code> package.
  46  * Please see {@link java.beans.XMLEncoder}.
  47  *
  48  * @author Steve Wilson
  49  */
  50 @SuppressWarnings("serial") // Same-version serialization only
  51 public class MetalComboBoxEditor extends BasicComboBoxEditor {
  52 
  53     /**
  54      * Constructs a new instance of {@code MetalComboBoxEditor}.
  55      */
  56     public MetalComboBoxEditor() {
  57         super();
  58         //editor.removeFocusListener(this);
  59         editor = new JTextField("",9) {
  60                 // workaround for 4530952
  61                 public void setText(String s) {
  62                     if (getText().equals(s)) {
  63                         return;
  64                     }


 116         }
 117 
 118         public Insets getBorderInsets(Component c, Insets insets) {
 119             insets.set(2, 2, 2, 0);
 120             return insets;
 121         }
 122     }
 123 
 124 
 125     /**
 126      * A subclass of BasicComboBoxEditor that implements UIResource.
 127      * BasicComboBoxEditor doesn't implement UIResource
 128      * directly so that applications can safely override the
 129      * cellRenderer property with BasicListCellRenderer subclasses.
 130      * <p>
 131      * <strong>Warning:</strong>
 132      * Serialized objects of this class will not be compatible with
 133      * future Swing releases. The current serialization support is
 134      * appropriate for short term storage or RMI between applications running
 135      * the same version of Swing.  As of 1.4, support for long term storage
 136      * of all JavaBeans&trade;
 137      * has been added to the <code>java.beans</code> package.
 138      * Please see {@link java.beans.XMLEncoder}.
 139      */
 140     @SuppressWarnings("serial") // Same-version serialization only
 141     public static class UIResource extends MetalComboBoxEditor
 142     implements javax.swing.plaf.UIResource {
 143     }
 144 }


  24  */
  25 
  26 package javax.swing.plaf.metal;
  27 
  28 import javax.swing.*;
  29 import javax.swing.border.*;
  30 import java.io.Serializable;
  31 import java.awt.*;
  32 import java.awt.event.*;
  33 
  34 import javax.swing.plaf.basic.BasicComboBoxEditor;
  35 
  36 /**
  37  * The default editor for Metal editable combo boxes
  38  * <p>
  39  * <strong>Warning:</strong>
  40  * Serialized objects of this class will not be compatible with
  41  * future Swing releases. The current serialization support is
  42  * appropriate for short term storage or RMI between applications running
  43  * the same version of Swing.  As of 1.4, support for long term storage
  44  * of all JavaBeans
  45  * has been added to the <code>java.beans</code> package.
  46  * Please see {@link java.beans.XMLEncoder}.
  47  *
  48  * @author Steve Wilson
  49  */
  50 @SuppressWarnings("serial") // Same-version serialization only
  51 public class MetalComboBoxEditor extends BasicComboBoxEditor {
  52 
  53     /**
  54      * Constructs a new instance of {@code MetalComboBoxEditor}.
  55      */
  56     public MetalComboBoxEditor() {
  57         super();
  58         //editor.removeFocusListener(this);
  59         editor = new JTextField("",9) {
  60                 // workaround for 4530952
  61                 public void setText(String s) {
  62                     if (getText().equals(s)) {
  63                         return;
  64                     }


 116         }
 117 
 118         public Insets getBorderInsets(Component c, Insets insets) {
 119             insets.set(2, 2, 2, 0);
 120             return insets;
 121         }
 122     }
 123 
 124 
 125     /**
 126      * A subclass of BasicComboBoxEditor that implements UIResource.
 127      * BasicComboBoxEditor doesn't implement UIResource
 128      * directly so that applications can safely override the
 129      * cellRenderer property with BasicListCellRenderer subclasses.
 130      * <p>
 131      * <strong>Warning:</strong>
 132      * Serialized objects of this class will not be compatible with
 133      * future Swing releases. The current serialization support is
 134      * appropriate for short term storage or RMI between applications running
 135      * the same version of Swing.  As of 1.4, support for long term storage
 136      * of all JavaBeans
 137      * has been added to the <code>java.beans</code> package.
 138      * Please see {@link java.beans.XMLEncoder}.
 139      */
 140     @SuppressWarnings("serial") // Same-version serialization only
 141     public static class UIResource extends MetalComboBoxEditor
 142     implements javax.swing.plaf.UIResource {
 143     }
 144 }
< prev index next >