< prev index next >

src/java.desktop/share/classes/javax/swing/DefaultCellEditor.java

Print this page

        

@@ -42,11 +42,11 @@
  * Serialized objects of this class will not be compatible with
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
  * of all JavaBeans&trade;
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
  * Please see {@link java.beans.XMLEncoder}.
  *
  * @author Alan Chung
  * @author Philip Milne
  * @since 1.2

@@ -61,28 +61,28 @@
 
     /** The Swing component being edited. */
     protected JComponent editorComponent;
     /**
      * The delegate class which handles all methods sent from the
-     * <code>CellEditor</code>.
+     * {@code CellEditor}.
      */
     protected EditorDelegate delegate;
     /**
      * An integer specifying the number of clicks needed to start editing.
-     * Even if <code>clickCountToStart</code> is defined as zero, it
+     * Even if {@code clickCountToStart} is defined as zero, it
      * will not initiate until a click occurs.
      */
     protected int clickCountToStart = 1;
 
 //
 //  Constructors
 //
 
     /**
-     * Constructs a <code>DefaultCellEditor</code> that uses a text field.
+     * Constructs a {@code DefaultCellEditor} that uses a text field.
      *
-     * @param textField  a <code>JTextField</code> object
+     * @param textField  a {@code JTextField} object
      */
     @ConstructorProperties({"component"})
     public DefaultCellEditor(final JTextField textField) {
         editorComponent = textField;
         this.clickCountToStart = 2;

@@ -97,13 +97,13 @@
         };
         textField.addActionListener(delegate);
     }
 
     /**
-     * Constructs a <code>DefaultCellEditor</code> object that uses a check box.
+     * Constructs a {@code DefaultCellEditor} object that uses a check box.
      *
-     * @param checkBox  a <code>JCheckBox</code> object
+     * @param checkBox  a {@code JCheckBox} object
      */
     public DefaultCellEditor(final JCheckBox checkBox) {
         editorComponent = checkBox;
         delegate = new EditorDelegate() {
             public void setValue(Object value) {

@@ -124,14 +124,14 @@
         checkBox.addActionListener(delegate);
         checkBox.setRequestFocusEnabled(false);
     }
 
     /**
-     * Constructs a <code>DefaultCellEditor</code> object that uses a
+     * Constructs a {@code DefaultCellEditor} object that uses a
      * combo box.
      *
-     * @param comboBox  a <code>JComboBox</code> object
+     * @param comboBox  a {@code JComboBox} object
      */
     public DefaultCellEditor(final JComboBox<?> comboBox) {
         editorComponent = comboBox;
         comboBox.putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE);
         delegate = new EditorDelegate() {

@@ -163,11 +163,11 @@
     }
 
     /**
      * Returns a reference to the editor component.
      *
-     * @return the editor <code>Component</code>
+     * @return the editor {@code Component}
      */
     public Component getComponent() {
         return editorComponent;
     }
 

@@ -197,59 +197,59 @@
 //  Override the implementations of the superclass, forwarding all methods
 //  from the CellEditor interface to our delegate.
 //
 
     /**
-     * Forwards the message from the <code>CellEditor</code> to
-     * the <code>delegate</code>.
+     * Forwards the message from the {@code CellEditor} to
+     * the {@code delegate}.
      * @see EditorDelegate#getCellEditorValue
      */
     public Object getCellEditorValue() {
         return delegate.getCellEditorValue();
     }
 
     /**
-     * Forwards the message from the <code>CellEditor</code> to
-     * the <code>delegate</code>.
+     * Forwards the message from the {@code CellEditor} to
+     * the {@code delegate}.
      * @see EditorDelegate#isCellEditable(EventObject)
      */
     public boolean isCellEditable(EventObject anEvent) {
         return delegate.isCellEditable(anEvent);
     }
 
     /**
-     * Forwards the message from the <code>CellEditor</code> to
-     * the <code>delegate</code>.
+     * Forwards the message from the {@code CellEditor} to
+     * the {@code delegate}.
      * @see EditorDelegate#shouldSelectCell(EventObject)
      */
     public boolean shouldSelectCell(EventObject anEvent) {
         return delegate.shouldSelectCell(anEvent);
     }
 
     /**
-     * Forwards the message from the <code>CellEditor</code> to
-     * the <code>delegate</code>.
+     * Forwards the message from the {@code CellEditor} to
+     * the {@code delegate}.
      * @see EditorDelegate#stopCellEditing
      */
     public boolean stopCellEditing() {
         return delegate.stopCellEditing();
     }
 
     /**
-     * Forwards the message from the <code>CellEditor</code> to
-     * the <code>delegate</code>.
+     * Forwards the message from the {@code CellEditor} to
+     * the {@code delegate}.
      * @see EditorDelegate#cancelCellEditing
      */
     public void cancelCellEditing() {
         delegate.cancelCellEditing();
     }
 
 //
 //  Implementing the TreeCellEditor Interface
 //
 
-    /** Implements the <code>TreeCellEditor</code> interface. */
+    /** Implements the {@code TreeCellEditor} interface. */
     public Component getTreeCellEditorComponent(JTree tree, Object value,
                                                 boolean isSelected,
                                                 boolean expanded,
                                                 boolean leaf, int row) {
         String         stringValue = tree.convertValueToText(value, isSelected,

@@ -260,11 +260,11 @@
     }
 
 //
 //  Implementing the CellEditor Interface
 //
-    /** Implements the <code>TableCellEditor</code> interface. */
+    /** Implements the {@code TableCellEditor} interface. */
     public Component getTableCellEditorComponent(JTable table, Object value,
                                                  boolean isSelected,
                                                  int row, int column) {
         delegate.setValue(value);
         if (editorComponent instanceof JCheckBox) {

@@ -294,11 +294,11 @@
 //
 //  Protected EditorDelegate class
 //
 
     /**
-     * The protected <code>EditorDelegate</code> class.
+     * The protected {@code EditorDelegate} class.
      */
     protected class EditorDelegate implements ActionListener, ItemListener, Serializable {
 
         /**  The value of this cell. */
         protected Object value;

@@ -318,12 +318,12 @@
         public void setValue(Object value) {
             this.value = value;
         }
 
        /**
-        * Returns true if <code>anEvent</code> is <b>not</b> a
-        * <code>MouseEvent</code>.  Otherwise, it returns true
+        * Returns true if {@code anEvent} is <b>not</b> a
+        * {@code MouseEvent}.  Otherwise, it returns true
         * if the necessary number of clicks have occurred, and
         * returns false otherwise.
         *
         * @param   anEvent         the event
         * @return  true  if cell is ready for editing, false otherwise

@@ -360,21 +360,21 @@
         }
 
        /**
         * Stops editing and
         * returns true to indicate that editing has stopped.
-        * This method calls <code>fireEditingStopped</code>.
+        * This method calls {@code fireEditingStopped}.
         *
         * @return  true
         */
         public boolean stopCellEditing() {
             fireEditingStopped();
             return true;
         }
 
        /**
-        * Cancels editing.  This method calls <code>fireEditingCanceled</code>.
+        * Cancels editing.  This method calls {@code fireEditingCanceled}.
         */
        public void cancelCellEditing() {
            fireEditingCanceled();
        }
 
< prev index next >