Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4268535

poor doc for javax.swing.DefaultCellEditor.EditorDelegate

XMLWordPrintable

    • beta
    • sparc
    • solaris_2.6



      Name: sdC67446 Date: 09/03/99


      The doc for class
      javax.swing.DefaultCellEditor.EditorDelegate
      says nothing or almost nothing about expected behavior of these
      methods:

              public boolean isCellEditable(EventObject anEvent)
              public boolean shouldSelectCell(EventObject anEvent)
              public boolean startCellEditing(EventObject anEvent)
              public boolean stopCellEditing()
              public void actionPerformed(ActionEvent e)
              public void cancelCellEditing()
              public void itemStateChanged(ItemEvent e)

      More detailed:
              public boolean isCellEditable(EventObject anEvent)
                  currently method returns:
                      ('anEvent'.getClickCount >= clickCountToStartif)
                          //if 'anEvent' is instance of MouseEvent
                      true
                          //otherwise

              public boolean shouldSelectCell(EventObject anEvent)
                  always returns true

              public boolean startCellEditing(EventObject anEvent)
                  always returns true

              public boolean stopCellEditing()
                  calls fireEditingStopped() and always returns true

              public void cancelCellEditing()
                  calls fireEditingCanceled()

              public void actionPerformed(ActionEvent e)
                  calls DefaultCellEditor.this.stopCellEditing()

              public void itemStateChanged(ItemEvent e)
                  calls DefaultCellEditor.this.stopCellEditing();



      The doc says:
      ------------------------------------------------------------
      public boolean isCellEditable(EventObject anEvent)

      public boolean shouldSelectCell(EventObject anEvent)

      public boolean startCellEditing(EventObject anEvent)

      public boolean stopCellEditing()

      public void cancelCellEditing()

      public void actionPerformed(ActionEvent e)

           Description copied from interface: ActionListener
           Invoked when an action occurs.
           Specified by:
               actionPerformed in interface ActionListener

      public void itemStateChanged(ItemEvent e)

           Description copied from interface: ItemListener
           Invoked when an item has been selected or deselected. The code written for this method performs the
           operations that need to occur when an item is selected (or deselected).
           Specified by:
               itemStateChanged in interface ItemListener
      ------------------------------------------------------------
      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            dsvsunw Dsv Dsv (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: