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

Impossible to use Caret implementations not derived from DefaultCaret

XMLWordPrintable

    • kestrel
    • generic
    • generic



      Name: krT82822 Date: 11/16/99


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-I)
      Java HotSpot(TN) Client VM (build 1.3-I, mixed mode)


      It is impossible to use custom implementations of javax.swing.Caret
      that do not extend javax.swing.text.DefaultCaret with text components
      that extend javax.swing.text.JTextComponent (this applies to virtually
      all text components).

      The problem is that JTextComponent.getSelectionStart/End(Postition.Bias[])
      try(ies) to cast the caret to javax.swing.text.DefaultCaret. The
      consequence is a ClassCastException at runtime.

      --------

      16 Nov 99 eval1127@eng -- still a problem in current kestrel sources.
      (Review ID: 97892)
      ======================================================================

            tprinzing Tim Prinzing (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: